product vriants bug

This commit is contained in:
morteza-mortezai
2025-11-29 15:04:24 +03:30
parent c0b8fd3cbf
commit 1f16897065
14 changed files with 86 additions and 590 deletions
+4 -24
View File
@@ -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, {