think/packages/server/src/dtos/collect.dto.ts

13 lines
457 B
TypeScript
Raw Normal View History

2022-02-20 11:51:55 +00:00
import { IsNotEmpty, IsString } from 'class-validator';
import { CollectType } from '@think/share';
export class CollectDto {
@IsString({ message: '收藏目标Id类型错误正确类型为String' })
@IsNotEmpty({ message: '收藏目标Id不能为空' })
targetId: string;
@IsString({ message: '收藏目标类型类型错误正确类型为String' })
@IsNotEmpty({ message: '用户密码不能为空' })
type: CollectType;
}