Files
psp_api/src/modules/partners/accounts/dto/account.dto.ts
T

25 lines
660 B
TypeScript
Raw Normal View History

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