MNEMO / server /src /models /Entry.js
AadityaPawarx1's picture
style: fix image rendering and refine AnswerRenderer logic
bcf42ee
raw
history blame contribute delete
479 Bytes
import mongoose from "mongoose";
const entrySchema = new mongoose.Schema(
{
cardId: {
type: mongoose.Schema.Types.ObjectId,
required: true,
ref: "Card"
},
question: {
type: String,
required: true,
trim: true
},
answer: {
type: String,
required: true
},
order: {
type: Number,
default: 0
}
},
{
timestamps: true
}
);
export const Entry = mongoose.model("Entry", entrySchema);