forked from UKSOURCE/cms.hailearning.edu.vn
67 lines
1.1 KiB
JavaScript
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);
|