2026-04-30 16:27:46 +03:30
|
|
|
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'
|
2026-03-07 11:25:11 +03:30
|
|
|
|
|
|
|
|
export class CreatePartnerDto {
|
|
|
|
|
@IsString()
|
2026-03-16 00:33:40 +03:30
|
|
|
@ApiProperty({ required: true })
|
2026-03-07 11:25:11 +03:30
|
|
|
name: string
|
|
|
|
|
|
|
|
|
|
@IsString()
|
2026-03-16 00:33:40 +03:30
|
|
|
@ApiProperty({ required: true })
|
|
|
|
|
code: string
|
2026-03-07 11:25:11 +03:30
|
|
|
|
2026-04-30 16:27:46 +03:30
|
|
|
@IsEnum(PartnerFiscalSwitchType)
|
2026-03-16 00:33:40 +03:30
|
|
|
@ApiProperty({ required: true })
|
2026-04-30 16:27:46 +03:30
|
|
|
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
|
2026-04-27 10:45:39 +03:30
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@ApiProperty({ required: false, type: 'string', format: 'binary' })
|
|
|
|
|
logo?: any
|
2026-03-07 11:25:11 +03:30
|
|
|
}
|
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
|
|
|
|
|
}
|