UNPKG

@tomei/product

Version:

NestJS package for product module

68 lines (52 loc) 1.32 kB
import { Column, CreatedAt, DataType, Model, Table, UpdatedAt, BelongsToMany, } from 'sequelize-typescript'; import { ProductModel } from './product.entity'; import { StoreProductModel } from './store-product.entity'; @Table({ tableName: 'store_Store' }) export class StoreModel extends Model { @Column({ allowNull: false, primaryKey: true, }) StoreId: string; @Column({ type: DataType.STRING(100) }) Brand: string; @Column({ type: DataType.STRING(200) }) Name: string; @Column({ type: DataType.STRING(1000) }) Description: string; @Column({ type: DataType.ENUM('Outlet', 'Marketplace', 'Webstore'), }) Type: string; @Column({ type: DataType.STRING(200) }) URL: string; @Column(DataType.STRING(20)) Platform: string; @Column({ type: DataType.STRING }) BuildingCode: string; @Column({ type: DataType.STRING(30) }) SSMarketplaceCode: string; @Column({ type: DataType.ENUM('Active', 'Deleted', 'Closed'), defaultValue: 'Active', }) Status: string; @Column({ type: DataType.STRING }) CreatedById: string; @CreatedAt CreatedAt: Date; @Column({ type: DataType.STRING }) UpdatedById: string; @UpdatedAt UpdatedAt: Date; @BelongsToMany(() => ProductModel, () => StoreProductModel) Products: ProductModel[]; }