Files
psp_api/src/modules/admin/partners/partnerAccounts/dto/account.dto.ts
T

37 lines
679 B
TypeScript
Raw Normal View History

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
@IsEnum(AccountStatus)
status: AccountStatus
@IsString()
password: string
}
export class UpdateAccountDto {
@IsOptional()
@IsString()
username?: string
@IsOptional()
@IsEnum(AccountType)
type?: AccountType
@IsOptional()
@IsEnum(AccountStatus)
status?: AccountStatus
@IsOptional()
@IsString()
password?: string
@IsOptional()
@IsString()
user_id?: string
}