import{Schema as e}from"mongoose";const t=new e({accessToken:{type:String,required:!0},accessTokenExpiresAt:{type:Date},clientId:{type:String,ref:`Project`,required:!0},userId:{type:e.Types.ObjectId,ref:`User`,required:!0}},{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}}}});t.index({createdAt:1},{expireAfterSeconds:3600*24*10});export{t as accessTokenSchema};
//# sourceMappingURL=oAuth2.schema.mjs.map