update:add ci cd files ==> do not edit those file
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
function file(file) {
|
||||
return '/uploads/catalogs/file/' + file
|
||||
}
|
||||
|
||||
function cover(img) {
|
||||
return '/uploads/catalogs/cover/' + img
|
||||
}
|
||||
|
||||
const CatalogSchema = mongoose.Schema({
|
||||
locale: {
|
||||
fa: {
|
||||
title: String
|
||||
},
|
||||
en: {
|
||||
title: String
|
||||
}
|
||||
},
|
||||
file: {type: String, get: file},
|
||||
cover: {type: String, get: cover},
|
||||
showInFa: {type: Boolean, default: false},
|
||||
showInEn: {type: Boolean, default: false}
|
||||
})
|
||||
|
||||
|
||||
module.exports = mongoose.model('Catalog', CatalogSchema)
|
||||
Reference in New Issue
Block a user