Files
orisoxin/server/models/Team.js
T
2024-10-10 21:57:37 +03:30

25 lines
446 B
JavaScript

const mongoose = require('mongoose')
function image(img) {
return '/uploads/images/team/' + img
}
const TeamSchema = mongoose.Schema({
locale: {
fa: {
first_name: String,
last_name: String,
position: String
},
en: {
first_name: String,
last_name: String,
position: String
}
},
image: {type: String, get: image},
index: Number
})
module.exports = mongoose.model('Team', TeamSchema)