import { Column, DataType, Table, Model, ForeignKey, BelongsTo, } from 'sequelize-typescript'; import { OrderModel } from './order.entity'; @Table({ tableName: 'order_PickUp', timestamps: false, }) export class OrderPickUpModel extends Model { @ForeignKey(() => OrderModel) @Column({ primaryKey: true, allowNull: false, type: DataType.STRING(30), }) OrderNo: string; @Column({ type: DataType.STRING(30), allowNull: false, }) Type: string; @Column({ type: DataType.STRING(30), allowNull: true, }) OutletCode: string; @Column({ type: DataType.STRING(30), allowNull: true, }) OutletName: string; @Column({ type: DataType.STRING(30), allowNull: true, }) VerifyUniqueCode: string; @Column({ allowNull: true, type: DataType.CHAR(1), }) VerifySubmittedYN: string; @Column({ allowNull: true, type: DataType.DATE, }) VerifySubmitDateTime: Date; @Column({ allowNull: true, type: DataType.STRING(100), }) RepName: string; @Column({ allowNull: true, type: DataType.STRING(20), }) RepNRIC: string; @Column({ allowNull: true, type: DataType.STRING(20), }) RepContactNo: string; @Column({ allowNull: false, type: DataType.STRING(30), }) ConsignmentNo: string; @Column({ allowNull: true, type: DataType.DATE, }) PickUpDateTime: Date; @Column({ allowNull: true, type: DataType.STRING(1000), }) Note: string; @BelongsTo(() => OrderModel) Order: OrderModel; }