I writte my principal parent comment but I don't know how can I add a list of children comments with the same field:
const CommentSchema = new Schema({
id_parent : {
type: Number,
},
user_name: {
type: String,
trim: true,
required: true,
},
content: {
type: String,
},
created_date: {
type: Date,
default: Date.now,
},
counter_like: {
type: Number,
required:false,
},
status : {
type: String,
},
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…