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

13 lines
459 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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