add desc
This commit is contained in:
@@ -72,6 +72,12 @@ export class CreateInvoiceDto {
|
||||
@IsString()
|
||||
paymentMethod?: string
|
||||
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiPropertyOptional()
|
||||
description?: string;
|
||||
|
||||
// @IsArray()
|
||||
// @Type(() => IAttachment)
|
||||
// @ApiProperty({ type: [IAttachment] })
|
||||
|
||||
@@ -96,4 +96,7 @@ export class Invoice extends BaseEntity {
|
||||
@Property({ type: 'string', nullable: true })
|
||||
paymentMethod?: string;
|
||||
|
||||
@Property({ type: 'text', nullable: true })
|
||||
description?: string;
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export class InvoiceController {
|
||||
|
||||
@Get('admin/invoice/:id')
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@ApiOperation({ summary: 'Get one invoice by id' })
|
||||
@ApiOperation({ summary: 'Get one invoice by id (admin)' })
|
||||
findOneAsAdmin(@Param('id') id: string) {
|
||||
return this.invoiceService.findOneAsAdmin(id);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ export class InvoiceService {
|
||||
balance: 0,
|
||||
attachments: [],
|
||||
paymentMethod: dto.paymentMethod,
|
||||
invoiceNumber:20
|
||||
invoiceNumber: 20,
|
||||
description: dto.description
|
||||
});
|
||||
em.persist(invoice);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user