src/models/dto/register-model.dto.ts
Properties |
| authInfo |
Type : any
|
Decorators :
@IsJSON()
|
|
Defined in src/models/dto/register-model.dto.ts:31
|
| metricType |
Type : MetricType
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/models/dto/register-model.dto.ts:41
|
| modelUrl |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/models/dto/register-model.dto.ts:26
|
| name |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/models/dto/register-model.dto.ts:21
|
| projectID |
Type : number
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/models/dto/register-model.dto.ts:16
|
| provider |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/models/dto/register-model.dto.ts:36
|
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import {
IsEnum,
IsJSON,
IsNotEmpty,
IsNumber,
IsOptional,
IsString,
} from "class-validator";
import { MetricType } from "../entities/model.entity";
export class RegisterModelDto {
@IsNotEmpty()
@IsNumber()
@ApiProperty({ required: true })
projectID: number;
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
name: string;
@IsString()
@IsOptional()
@ApiPropertyOptional()
modelUrl: string;
@IsJSON()
@IsOptional()
@ApiPropertyOptional()
authInfo: any;
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
provider: string;
@IsNotEmpty()
@ApiProperty()
@IsEnum(MetricType, { each: true })
metricType: MetricType;
}
export class RegisterModelRequestDto {
@IsNotEmpty()
@IsNumber()
@ApiProperty({ required: true })
projectID: number;
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
requestTo: string;
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
requestedBy: string;
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
description: string;
}