23 lines
575 B
TypeScript
23 lines
575 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsObject, IsString, ValidateIf } from 'class-validator';
|
|
import { QueryModelEntity } from '../entities/query-model.entity';
|
|
|
|
export class GetReportDataDto {
|
|
@ApiProperty({ name: 'group_name', required: true })
|
|
@IsString()
|
|
group_name: string;
|
|
|
|
@ApiProperty({ name: 'unique_name', required: true })
|
|
@IsString()
|
|
unique_name: string;
|
|
|
|
@ApiProperty({
|
|
name: 'query_model',
|
|
type: Object,
|
|
required: true,
|
|
})
|
|
@IsObject()
|
|
@ValidateIf((body) => body.query_model)
|
|
query_model: QueryModelEntity;
|
|
}
|