fix(expenses): fixes to dto
This commit is contained in:
parent
6e52bdb4e4
commit
db78c70eb0
|
|
@ -1,3 +1,4 @@
|
|||
import { Type } from "class-transformer";
|
||||
import { IsBoolean, IsDecimal, IsInt, IsOptional, IsString, MaxLength } from "class-validator";
|
||||
|
||||
export class ExpenseDto {
|
||||
|
|
@ -5,8 +6,8 @@ export class ExpenseDto {
|
|||
@IsString() type: string;
|
||||
@IsString() date: string;
|
||||
@IsBoolean() is_approved: boolean;
|
||||
@IsOptional() @IsDecimal() amount?: number;
|
||||
@IsOptional() @IsDecimal() mileage?: number;
|
||||
@IsOptional() @Type(()=> Number) amount?: number;
|
||||
@IsOptional() @Type(()=> Number) mileage?: number;
|
||||
@IsOptional() @IsInt() attachment?: number;
|
||||
@IsOptional() @IsInt() timesheet_id?: number;
|
||||
@IsOptional() @IsString() @MaxLength(280) comment: string;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user