import"../utils/validation/validateOrganization.mjs";import{planSchema as e}from"./plans.schema.mjs";import{Schema as t}from"mongoose";const n=new t({name:{type:String,required:!0,minlength:4,maxlength:100},membersIds:{type:[t.Types.ObjectId],ref:`User`,required:!0,minlength:1},adminsIds:{type:[t.Types.ObjectId],ref:`User`,required:!0,minlength:1},creatorId:{type:t.Types.ObjectId,ref:`User`,required:!0},plan:{type:e},ssoEnabled:{type:Boolean,default:!1},domain:{type:String}},{timestamps:!0,toJSON:{virtuals:!0,versionKey:!1,transform(e,t){let{_id:n,...r}=t;return{...r,id:n.toString()}}},toObject:{virtuals:!0,transform(e,t){let{_id:n,...r}=t;return{...r,id:n}}}});n.virtual(`id`).get(function(){return this._id.toString()});export{n as organizationSchema};
//# sourceMappingURL=organization.schema.mjs.map