src/shared/dto/file.dto.ts
Properties |
| base64String |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/shared/dto/file.dto.ts:24
|
| fileType |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/shared/dto/file.dto.ts:28
|
| originalname |
Type : string
|
Decorators :
@ApiProperty({type: 'string'})
|
|
Defined in src/shared/dto/file.dto.ts:20
|
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import {
IsString,
IsNotEmpty,
MinLength,
MaxLength,
IsDefined,
ValidateNested,
IsNotEmptyObject,
IsObject,
} from "class-validator";
export class FileDTO {
@ApiProperty({ type: "string" })
@IsString()
@IsNotEmpty()
@MinLength(3)
@MaxLength(300)
originalname: string;
@IsNotEmpty()
@IsString()
base64String: string;
@IsNotEmpty()
@IsString()
fileType: string;
}
export class IReportDTO {
@ApiProperty({ type: "string" })
@IsString()
@IsNotEmpty()
@MinLength(3)
@MaxLength(300)
data: string;
@IsDefined()
@IsNotEmptyObject()
@IsObject()
@ValidateNested()
@Type(() => FileDTO)
file: FileDTO;
}