@tomei/product
Version:
NestJS package for product module
125 lines (98 loc) • 2.58 kB
text/typescript
import {
BelongsTo,
Column,
CreatedAt,
DataType,
ForeignKey,
HasMany,
Model,
Table,
UpdatedAt,
} from 'sequelize-typescript';
import { ProductModel } from './product.entity';
import { YN } from '../enum/yn.enum';
import {
ProductVariantStatus,
ProductVariantType,
} from '../enum/product-variant.enum';
import { ProductVariantWithInventoryModel } from './product-variant-with-inventory.entity';
export class ProductVariantModel extends Model {
VariantId: string;
ProductId: string;
Name: string;
Description: string;
SKU: string;
Size: string;
Colour: string;
Type: ProductVariantType;
Level: number;
ParentId: string;
MinWeight: number;
MaxWeight: number;
MinWidth: number;
MaxWidth: number;
MinHeight: number;
MaxHeight: number;
MinLength: number;
MaxLength: number;
CreatedAt: Date;
UpdatedAt: Date;
Status: ProductVariantStatus;
CreatedById: string;
UpdatedById: string;
UpdatedSSYN: YN;
Product: ProductModel;
ProductVariantWithInventory: ProductVariantWithInventoryModel[];
}