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";
|
import { IsBoolean, IsDecimal, IsInt, IsOptional, IsString, MaxLength } from "class-validator";
|
||||||
|
|
||||||
export class ExpenseDto {
|
export class ExpenseDto {
|
||||||
|
|
@ -5,8 +6,8 @@ export class ExpenseDto {
|
||||||
@IsString() type: string;
|
@IsString() type: string;
|
||||||
@IsString() date: string;
|
@IsString() date: string;
|
||||||
@IsBoolean() is_approved: boolean;
|
@IsBoolean() is_approved: boolean;
|
||||||
@IsOptional() @IsDecimal() amount?: number;
|
@IsOptional() @Type(()=> Number) amount?: number;
|
||||||
@IsOptional() @IsDecimal() mileage?: number;
|
@IsOptional() @Type(()=> Number) mileage?: number;
|
||||||
@IsOptional() @IsInt() attachment?: number;
|
@IsOptional() @IsInt() attachment?: number;
|
||||||
@IsOptional() @IsInt() timesheet_id?: number;
|
@IsOptional() @IsInt() timesheet_id?: number;
|
||||||
@IsOptional() @IsString() @MaxLength(280) comment: string;
|
@IsOptional() @IsString() @MaxLength(280) comment: string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user