Files
ostandari/server/models/ContactUs.js
T
2024-10-21 10:22:26 +03:30

23 lines
788 B
JavaScript

const mongoose = require('mongoose');
const ContactUsSchema = mongoose.Schema({
title : {type : String , default : 'تماس با ما'},
description: String,
showInMenu: Boolean,
email : String,
phone : String,
address : String,
main : {type : Boolean , default : false},
// catId : { type: mongoose.Schema.Types.ObjectId, ref: 'Category'},
_creator: {type: mongoose.Schema.Types.ObjectId , ref: 'User'},
_updatedBy : {type: mongoose.Schema.Types.ObjectId , ref: 'User'},
location : { type: {type:String}, coordinates: [Number]},
siteMap : {type : Boolean , default : true},
showInFooter : {type : Number , enum : [0,1,2,3] , default : 0},
});
ContactUsSchema.index({ location : '2dsphere'});
module.exports = mongoose.model('ContactUs', ContactUsSchema);