UNPKG

@tomei/product

Version:

NestJS package for product module

54 lines (46 loc) 1.11 kB
import { ProductWithInventoryModel } from './product-with-inventory.entity'; import { Table, Model, BelongsTo, ForeignKey, Column, DataType, } from 'sequelize-typescript'; import { StockProfileModel } from '@tomei/stock'; @Table({ tableName: 'product_Jewellery', timestamps: false }) export class ProductJewelleryModel extends Model { @ForeignKey(() => ProductWithInventoryModel) @Column({ primaryKey: true, type: DataType.STRING(30), allowNull: false, }) ProductId: string; @ForeignKey(() => StockProfileModel) @Column({ primaryKey: true, type: DataType.STRING(30), allowNull: false, }) ProfileId: string; @Column({ type: DataType.STRING(200), allowNull: true, }) Surface: string; @Column({ type: DataType.STRING(200), allowNull: true, }) Uniqueness: string; @Column({ type: DataType.CHAR(1), allowNull: true, }) HasCertificateYN: string; @BelongsTo(() => ProductWithInventoryModel) ProductWithInventory: ProductWithInventoryModel; @BelongsTo(() => StockProfileModel) StockProfile: StockProfileModel; }