transform core api codes into this project, update modules as admin/pos context modules
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user