import{Schema as e}from"mongoose";const t=new e({name:{type:e.Types.String,required:!0,maxlength:50,unique:!0},phone_code:{type:e.Types.String},currency:{type:e.Types.String},currency_symbol:{type:e.Types.String},emoji:{type:e.Types.String},location:{type:{type:e.Types.String,default:"Point",enum:["Point"]},coordinates:{type:[e.Types.Number],required:!0}},_id:{type:e.Types.String,required:!0,unique:!0}},{_id:!1,versionKey:!1});t.virtual("id").get((function(){return this._id})),t.set("toJSON",{virtuals:!0}),t.set("toObject",{virtuals:!0}),t.index({name:1,phone_code:1},{unique:!0}),t.index({location:"2dsphere"});const n=e=>e.model("countries",t);export{n as CountryModelFunc};