import { OrderCustomerTypeEnum } from '../enums/order-customer-type.enum'; import { IOrderCustomerAttr } from '../interfaces/order-customer-attr.interface'; import { Column, DataType, Table, Model, CreatedAt, UpdatedAt, } from 'sequelize-typescript'; @Table({ tableName: 'order_Customer', }) export class OrderCustomerModel extends Model implements IOrderCustomerAttr { @Column({ primaryKey: true, allowNull: false, type: DataType.STRING(30), }) CustomerId: string; @Column({ allowNull: true, type: DataType.STRING(20), }) CRMRefNo: string; @Column({ allowNull: false, type: DataType.STRING(200), }) FullName: string; @Column({ allowNull: true, type: DataType.STRING(20), }) ContactNo: string; @Column({ allowNull: true, type: DataType.STRING(200), }) Email: string; @Column({ allowNull: true, type: DataType.STRING(50), }) IdNo: string; @Column({ allowNull: false, type: DataType.ENUM('Individual', 'Company'), }) CustomerType: OrderCustomerTypeEnum; @Column({ allowNull: true, type: DataType.STRING(20), }) TaxIdentificationNo: string; @Column({ allowNull: true, type: DataType.STRING(200), }) ContactPersonName: string; @Column({ allowNull: true, type: DataType.STRING(20), }) ContactPersonContactNo: string; @Column({ allowNull: true, type: DataType.STRING(20), }) ContactPersonIdType: string; @Column({ allowNull: true, type: DataType.STRING(50), }) ContactPersonIdNo: string; @Column({ allowNull: false, type: DataType.STRING(30), }) CreatedById: string; @CreatedAt CreatedAt: Date; @Column({ allowNull: false, type: DataType.STRING(30), }) UpdatedById: string; @UpdatedAt UpdatedAt: Date; }