import{Schema as e}from"mongoose";const t=new e({discussionId:{type:String,required:!0,unique:!0},messages:[{role:{type:String,required:!0,enum:[`user`,`assistant`,`system`]},content:{type:String,required:!0},timestamp:{type:Date,default:Date.now},relatedFiles:{type:[String]}}],userId:{type:e.Types.ObjectId,ref:`user`,required:!0},projectId:{type:e.Types.ObjectId,ref:`project`,required:!0},organizationId:{type:e.Types.ObjectId,ref:`organization`,required:!0},title:{type:String,required:!1},isArchived:{type:Boolean,default:!1}},{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}}}});export{t as discussionSchema};
//# sourceMappingURL=discussion.schema.mjs.map