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
+33
View File
@@ -0,0 +1,33 @@
const mongoose = require('mongoose')
function image(img) {
return '/uploads/images/slider/' + img
}
const SliderSchema = mongoose.Schema({
image: {type: String, get: image},
slider_details: {
fa: {
caption: String
},
en: {
caption: String
},
de: {
caption: String
},
tr: {
caption: String
},
it: {
caption: String
}
},
created_at: String,
updated_at: String
}, {
toObject: {getters: true},
toJSON: {getters: true}
})
module.exports = mongoose.model('Slider', SliderSchema)