Files
2024-10-10 21:57:37 +03:30

24 lines
459 B
JavaScript

const mongoose = require('mongoose')
function image(img) {
if (img) return '/uploads/images/customer/' + img
}
const CustomerCommentSchema = mongoose.Schema({
locale: {
fa: {
name: String,
position: String,
comment: String
},
en: {
name: String,
position: String,
comment: String
}
},
image: {type: String, get: image}
})
module.exports = mongoose.model('CustomerComment', CustomerCommentSchema)