Spaces:
Sleeping
Sleeping
File size: 392 Bytes
81fc505 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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);
|