All files / apps/audit-service/src/audit/dto list-activity-query.dto.ts

100% Statements 8/8
100% Branches 0/0
100% Functions 1/1
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 243x 3x   3x   4x       9x               3x       3x    
import { Type } from 'class-transformer';
import { IsInt, IsOptional, IsUUID, Matches, Max, Min } from 'class-validator';
 
export class ListActivityQueryDto {
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  @Max(100)
  limit = 20;
 
  /**
   * Keyset cursor: the `nextCursor` returned by the previous page (the
   * bigserial id of its last row). Opaque to clients beyond "pass it back".
   */
  @IsOptional()
  @Matches(/^\d+$/)
  cursor?: string;
 
  @IsOptional()
  @IsUUID()
  workOrderId?: string;
}