feat: add consumer accounts and business activities management

- Implemented AccountsService for managing consumer accounts including create, update, delete, and find operations.
- Created DTOs for account creation and updates.
- Developed BusinessActivitiesController and BusinessActivitiesService for handling business activities related to consumers.
- Added complexes management with ComplexesController and ComplexesService.
- Introduced POS management with ComplexPosesController and ComplexPosesService.
- Created necessary DTOs for business activities and POS.
- Established Licenses management with LicensesController and LicensesService.
- Integrated consumer management with PartnerConsumersController and PartnerConsumersService.
- Added Prisma module imports and service connections across modules.
This commit is contained in:
2026-04-23 20:59:39 +03:30
parent f9e1ad69dc
commit a350ec7990
104 changed files with 13233 additions and 4105 deletions
-1
View File
@@ -11,7 +11,6 @@ export class PosController {
@Get()
async getInfo(@PosInfo('pos_id') pos_id: string, @Res({ passthrough: true }) res) {
console.log('getInfo', pos_id)
const result = await this.service.getInfo(pos_id)
if (result) {
+36 -4
View File
@@ -18,11 +18,32 @@ export class PosService {
select: {
id: true,
name: true,
tax_id: true,
business_activity: {
select: {
id: true,
name: true,
economic_code: true,
license_activation: {
select: {
expires_at: true,
license: {
select: {
id: true,
charge_transaction: {
select: {
partner: {
select: {
id: true,
name: true,
code: true,
},
},
},
},
},
},
},
},
guild: {
select: {
id: true,
@@ -37,21 +58,32 @@ export class PosService {
},
})
const { name, complex } = pos
const { name: complexName, id: complexId, tax_id, business_activity } = complex
const { name: businessName, id: businessId, guild } = business_activity
const { name: complexName, id: complexId, business_activity } = complex
const {
name: businessName,
id: businessId,
guild,
economic_code,
license_activation,
} = business_activity
return ResponseMapper.single({
name,
complex: {
id: complexId,
name: complexName,
tax_id,
},
businessActivity: {
id: businessId,
name: businessName,
economic_code,
},
guild,
license_info: {
expires_at: license_activation?.expires_at,
license_id: license_activation?.license.id,
},
partner: license_activation?.license.charge_transaction.partner,
})
}