19 lines
600 B
TypeScript
19 lines
600 B
TypeScript
import { IsString, IsNotEmpty, MaxLength } from 'class-validator';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
export class RequestKeyRotationDto {
|
|
@ApiProperty({
|
|
example: 'abandon abandon ...',
|
|
description: '当前助记词(验证身份用)',
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty({ message: '请提供当前助记词' })
|
|
currentMnemonic: string;
|
|
|
|
@ApiProperty({ example: '安全起见主动轮换', description: '轮换原因' })
|
|
@IsString()
|
|
@IsNotEmpty({ message: '请填写轮换原因' })
|
|
@MaxLength(200, { message: '轮换原因不能超过200字' })
|
|
reason: string;
|
|
}
|