@tomei/product
Version:
NestJS package for product module
34 lines (30 loc) • 622 B
text/typescript
import {
Column,
Table,
Model,
DataType,
ForeignKey,
BelongsTo,
PrimaryKey,
} from 'sequelize-typescript';
import { ProductModel } from './product.entity';
({
tableName: 'product_Brand',
timestamps: false,
createdAt: false,
updatedAt: false,
})
export class ProductBrandModel extends Model {
({ allowNull: false, unique: true, type: DataType.STRING(30) })
Brand: string;
(() => ProductModel)
({
allowNull: false,
type: DataType.STRING,
})
ProductId: string;
(() => ProductModel)
Product: ProductModel;
}