Skip to content

Instantly share code, notes, and snippets.

@cmwylie19
Created February 28, 2021 16:32
Show Gist options
  • Save cmwylie19/1613047af7f250c3b48067747ae80c68 to your computer and use it in GitHub Desktop.
Save cmwylie19/1613047af7f250c3b48067747ae80c68 to your computer and use it in GitHub Desktop.
task schema
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const Task = new Schema({
title: String,
listId: String,
owner: String,
completed: { type: Boolean, default: false },
assigned: String,
completedAt: Date,
notes: { type: Array, default: [] },
created: { type: Date, default: Date.now },
});
module.exports = mongoose.model("Task", Task);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment