UNPKG

@tomei/product

Version:

NestJS package for product module

87 lines (86 loc) 3.08 kB
import { ProductVariantStatus, ProductVariantType } from '../../enum/product-variant.enum'; import { YN } from '../../enum/yn.enum'; import { ObjectBase } from '@tomei/general'; import { IProductVariantAttr } from '../../interfaces/product-variant-attr.interface'; import { LoginUser } from '@tomei/sso'; import { IProductVariantUpdate } from '../../interfaces/product-variant-update.interface'; export declare class ProductVariant extends ObjectBase { ObjectId: string; ObjectName: string; TableName: string; ObjectType: string; private _ProductId; private _Name; private _Description; private _SKU; private _Size; private _Colour; private _Type; private _Level; private _ParentId; private _MinWeight; private _MaxWeight; private _MinWidth; private _MaxWidth; private _MinHeight; private _MaxHeight; private _MinLength; private _MaxLength; private _Status; private _UpdatedSSYN; private _CreatedAt; private _UpdatedAt; private _CreatedById; private _UpdatedById; private static _Repo; get VariantId(): string; set VariantId(VariantId: string); get Name(): string; set Name(Name: string); get Description(): string; set Description(Description: string); get Type(): ProductVariantType; set Type(Type: ProductVariantType); get ProductId(): string; set ProductId(ProductId: string); get Level(): number; set Level(Level: number); get CreatedAt(): Date; get UpdatedAt(): Date; get CreatedById(): string; get UpdatedById(): string; get UpdatedSSYN(): YN; get SKU(): string; get Size(): string; get Colour(): string; get MinWeight(): number; get MaxWeight(): number; get MinWidth(): number; get MaxWidth(): number; get MinHeight(): number; get MaxHeight(): number; get MinLength(): number; get MaxLength(): number; get ParentId(): string | null; get Status(): ProductVariantStatus; set Status(Status: ProductVariantStatus); setSKU(SKU: string): Promise<void>; setParentId(ParentId: string): Promise<void>; isProductIdMissing(): boolean; setSize(Size: string): Promise<void>; setColour(Colour: string): Promise<void>; setMinMax(type: ProductVariantType.HEIGHT | ProductVariantType.LENGTH | ProductVariantType.WEIGHT | ProductVariantType.WIDTH, min: number, max: number): Promise<void>; validateType(): void; protected constructor(variantAttr?: IProductVariantAttr); static init(variantId?: string, dbTransaction?: any): Promise<ProductVariant>; static findAll(productId: string, loginUser: LoginUser, page?: number, row?: number, dbTransaction?: any): Promise<{ count: any; rows: any; }>; create(loginUser: LoginUser, dbTransaction?: any): Promise<this>; update(payload: IProductVariantUpdate, loginUser: LoginUser, dbTransaction?: any): Promise<this>; delete(loginUser: LoginUser, dbTransaction?: any): Promise<{ MessageCode: string; Message: string; }>; }