File size: 466 Bytes
6306afb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { Document, Model, model, Schema } from 'mongoose';

export interface Todo {
 _id: string | undefined;
 id: string | undefined;
 member_id: string | undefined;
 name: string | undefined;
 importance: string | undefined;
 urgency: string | undefined;
}

const todoSchema = new Schema<Todo>({
 _id: { type: String },
 id: String,
 member_id: String,
 name: String,
 importance: String,
 urgency: String,
});

const Todo: Model<Todo> = model('Todo', todoSchema);