Refactor Partner and POS models to replace 'serial' with 'serial_number' and update related services and DTOs

- Updated PartnerAccountQuotaAllocation model to change license relation.
- Refactored Pos model to replace 'serial' with 'serial_number' across all references.
- Modified BusinessActivitiesService to include license activation details in responses.
- Adjusted ComplexPosesService to reflect changes in the Pos model.
- Updated PartnerService to include a new method for updating partner profiles.
- Created UpdatePartnerProfileDto for partner profile updates.
- Added migration to drop 'serial' column and add unique 'serial_number' column in poses table.
This commit is contained in:
2026-04-24 02:20:15 +03:30
parent a350ec7990
commit 11488093a7
26 changed files with 285 additions and 173 deletions
@@ -7,13 +7,13 @@ import { ResponseMapper } from 'common/response/response-mapper'
export class BusinessActivityComplexesService {
constructor(private readonly prisma: PrismaService) {}
defaultSelect = {
defaultSelect: ComplexSelect = {
id: true,
name: true,
address: true,
tax_id: true,
branch_code: true,
created_at: true,
} as ComplexSelect
}
async findAll(consumer_id: string, business_activity_id: string) {
const accounts = await this.prisma.complex.findMany({
@@ -12,7 +12,7 @@ export class ComplexPosesService {
id: true,
name: true,
model: true,
serial: true,
serial_number: true,
status: true,
created_at: true,
pos_type: true,
@@ -136,8 +136,6 @@ export class PartnerAccountChargeTransactionService {
}
const createdAllocations = await Promise.all(accountCreationPromises)
console.log(createdAllocations)
if (
createdAllocations.some(
createdAllocation => createdAllocation.activation_id === null,