rwadurian/backend/services/identity-service/src/api/dto/request/freeze-account.dto.ts

11 lines
371 B
TypeScript

import { IsString, IsNotEmpty, MaxLength } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class FreezeAccountDto {
@ApiProperty({ example: '账户被盗', description: '冻结原因' })
@IsString()
@IsNotEmpty({ message: '请填写冻结原因' })
@MaxLength(200, { message: '冻结原因不能超过200字' })
reason: string;
}