remove quantites from product
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-03 16:56:19 +03:30
parent 9ae6a5b730
commit ad4c7323f4
5 changed files with 7 additions and 13 deletions
@@ -202,6 +202,13 @@ export class OrderService {
order.product = product; order.product = product;
} }
} }
if (dto.designerId !== undefined) {
if (dto.designerId == null || dto.designerId === '') {
order.designer = undefined;
} else {
order.designer = await this.adminService.findOrFail(dto.designerId);
}
}
await this.em.flush(); await this.em.flush();
return order; return order;
@@ -4,7 +4,6 @@ import {
IsBoolean, IsBoolean,
IsInt, IsInt,
IsNotEmpty, IsNotEmpty,
IsNumber,
IsOptional, IsOptional,
IsString, IsString,
Min, Min,
@@ -32,12 +31,6 @@ export class CreateproductDto {
@IsOptional() @IsOptional()
linkUrl: string; linkUrl: string;
@IsArray()
@Type(() => Number)
@IsNumber({}, { each: true })
@ApiPropertyOptional({ type: [Number] })
quantities: number[];
// @IsOptional() // @IsOptional()
// @IsInt() // @IsInt()
// @Min(0) // @Min(0)
@@ -16,10 +16,6 @@ export class Product extends BaseEntity {
@Property({ type: 'string' }) @Property({ type: 'string' })
desc: string desc: string
@Property({ type: 'json' })
quantities: number[]
@Property({ type: 'text', nullable: true }) @Property({ type: 'text', nullable: true })
linkUrl?: string; linkUrl?: string;
@@ -29,7 +29,6 @@ export class ProductService {
order: rest.order ?? null, order: rest.order ?? null,
title: rest.title, title: rest.title,
desc: rest.desc, desc: rest.desc,
quantities: rest.quantities,
images: rest.images ?? undefined, images: rest.images ?? undefined,
linkUrl: rest.linkUrl, linkUrl: rest.linkUrl,
category, category,
-1
View File
@@ -24,7 +24,6 @@ export class ProductsSeeder {
category, category,
isActive: productData.isActive, isActive: productData.isActive,
// prepareTime: 10, // prepareTime: 10,
quantities: [100, 200],
images: productData.images, images: productData.images,
order: 1 order: 1
}); });