2026-04-13 15:47:59 +03:30
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-05 01:33:30 +03:30
|
|
|
export class UpdatePartnerAccountDto extends PartialType(CreatePartnerAccountDto) {
|
2026-04-13 15:47:59 +03:30
|
|
|
@IsOptional()
|
|
|
|
|
@IsEnum(AccountStatus)
|
|
|
|
|
@ApiProperty({ enum: AccountStatus })
|
|
|
|
|
status?: AccountStatus
|
|
|
|
|
}
|