import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document, Types, HydratedDocument } from 'mongoose';
import moment from 'moment';
import { KnowledgeBase } from './knowledge_base.schema';

@Schema()
export class DefaultAgents extends Document {

    @Prop({ type: String, default: null })
    name: string = null

    @Prop({ type: String, default: null })
    image: string = null

    @Prop({ type: String, default: null })
    first_message: string = null

    @Prop({ type: String, default: null })
    prompt: string = null

    @Prop({ type: String, default: null })
    voice: string = null

    @Prop({ type: String, default: null })
    ai_model: string = null

    @Prop({ type: String, default: null })
    ai_model_version: string = null

    @Prop({ type: Boolean, default: false })
    idle_reminder: boolean

    @Prop({ type: Boolean, default: false })
    call_cut_ability: boolean

    // @Prop({ type: String, default: null })
    // call_limit: string = null

    @Prop({ type: String, default: null })
    call_limit_duration: string = null


    @Prop({ type: Boolean, default: false })
    call_transfer: boolean

    @Prop({ type: Boolean, default: false })
    send_message: boolean

    @Prop({ type: Boolean, default: false })
    real_time_booking: boolean

    @Prop({ default: moment().utc().valueOf() })
    created_at: number = moment().utc().valueOf();

    @Prop({ default: moment().utc().valueOf() })
    updated_at: number = moment().utc().valueOf();
}

export const defaultAgentsSchema = SchemaFactory.createForClass(DefaultAgents);