import mongoose from "mongoose";

interface Comment {
    comment: string;
    createdAt: Date;
}

export interface IFeedback extends Document {
    _id?: string | mongoose.Types.ObjectId;
    
    user: string | mongoose.Types.ObjectId;
    messageId: string | mongoose.Types.ObjectId;
    conversationId: string | mongoose.Types.ObjectId;

    imageId?: string;
    imageHistoryId?: string | mongoose.Types.ObjectId;
    
    type: 'image' | 'chat';

    prompt: string;
    feedback?: string; 
    tags?: string[];
    
    comments?: Comment[];
    status?: 'Open' | 'Acknowledged' | 'Investigating' | 'Resolved';
    createdAt?: Date;
    updatedAt?: Date;
}

export type IFeedbackStatus = 'Open' | 'Acknowledged' | 'Investigating' | 'Resolved';