| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // apps/box-app-api/src/feature/video/dto/video-list-request.dto.ts
- import { ApiProperty } from '@nestjs/swagger';
- import { IsNumber, IsString, IsOptional, Min, Max, IsBoolean } from 'class-validator';
- export class VideoListRequestDto {
- @ApiProperty({
- description: '页码,从1开始',
- example: 1,
- minimum: 1,
- })
- @IsNumber()
- @Min(1)
- page?: number;
- @ApiProperty({
- description: '每页数量,最多100条',
- example: 20,
- minimum: 1,
- maximum: 100,
- })
- @IsNumber()
- @Min(1)
- @Max(100)
- size: number;
- @ApiProperty({
- description: '关键词',
- required: false,
- })
- @IsOptional()
- @IsString()
- keyword?: string;
- @ApiProperty({
- required: false,
- description: '标签名称(可选,用于过滤)',
- example: '推荐',
- })
- @IsOptional()
- @IsString()
- tag?: string;
- @ApiProperty({
- required: false,
- description: '是否随机',
- })
- @IsOptional()
- @IsBoolean()
- random?: boolean;
- }
|