import { ApiProperty } from "@nestjs/swagger";
import { Transform } from "class-transformer";
import { IsOptional } from "class-validator";
import { Op } from "sequelize";
import { QueryDto } from "src/common/dto/query.dto";

export class PermissionQueryDto extends QueryDto {
  @ApiProperty({ required: false })
  @IsOptional()
  @Transform(({ value }) => ({ [Op.iLike]: `%${value}%` }))
  name: string;

}
