17 lines
545 B
JavaScript
17 lines
545 B
JavaScript
const mongoose = require('mongoose')
|
|
|
|
function file(file) {
|
|
if (file) return '/uploads/images/setting/' + file
|
|
}
|
|
|
|
const SiteSettingSchema = mongoose.Schema({
|
|
aboutUS: {type: String, get: file, default: 'undefined'},
|
|
activity: {type: String, get: file, default: ''},
|
|
projects: {type: String, get: file, default: ''},
|
|
gallery: {type: String, get: file, default: ''},
|
|
catalog: {type: String, get: file, default: ''},
|
|
blogs: {type: String, get: file, default: ''},
|
|
})
|
|
|
|
module.exports = mongoose.model('SiteSetting', SiteSettingSchema)
|