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

13 lines
459 B
TypeScript
Raw Normal View History

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