Spaces:
Sleeping
Sleeping
| import mongoose from "mongoose"; | |
| const cardSchema = new mongoose.Schema( | |
| { | |
| title: { | |
| type: String, | |
| required: true, | |
| trim: true | |
| }, | |
| parentId: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| default: null | |
| }, | |
| order: { | |
| type: Number, | |
| default: 0 | |
| } | |
| }, | |
| { | |
| timestamps: true | |
| } | |
| ); | |
| export const Card = mongoose.model("Card", cardSchema); | |