pop product
This commit is contained in:
@@ -83,6 +83,44 @@ class SaleFormatDTO {
|
||||
|
||||
//#################################
|
||||
|
||||
class VariantProductCategoryDTO {
|
||||
@Expose()
|
||||
_id: string;
|
||||
|
||||
@Expose()
|
||||
title_fa: string;
|
||||
|
||||
@Expose()
|
||||
theme: string;
|
||||
}
|
||||
|
||||
class VariantProductDTO {
|
||||
@Expose()
|
||||
_id: number;
|
||||
|
||||
@Expose()
|
||||
title_fa: string;
|
||||
|
||||
@Expose()
|
||||
title_en: string;
|
||||
|
||||
@Expose()
|
||||
status: string;
|
||||
|
||||
@Expose()
|
||||
model: string;
|
||||
|
||||
@Expose()
|
||||
@Type(() => ImagesUrlDTO)
|
||||
images: ImagesUrlDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => VariantProductCategoryDTO)
|
||||
category: VariantProductCategoryDTO;
|
||||
}
|
||||
|
||||
//#################################
|
||||
|
||||
export class ThemeValueDTO {
|
||||
@Expose()
|
||||
_id: string;
|
||||
@@ -293,6 +331,10 @@ export class ProductVariantDTO {
|
||||
@Type(() => ThemeValueDTO)
|
||||
themeValue?: ThemeValueDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => VariantProductDTO)
|
||||
product?: VariantProductDTO;
|
||||
|
||||
public static transformProduct(data: IProductVariant): ProductVariantDTO {
|
||||
const productVariantDTO = plainToInstance(ProductVariantDTO, data, {
|
||||
excludeExtraneousValues: true,
|
||||
|
||||
Reference in New Issue
Block a user