import {
  Table,
  Column,
  CreatedAt,
  UpdatedAt,
  Model,
  PrimaryKey,
  ForeignKey,
  BelongsTo,
  HasMany,
  HasOne,
  AutoIncrement,
  Default,
  DataType, 
  Unique
} from "sequelize-typescript";

import Contact from "./Contact";
import Message from "./Message";
import Queue from "./Queue";
import User from "./User";
import Whatsapp from "./Whatsapp";

import SchedulingNotify from "./SchedulingNotify";
import StatusChatEnd from "./StatusChatEnd";

@Table
class Position extends Model<Position> {
  @PrimaryKey
  @AutoIncrement
  @Column
  id: number;
 
  @Unique
  @Column(DataType.TEXT)
  name: string;

  @CreatedAt
  createdAt: Date;

  @UpdatedAt
  updatedAt: Date;

  @HasMany(() => User)
  users: User[];
}

export default Position;
