Files
CRM_Montzar/apps/api/src/finance/dto.ts
T

29 lines
521 B
TypeScript
Raw Normal View History

import { IsIn, IsOptional, IsString, MaxLength } from 'class-validator';
const CHEQUE_STATUSES = ['pending', 'cleared', 'bounced'] as const;
export class UpdateChequeDto {
@IsOptional()
@IsString()
@MaxLength(80)
number?: string;
@IsOptional()
@IsString()
@MaxLength(120)
bank?: string;
@IsOptional()
@IsString()
dueDate?: string;
@IsOptional()
@IsIn(CHEQUE_STATUSES)
status?: (typeof CHEQUE_STATUSES)[number];
@IsOptional()
@IsString()
@MaxLength(2000)
notes?: string | null;
}