@tomei/customer-base
Version:
Tomei Customer Base Package
38 lines (29 loc) • 1.03 kB
text/typescript
import {
Table,
Model,
Column,
DataType,
ForeignKey,
BelongsTo,
} from 'sequelize-typescript';
import { CustomerBusinessModel } from './customer-business.entity';
@Table({ tableName: 'business_Contact', createdAt: false, updatedAt: false })
export class BusinessContactModel extends Model {
@Column({ primaryKey: true, allowNull: false, type: DataType.STRING(30) })
declare ContactId: string;
@ForeignKey(() => CustomerBusinessModel)
@Column({ allowNull: false, type: DataType.STRING(30) })
declare CustomerId: string;
@Column({ allowNull: false, type: DataType.STRING(200) })
declare Name: string;
@Column({ type: DataType.STRING(50) })
declare Email: string;
@Column({ allowNull: false, type: DataType.STRING(20) })
declare ContactNo: string;
@Column({ type: DataType.STRING(30) })
declare Position: string;
@Column({ allowNull: false, type: DataType.STRING(1) })
declare IsMainYN: string;
@BelongsTo(() => CustomerBusinessModel)
declare Business: CustomerBusinessModel;
}