23 lines
788 B
JavaScript
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);
|