UNPKG

@tomei/product

Version:

NestJS package for product module

41 lines (34 loc) 716 B
import { Column, CreatedAt, UpdatedAt, DataType, Table, Model, BelongsTo, ForeignKey, } from 'sequelize-typescript'; import { ProductModel } from './product.entity'; @Table({ tableName: 'product_CustomizeOption' }) export class ProductCustomizeOptionModel extends Model { @Column({ primaryKey: true, allowNull: false, type: DataType.STRING, }) CustomizeOptionId: string; @ForeignKey(() => ProductModel) @Column({ allowNull: false, type: DataType.STRING, }) ProductId: string; @Column({ type: DataType.STRING(100) }) Option: string; @CreatedAt CreatedAt: Date; @UpdatedAt UpdatedAt: Date; @BelongsTo(() => ProductModel) Product: ProductModel; }