product vriants bug
This commit is contained in:
@@ -4,7 +4,7 @@ import { IsString } from "class-validator";
|
||||
import { ApiProperty } from "../../../common/decorator/swggerDocs";
|
||||
import { ProductStatus } from "../../../common/enums/product.enum";
|
||||
import { BrandDTO } from "../../brand/DTO/brand.dto";
|
||||
import { CategoryTreeDTO, ColorDTO, Size_MeterageDTO } from "../../category/DTO/category.dto";
|
||||
import { CategoryTreeDTO } from "../../category/DTO/category.dto";
|
||||
import { ShipmentMethodDTO } from "../../shipment/DTO/shipment.dto";
|
||||
import { ShopDTO } from "../../shop/DTO/shop.dto";
|
||||
import { WarrantyDTO } from "../../warranty/DTO/warranty.dto";
|
||||
@@ -83,7 +83,7 @@ class SaleFormatDTO {
|
||||
|
||||
//#################################
|
||||
|
||||
class ThemeValueDTO {
|
||||
export class ThemeValueDTO {
|
||||
@Expose()
|
||||
_id: string;
|
||||
|
||||
@@ -141,18 +141,6 @@ export class ProductDetailVariantDTO {
|
||||
@Type(() => WarrantyDTO)
|
||||
warranty: WarrantyDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => ColorDTO)
|
||||
color?: ColorDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => Size_MeterageDTO)
|
||||
size?: Size_MeterageDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => Size_MeterageDTO)
|
||||
meterage?: Size_MeterageDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => ThemeValueDTO)
|
||||
themeValue?: ThemeValueDTO;
|
||||
@@ -302,16 +290,8 @@ export class ProductVariantDTO {
|
||||
saleFormat: SaleFormatDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => ColorDTO)
|
||||
color?: ColorDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => Size_MeterageDTO)
|
||||
size?: Size_MeterageDTO;
|
||||
|
||||
@Expose()
|
||||
@Type(() => Size_MeterageDTO)
|
||||
meterage?: Size_MeterageDTO;
|
||||
@Type(() => ThemeValueDTO)
|
||||
themeValue?: ThemeValueDTO;
|
||||
|
||||
public static transformProduct(data: IProductVariant): ProductVariantDTO {
|
||||
const productVariantDTO = plainToInstance(ProductVariantDTO, data, {
|
||||
|
||||
Reference in New Issue
Block a user