Created
February 28, 2021 16:32
-
-
Save cmwylie19/1613047af7f250c3b48067747ae80c68 to your computer and use it in GitHub Desktop.
task schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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