Add modulos de usuario

This commit is contained in:
LeoMortari
2025-08-29 01:02:24 -03:00
parent eaa188fac0
commit 85aac808e9
18 changed files with 348 additions and 62 deletions

View File

@@ -1,36 +0,0 @@
import { Type } from 'class-transformer';
import { IsIn, IsInt, IsOptional, IsString, Max, Min } from 'class-validator';
export class PaginatedQueryDto {
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
page: number = 1;
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(1)
@Max(100)
perPage: number = 20;
@IsOptional()
@Type(() => String)
@IsString()
@IsIn(['asc', 'desc'])
direction: string = 'desc';
}
export type PaginatedResponse<T> = {
content: T[];
pagination: {
page: number;
direction: string;
perPage: number;
total: number;
totalPages: number;
hasNext: boolean;
hasPrev: boolean;
};
};