File
|
name
|
Type : string
|
Decorators :
@IsNotEmpty() @IsString() @ApiProperty({required: true})
|
|
|
|
projectId
|
Type : number
|
Decorators :
@IsNotEmpty() @IsNumber() @ApiProperty({required: true})
|
|
|
|
sourceId
|
Type : number
|
Decorators :
@IsNotEmpty() @IsNumber() @ApiProperty({required: true})
|
|
|
|
sourceType
|
Type : MetricSources
|
Decorators :
@IsNotEmpty() @ApiProperty({required: true})
|
|
|
import { MetricSources } from "../../../metrics/entities/metrics.entity";
import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsNumber, IsString } from "class-validator";
export class MetricAlertTarget {
@IsNotEmpty()
@IsNumber()
@ApiProperty({ required: true })
projectId: number;
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
name: string;
@IsNotEmpty()
@ApiProperty({ required: true })
sourceType: MetricSources;
@IsNotEmpty()
@IsNumber()
@ApiProperty({ required: true })
sourceId: number;
}