feat: init fitness-coach (backend + miniprogram)
- backend: NestJS service with exercise/plan data - miniprogram: WeChat mini program client - exclude node_modules, dist, runtime data-store, local env
This commit is contained in:
49
backend/src/exercises/dto/query-exercises.dto.ts
Normal file
49
backend/src/exercises/dto/query-exercises.dto.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { IsOptional, IsString, IsInt, Min, Max, IsIn } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class QueryExercisesDto {
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
page = 1;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(50)
|
||||
pageSize = 20;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
bodyPart?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
equipment?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
target?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
muscleGroup?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['strength', 'cardio', 'flexibility'])
|
||||
type?: 'strength' | 'cardio' | 'flexibility';
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
secondary?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
q?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['default', 'name'])
|
||||
sort?: 'default' | 'name' = 'default';
|
||||
}
|
||||
Reference in New Issue
Block a user