import { PartnerFiscalSwitchType, PartnerStatus } from '@/generated/prisma/enums' import { ApiProperty, PartialType } from '@nestjs/swagger' import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator' export class CreatePartnerDto { @IsString() @ApiProperty({ required: true }) name: string @IsString() @ApiProperty({ required: true }) code: string @IsEnum(PartnerFiscalSwitchType) @ApiProperty({ required: true }) fiscal_switch_type: PartnerFiscalSwitchType // @IsOptional() // @IsNumber() // @ApiProperty({ required: true }) // license_quota?: number @IsString() @ApiProperty({ required: true }) username: string @IsString() @ApiProperty({ required: true }) password: string @IsOptional() @ApiProperty({ required: false, type: 'string', format: 'binary' }) logo?: any } export class UpdatePartnerDto extends PartialType(CreatePartnerDto) { @IsEnum(PartnerStatus) @ApiProperty({ enum: PartnerStatus }) status: PartnerStatus } export class LicenseChargeDto { @IsNumber() @ApiProperty({ required: true, minimum: 0, }) count: number }