import { Column, DataType, Table, Model, ForeignKey, BelongsTo, } from 'sequelize-typescript'; import { OrderModel } from './order.entity'; @Table({ tableName: 'order_ShippingAddress', timestamps: false, }) export class OrderShippingAddressModel extends Model { @ForeignKey(() => OrderModel) @Column({ primaryKey: true, allowNull: false, type: DataType.STRING(30), }) OrderNo: string; @Column({ type: DataType.STRING(200), allowNull: true, }) Name: Date; @Column({ type: DataType.STRING(1000), allowNull: true, }) Address: string; @Column({ type: DataType.STRING(30), allowNull: true, }) City: string; @Column({ type: DataType.STRING(30), allowNull: true, }) State: string; @Column({ allowNull: true, type: DataType.STRING(10), }) Postcode: string; @Column({ allowNull: true, type: DataType.STRING(20), }) Country: Date; @Column({ allowNull: true, type: DataType.STRING(20), }) Phone: string; @BelongsTo(() => OrderModel) Order: OrderModel; }