import {
  Table,
  Model,
  Column,
  DataType,
  CreatedAt,
  UpdatedAt,
} from 'sequelize-typescript';

@Table({ tableName: 'customer_SyncPolicy', timestamps: true })
export class CustomerSyncPolicyModel extends Model {
  @Column({ primaryKey: true, allowNull: false, type: DataType.STRING(30) })
  declare SyncPolicyId: string;

  @Column({ allowNull: false, type: DataType.STRING(5) })
  declare SourceSystemCode: string;

  @Column({ allowNull: false, type: DataType.STRING(5) })
  declare TargetSystemCode: string;

  @Column({ allowNull: false, type: DataType.STRING(1) })
  declare AllowInsertYN: string;

  @Column({ allowNull: false, type: DataType.STRING(1) })
  declare AllowUpdateYN: string;

  @Column({ allowNull: true, type: DataType.TEXT })
  declare Reason: string;

  @Column({ allowNull: false, type: DataType.STRING(1) })
  declare IsActiveYN: string;

  @CreatedAt
  declare CreatedAt: Date;

  @UpdatedAt
  declare UpdatedAt: Date;
}
