UNPKG

@tomei/product

Version:

NestJS package for product module

56 lines (44 loc) 1.16 kB
import { Column, DataType, Table, Model, ForeignKey, BelongsTo, CreatedAt, UpdatedAt, } from 'sequelize-typescript'; import { SettingsCategoryModel } from './settings-category.entity'; import { StatusEnum } from '../enum/status.enum'; @Table({ tableName: 'product_PlatformCategoryMapping' }) export class SettingsPlatformCategoryMappingModel extends Model { @Column({ primaryKey: true }) MappingId: string; @ForeignKey(() => SettingsCategoryModel) @Column({ allowNull: false, type: DataType.STRING(10), }) Code: string; @Column({ type: DataType.STRING(30) }) Platform: string; @Column({ type: DataType.STRING(200) }) PlatformCategoryName: string; @Column({ type: DataType.STRING(30) }) PlatformCategoryId: string; @Column({ type: DataType.ENUM('Active', 'Deleted'), defaultValue: 'Active', }) Status: StatusEnum; @Column({ type: DataType.STRING(30) }) CreatedById: string; @CreatedAt CreatedAt: Date; @Column({ type: DataType.STRING(30) }) UpdatedById: string; @UpdatedAt UpdatedAt: Date; @BelongsTo(() => SettingsCategoryModel) Category: SettingsCategoryModel; }