import { RenameId } from "../utils/mongoDB/types.js";
import { Document, Model, ObjectIdToString, Types } from "mongoose";

//#region src/types/discussion.types.d.ts
interface Message {
  role: 'user' | 'assistant' | 'system';
  content: string;
  relatedFiles?: string[];
  timestamp: Date;
}
interface Discussion extends Document {
  id: Types.ObjectId;
  discussionId: string;
  messages: Message[];
  userId: Types.ObjectId;
  projectId: Types.ObjectId;
  organizationId: Types.ObjectId;
  title?: string;
  isArchived: boolean;
  createdAt: Date;
  updatedAt: Date;
}
type DiscussionAPI = ObjectIdToString<Discussion & {
  numberOfMessages: number;
}>;
type DiscussionSchema = RenameId<Discussion>;
type DiscussionModelType = Model<Discussion>;
type DiscussionDocument = Document<unknown, {}, Discussion> & Discussion;
//#endregion
export { Discussion, DiscussionAPI, DiscussionDocument, DiscussionModelType, DiscussionSchema, Message };
//# sourceMappingURL=discussion.types.d.ts.map