feat: add in-game social test lab
This commit is contained in:
@@ -36,7 +36,8 @@ import {
|
||||
IsOptional,
|
||||
Length,
|
||||
IsNotEmpty,
|
||||
IsEnum
|
||||
IsEnum,
|
||||
IsBoolean
|
||||
} from 'class-validator';
|
||||
import { UserStatus } from './user_status.enum';
|
||||
import { USER_ROLES, FIELD_LIMITS } from './users.constants';
|
||||
@@ -91,6 +92,10 @@ export class CreateUserDto {
|
||||
@Length(1, FIELD_LIMITS.USERNAME_MAX_LENGTH, { message: `用户名长度需在1-${FIELD_LIMITS.USERNAME_MAX_LENGTH}字符之间` })
|
||||
username: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
is_test_account?: boolean;
|
||||
|
||||
/**
|
||||
* 邮箱地址
|
||||
*
|
||||
@@ -272,4 +277,4 @@ export class CreateUserDto {
|
||||
@IsOptional()
|
||||
@IsEnum(UserStatus, { message: '用户状态必须是有效的枚举值' })
|
||||
status?: UserStatus = UserStatus.ACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user