import { ApiProperty } from '@nestjs/swagger'; import { IsString, IsNotEmpty, Length } from 'class-validator'; /** * 激活卡密 DTO */ export class ActivateLicenseDto { @ApiProperty({ description: '卡密码', example: 'ABCD-1234-EFGH-5678', minLength: 19, maxLength: 19, }) @IsString() @IsNotEmpty({ message: '卡密不能为空' }) @Length(19, 19, { message: '卡密格式不正确' }) code: string; }