| 1234567891011121314151617181920212223 |
- import { ApiProperty } from '@nestjs/swagger';
- import { IsNotEmpty } from 'class-validator';
- import { CarousalTargetType } from '../enum/carousal-target-type.enum';
- export class CreateCarousalRequest {
- @ApiProperty({
- example: 'https://example.cc/1.jpg',
- })
- @IsNotEmpty({ message: '轮播图不能为空' })
- imageUrl: string;
- @ApiProperty()
- @IsNotEmpty({ message: '跳转类型不能为空' })
- targetType: CarousalTargetType;
- @ApiProperty({
- example: 'https://example.cc',
- })
- targetUrl: string;
- @ApiProperty()
- targetId: string;
- }
|