attachment
This commit is contained in:
@@ -11,7 +11,6 @@ import {
|
||||
} from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IAttachment } from 'src/modules/order/interface/order.interface';
|
||||
|
||||
export class CreateInvoiceItemDto {
|
||||
@IsString()
|
||||
@@ -40,6 +39,16 @@ export class CreateInvoiceItemDto {
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export class IAttachmentDto {
|
||||
@IsString()
|
||||
@ApiProperty({ description: 'Attachment type' })
|
||||
type: string;
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ description: 'Attachment URL' })
|
||||
url: string;
|
||||
}
|
||||
|
||||
export class CreateInvoiceDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@@ -78,8 +87,8 @@ export class CreateInvoiceDto {
|
||||
@ApiPropertyOptional()
|
||||
description?: string;
|
||||
|
||||
// @IsArray()
|
||||
// @Type(() => IAttachment)
|
||||
// @ApiProperty({ type: [IAttachment] })
|
||||
// attachments: IAttachment[];
|
||||
@IsArray()
|
||||
@Type(() => IAttachmentDto)
|
||||
@ApiProperty({ type: [IAttachmentDto] })
|
||||
attachments: IAttachmentDto[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user