mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 15:47:48 +01:00
14 lines
260 B
JavaScript
14 lines
260 B
JavaScript
const mongoose = require('mongoose');
|
|
|
|
const { Schema } = mongoose;
|
|
|
|
const todoListSchema = Schema({
|
|
name: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
todos: [{ type: Schema.Types.ObjectId, ref: 'Todo' }],
|
|
});
|
|
|
|
mongoose.model('TodoList', todoListSchema);
|