mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 19:58:11 +00:00
32 lines
661 B
TypeScript
32 lines
661 B
TypeScript
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsBoolean, IsNumber, IsOptional, IsString, Min } from 'class-validator';
|
|
|
|
export class GenerateInvoiceDto {
|
|
@ApiPropertyOptional({ description: 'Create even when the calculated amount is zero.' })
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
confirmZero?: boolean;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
performedBy?: string;
|
|
}
|
|
|
|
export class PayInvoiceBodyDto {
|
|
@ApiPropertyOptional()
|
|
@IsNumber()
|
|
@Min(0.01)
|
|
amount!: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
method?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
reference?: string;
|
|
}
|