17 lines
439 B
TypeScript
17 lines
439 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { Type } from 'class-transformer';
|
|
import { IsNumber, IsOptional, IsString, Min } from 'class-validator';
|
|
|
|
export class OpenCashShiftDto {
|
|
@ApiProperty({ description: 'Opening cash amount in drawer', minimum: 0 })
|
|
@Type(() => Number)
|
|
@IsNumber()
|
|
@Min(0)
|
|
openingAmount!: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
notes?: string;
|
|
}
|