UNPKG

@tomei/customer-base

Version:

Tomei Customer Base Package

50 lines (37 loc) 1.31 kB
import { Table, Model, Column, DataType, ForeignKey, BelongsTo, } from 'sequelize-typescript'; import { CustomerBaseModel } from './customer-base.entity'; @Table({ tableName: 'customer_Individual', createdAt: false, updatedAt: false }) export class CustomerIndividualModel extends Model { @ForeignKey(() => CustomerBaseModel) @Column({ primaryKey: true, allowNull: false, type: DataType.STRING(30) }) declare CustomerId: string; @Column({ allowNull: false, type: DataType.STRING(200) }) declare FullName: string; @Column({ allowNull: true, type: DataType.STRING(20) }) declare IdType: string; @Column({ allowNull: true, type: DataType.STRING(50) }) declare IdNo: string; @Column({ type: DataType.STRING(10) }) declare Title: string; @Column({ type: DataType.STRING(50) }) declare PreferredName: string; @Column({ type: DataType.DATE }) declare Birthdate: Date; @Column({ type: DataType.ENUM('Male', 'Female') }) declare Gender: 'Male' | 'Female'; @Column({ type: DataType.STRING(20) }) declare Ethnicity: string; @Column({ type: DataType.STRING(100) }) declare Nationality: string; @Column({ type: DataType.STRING(10) }) declare PreferredLanguage: string; @BelongsTo(() => CustomerBaseModel) declare CustomerBase: CustomerBaseModel; }