chore: add service list fetch for admin with filters
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { IsEnum, IsOptional, IsString } from "class-validator";
|
||||
import { Type } from "class-transformer";
|
||||
import { IsOptional, IsString } from "class-validator";
|
||||
|
||||
import { PaginationDto } from "../../../common/DTO/pagination.dto";
|
||||
import { CategoryMessage } from "../../../common/enums/message.enum";
|
||||
import { ServiceStatus } from "../enums/service-status.enum";
|
||||
|
||||
export class DanakServicesSearchQueryDto extends PaginationDto {
|
||||
@IsOptional()
|
||||
@@ -12,12 +12,18 @@ export class DanakServicesSearchQueryDto extends PaginationDto {
|
||||
categoryId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(ServiceStatus)
|
||||
@ApiPropertyOptional({ description: "services status", enum: ServiceStatus, example: ServiceStatus.ACTIVE })
|
||||
status?: ServiceStatus;
|
||||
@Type(() => Number)
|
||||
// @IsBoolean({ message: CategoryMessage.IS_ACTIVE_SHOULD_BE_BOOLEAN })
|
||||
@ApiPropertyOptional({ description: "service status", example: 1 })
|
||||
isActive?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsString({ message: CategoryMessage.SEARCH_QUERY_STRING })
|
||||
@ApiPropertyOptional({ description: "Search query", example: "search query" })
|
||||
q?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@ApiPropertyOptional({ description: "is danak suggest this service", example: 1 })
|
||||
isDanakSuggest?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user