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) { @IsOptional() @IsEnum(AccountStatus) @ApiProperty({ enum: AccountStatus }) status?: AccountStatus }