29 lines
521 B
TypeScript
29 lines
521 B
TypeScript
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;
|
||
|
|
}
|