import{MEMBERS_MIN_LENGTH as e,NAME_MAX_LENGTH as t,NAME_MIN_LENGTH as n}from"../utils/validation/validateOrganization.mjs";import{planSchema as r}from"./plans.schema.mjs";import{Schema as i}from"mongoose";const a=new i({name:{type:String,required:!0,minlength:n,maxlength:t},membersIds:{type:[i.Types.ObjectId],ref:`User`,required:!0,minlength:e},adminsIds:{type:[i.Types.ObjectId],ref:`User`,required:!0,minlength:e},creatorId:{type:i.Types.ObjectId,ref:`User`,required:!0},plan:{type:r},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}}}});a.virtual(`id`).get(function(){return this._id.toString()});export{a as organizationSchema};
//# sourceMappingURL=organization.schema.mjs.map