Files
psp_api/src/modules/admin/partners/dto/partner.dto.ts
T

50 lines
1.1 KiB
TypeScript
Raw Normal View History

import { PartnerFiscalSwitchType, PartnerStatus } from '@/generated/prisma/enums'
2026-03-16 00:33:40 +03:30
import { ApiProperty, PartialType } from '@nestjs/swagger'
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
export class CreatePartnerDto {
@IsString()
2026-03-16 00:33:40 +03:30
@ApiProperty({ required: true })
name: string
@IsString()
2026-03-16 00:33:40 +03:30
@ApiProperty({ required: true })
code: string
@IsEnum(PartnerFiscalSwitchType)
2026-03-16 00:33:40 +03:30
@ApiProperty({ required: true })
fiscal_switch_type: PartnerFiscalSwitchType
// @IsOptional()
// @IsNumber()
// @ApiProperty({ required: true })
// license_quota?: number
2026-03-16 00:33:40 +03:30
@IsString()
@ApiProperty({ required: true })
username: string
@IsString()
@ApiProperty({ required: true })
password: string
@IsOptional()
@ApiProperty({ required: false, type: 'string', format: 'binary' })
logo?: any
}
2026-03-14 16:26:44 +03:30
2026-03-16 00:33:40 +03:30
export class UpdatePartnerDto extends PartialType(CreatePartnerDto) {
@IsEnum(PartnerStatus)
@ApiProperty({ enum: PartnerStatus })
status: PartnerStatus
}
2026-04-06 18:33:04 +03:30
export class LicenseChargeDto {
@IsNumber()
@ApiProperty({
required: true,
minimum: 0,
})
count: number
}