update:add ci cd files ==> do not edit those file
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
function image(img) {
|
||||
return '/uploads/images/gallery/' + img
|
||||
}
|
||||
|
||||
const GallerySchema = mongoose.Schema({
|
||||
image: {type: String, get: image},
|
||||
thumb: {type: String, get: image},
|
||||
category: {type: mongoose.ObjectId, ref: 'GalleryCategory'},
|
||||
noCategory: {type: Boolean, default: false},
|
||||
locale: {
|
||||
fa: {
|
||||
caption: String
|
||||
},
|
||||
en: {
|
||||
caption: String
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
module.exports = mongoose.model('Gallery', GallerySchema)
|
||||
Reference in New Issue
Block a user