41 lines
779 B
TypeScript
41 lines
779 B
TypeScript
import { IsOptional, IsString, IsInt, Min, IsIn } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
|
|
export class TicketListQueryDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
search?: string;
|
|
|
|
@IsOptional()
|
|
@IsIn(['open', 'in_progress', 'waiting_tenant', 'resolved', 'closed'])
|
|
status?: string;
|
|
|
|
@IsOptional()
|
|
@IsIn(['billing', 'technical', 'account', 'general', 'feature_request'])
|
|
category?: string;
|
|
|
|
@IsOptional()
|
|
@IsIn(['low', 'normal', 'high', 'urgent'])
|
|
priority?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
tenantId?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
assignedToId?: string;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
page?: number = 1;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
limit?: number = 20;
|
|
}
|