sf-cd4 / src /models /todo.tsx
jordonpeter01's picture
Add 6 files
6306afb verified
raw
history blame contribute delete
466 Bytes
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);