import {
    Table,
    AutoIncrement,
    Column,
    CreatedAt,
    UpdatedAt,
    Model,
    PrimaryKey,
    ForeignKey,
    BelongsTo
  } from "sequelize-typescript";

  import StatusChatEnd from "./StatusChatEnd"; 
  import Ticket from "./Ticket";
  
  @Table
  class SchedulingNotify extends Model<SchedulingNotify> {
    @PrimaryKey
    @AutoIncrement
    @Column
    id: number;  
  
    @ForeignKey(() => StatusChatEnd)
    @Column
    statusChatEndId: number;

    @BelongsTo(() => StatusChatEnd)
    statusChatEnd: StatusChatEnd;


    @ForeignKey(() => Ticket)
    @Column
    ticketId: number;

    @BelongsTo(() => Ticket)
    ticket: Ticket;  

    @Column
    schedulingDate: Date;  

    @Column
    schedulingTime: Date;  

    @Column
    message: string 
  
    @CreatedAt
    createdAt: Date;
  
    @UpdatedAt
    updatedAt: Date;
  }
  
  export default SchedulingNotify;
  