2026-03-07 11:25:11 +03:30
|
|
|
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
|
|
|
|
import { AccountStatus, AccountType } from 'generated/prisma/enums'
|
|
|
|
|
import { CreateUserDto } from '../../../users/dto/user.dto'
|
|
|
|
|
|
|
|
|
|
export class CreateAccountDto extends CreateUserDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
username: string
|
|
|
|
|
|
2026-03-14 16:26:44 +03:30
|
|
|
@IsOptional()
|
|
|
|
|
@IsEnum(AccountType)
|
|
|
|
|
type?: AccountType
|
2026-03-07 11:25:11 +03:30
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
password: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class UpdateAccountDto {
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
username?: string
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsEnum(AccountType)
|
|
|
|
|
type?: AccountType
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsEnum(AccountStatus)
|
|
|
|
|
status?: AccountStatus
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
password?: string
|
|
|
|
|
|
2026-03-14 16:26:44 +03:30
|
|
|
// @IsOptional()
|
|
|
|
|
// @IsString()
|
|
|
|
|
// user_id?: string
|
2026-03-07 11:25:11 +03:30
|
|
|
}
|