init to partner module
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { AccountStatus, PartnerRole } from 'generated/prisma/enums'
|
||||
|
||||
export class CreatePartnerAccountDto {
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
username: string
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
password: string
|
||||
|
||||
@IsEnum(PartnerRole)
|
||||
@ApiProperty({ required: true, enum: PartnerRole })
|
||||
role: PartnerRole
|
||||
}
|
||||
|
||||
export class UpdateAccountDto extends PartialType(CreatePartnerAccountDto) {
|
||||
@IsOptional()
|
||||
@IsEnum(AccountStatus)
|
||||
@ApiProperty({ enum: AccountStatus })
|
||||
status?: AccountStatus
|
||||
}
|
||||
Reference in New Issue
Block a user