Initial commit
This commit is contained in:
13
backend/models/Todo.js
Normal file
13
backend/models/Todo.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
const todoSchema = new mongoose.Schema(
|
||||
{
|
||||
familyMemberId: { type: mongoose.Schema.Types.ObjectId, ref: "FamilyMember" },
|
||||
title: { type: String, required: true },
|
||||
completed: { type: Boolean, default: false },
|
||||
dueDate: { type: Date },
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
module.exports = mongoose.model("Todo", todoSchema);
|
||||
Reference in New Issue
Block a user