41 lines
641 B
TypeScript
41 lines
641 B
TypeScript
import { Type } from 'class-transformer';
|
|
import {
|
|
IsEnum,
|
|
IsInt,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
Max,
|
|
MaxLength,
|
|
Min,
|
|
} from 'class-validator';
|
|
import { SurveyCampaignStatus } from '../../database/entities';
|
|
|
|
export class ListSurveyCampaignsQueryDto {
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
page = 1;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
@Max(100)
|
|
pageSize = 25;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(200)
|
|
search?: string;
|
|
|
|
@IsOptional()
|
|
@IsEnum(SurveyCampaignStatus)
|
|
status?: SurveyCampaignStatus;
|
|
|
|
@IsOptional()
|
|
@IsUUID('4')
|
|
coordinatorUserId?: string;
|
|
}
|