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;
}
}
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();
return order;
@@ -4,7 +4,6 @@ import {
IsBoolean,
IsInt,
IsNotEmpty,
IsNumber,
IsOptional,
IsString,
Min,
@@ -32,12 +31,6 @@ export class CreateproductDto {
@IsOptional()
linkUrl: string;
@IsArray()
@Type(() => Number)
@IsNumber({}, { each: true })
@ApiPropertyOptional({ type: [Number] })
quantities: number[];
// @IsOptional()
// @IsInt()
// @Min(0)
@@ -16,10 +16,6 @@ export class Product extends BaseEntity {
@Property({ type: 'string' })
desc: string
@Property({ type: 'json' })
quantities: number[]
@Property({ type: 'text', nullable: true })
linkUrl?: string;
@@ -29,7 +29,6 @@ export class ProductService {
order: rest.order ?? null,
title: rest.title,
desc: rest.desc,
quantities: rest.quantities,
images: rest.images ?? undefined,
linkUrl: rest.linkUrl,
category,
-1
View File
@@ -24,7 +24,6 @@ export class ProductsSeeder {
category,
isActive: productData.isActive,
// prepareTime: 10,
quantities: [100, 200],
images: productData.images,
order: 1
});