forked from UKSOURCE/cms.hailearning.edu.vn
first commit
This commit is contained in:
67
models/level.js
Normal file
67
models/level.js
Normal file
@@ -0,0 +1,67 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user