Files
cms.uldp.edu.vn/models/level.js
r2xrzh9q2z-lab d1b931d547 first commit
2026-02-02 11:07:09 +07:00

67 lines
1.1 KiB
JavaScript

const mongoose = require('mongoose');
const levelSchema = new mongoose.Schema({
brochure: { type: String },
type: {
type: String,
required: true,
trim: true
},
banner: {
image: String,
title: String,
text: String
},
overview: {
title: String,
paragraphs: [String],
contact_info: {
title: String,
subtitle: String,
items: [{
text: String
}]
},
social_info: {
title: String,
social_links: [{
image: String,
url: String,
alt: String
}],
apply_button: {
text: String,
url: String
}
}
},
requirements: {
title: String,
items: [String]
},
action_buttons: {
title: String,
buttons: [{
text: String,
link: String
}]
},
why_study: {
title: String,
items: [{
number: String,
title: String,
text: String
}]
},
// Thêm tham chiếu đến Form
form: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Form'
},
updatedAt: Date
}, {
timestamps: true
});
module.exports = mongoose.model('Level', levelSchema);