front-end almost done | started back-end

This commit is contained in:
Amir Mohamadi
2020-11-23 19:39:26 +03:30
parent 95149f0e72
commit 80a7abafb7
191 changed files with 60163 additions and 950 deletions
+92
View File
@@ -0,0 +1,92 @@
const mongoose = require('mongoose')
function image(img) {
return '/uploads/images/about/' + img
}
const AboutPageSchema = mongoose.Schema({
aboutPage_details: {
fa: {
page_title: String,
s1_title: String,
s1_caption: String,
s2_title: String,
s2_caption: String,
s2_imageCaption: String,
s3_title: String,
s3_caption: String,
s3_imageCaption: String,
s4_text: String,
last_section_title: String,
last_section_text: String
},
en: {
page_title: String,
s1_title: String,
s1_caption: String,
s2_title: String,
s2_caption: String,
s2_imageCaption: String,
s3_title: String,
s3_caption: String,
s3_imageCaption: String,
s4_text: String,
last_section_title: String,
last_section_text: String
},
de: {
page_title: String,
s1_title: String,
s1_caption: String,
s2_title: String,
s2_caption: String,
s2_imageCaption: String,
s3_title: String,
s3_caption: String,
s3_imageCaption: String,
s4_text: String,
last_section_title: String,
last_section_text: String
},
tr: {
page_title: String,
s1_title: String,
s1_caption: String,
s2_title: String,
s2_caption: String,
s2_imageCaption: String,
s3_title: String,
s3_caption: String,
s3_imageCaption: String,
s4_text: String,
last_section_title: String,
last_section_text: String
},
it: {
page_title: String,
s1_title: String,
s1_caption: String,
s2_title: String,
s2_caption: String,
s2_imageCaption: String,
s3_title: String,
s3_caption: String,
s3_imageCaption: String,
s4_text: String,
last_section_title: String,
last_section_text: String
}
},
page_hero: {type: String, get: image},
s2_image: {type: String, get: image},
s3_image: {type: String, get: image},
last_section_image: {type: String, get: image},
created_at: String,
updated_at: String
}, {
toObject: {getters: true},
toJSON: {getters: true}
})
module.exports = mongoose.model('AboutPageContent', AboutPageSchema)