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:
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user