diff --git a/src/transactions/dto/audit-log-query.dto.ts b/src/transactions/dto/audit-log-query.dto.ts new file mode 100644 index 0000000..0d9403a --- /dev/null +++ b/src/transactions/dto/audit-log-query.dto.ts @@ -0,0 +1,31 @@ +import { Type } from 'class-transformer'; +import { IsISO8601, IsOptional, IsString, IsInt, Min, Max } from 'class-validator'; + +export class AuditLogQueryDto { + @IsOptional() + @IsString() + actorId?: string; + + @IsOptional() + @IsISO8601() + @Type(() => Date) + dateFrom?: Date; + + @IsOptional() + @IsISO8601() + @Type(() => Date) + dateTo?: Date; + + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + page?: number = 1; + + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + @Max(100) + limit?: number = 20; +}