refactor(products): remove brand field from Product model and update related DTO and service
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -22,11 +22,6 @@ export class UpdateProductDto {
|
||||
@MaxLength(191)
|
||||
subcategory?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(191)
|
||||
brand?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
categoryId?: number | null;
|
||||
|
||||
@@ -164,7 +164,6 @@ export class ProductsService {
|
||||
normalizedName?: string;
|
||||
canonicalName?: string;
|
||||
category?: string | null;
|
||||
brand?: string | null;
|
||||
categoryId?: number | null;
|
||||
} = {};
|
||||
|
||||
@@ -193,10 +192,6 @@ export class ProductsService {
|
||||
updateData.category = data.category.trim() || null;
|
||||
}
|
||||
|
||||
if (typeof data.brand === 'string') {
|
||||
updateData.brand = data.brand.trim() || null;
|
||||
}
|
||||
|
||||
if ('categoryId' in data) {
|
||||
updateData.categoryId = data.categoryId ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user