add description
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-17 19:40:07 +03:30
parent 915266f7b4
commit a55d65e56c
4 changed files with 17 additions and 1 deletions
@@ -3097,6 +3097,15 @@
"length": 255, "length": 255,
"mappedType": "string" "mappedType": "string"
}, },
"description": {
"name": "description",
"type": "text",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"mappedType": "text"
},
"type_id": { "type_id": {
"name": "type_id", "name": "type_id",
"type": "char(26)", "type": "char(26)",
+1 -1
View File
@@ -56,7 +56,7 @@ export class CreateOrderAsAdminDto {
@IsArray() @IsArray()
attachments: IAttachment[]; attachments: IAttachment[];
@ApiPropertyOptional() @ApiPropertyOptional({ description: 'Order description' })
@IsOptional() @IsOptional()
@IsString() @IsString()
description?: string; description?: string;
@@ -46,6 +46,9 @@ export class Order extends BaseEntity {
@Property({ type: 'string', nullable: true }) @Property({ type: 'string', nullable: true })
title?: string title?: string
@Property({ type: 'text', nullable: true })
description?: string
@ManyToOne(() => Category) @ManyToOne(() => Category)
type: Category type: Category
@@ -126,6 +126,7 @@ export class OrderService {
type, type,
product: product ?? null, product: product ?? null,
title: dto.title, title: dto.title,
description: dto.description,
status: OrderStatusEnum.CREATED, status: OrderStatusEnum.CREATED,
estimatedDays: dto.estimatedDays, estimatedDays: dto.estimatedDays,
invoiceItem, invoiceItem,
@@ -253,6 +254,9 @@ export class OrderService {
if (dto.title !== undefined) { if (dto.title !== undefined) {
order.title = dto.title; order.title = dto.title;
} }
if (dto.description !== undefined) {
order.description = dto.description;
}
if (dto.productId !== undefined) { if (dto.productId !== undefined) {
if (dto.productId == null || dto.productId === '') { if (dto.productId == null || dto.productId === '') {
order.product = null; order.product = null;