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
@@ -62,8 +62,12 @@ export const ModelName = {
DeviceBrand: 'DeviceBrand',
Device: 'Device',
License: 'License',
ActivatedLicense: 'ActivatedLicense',
ChargedLicenseTransactions: 'ChargedLicenseTransactions',
LicenseActivation: 'LicenseActivation',
LicenseChargeTransaction: 'LicenseChargeTransaction',
LicenseRenew: 'LicenseRenew',
LicenseRenewChargeTransaction: 'LicenseRenewChargeTransaction',
PartnerAccountQuotaChargeTransaction: 'PartnerAccountQuotaChargeTransaction',
PartnerAccountQuotaAllocation: 'PartnerAccountQuotaAllocation',
PartnerAccount: 'PartnerAccount',
Partner: 'Partner',
PermissionConsumer: 'PermissionConsumer',
@@ -154,11 +158,13 @@ export type ConsumerAccountScalarFieldEnum = (typeof ConsumerAccountScalarFieldE
export const ConsumerScalarFieldEnum = {
id: 'id',
mobile_number: 'mobile_number',
national_code: 'national_code',
first_name: 'first_name',
last_name: 'last_name',
status: 'status',
created_at: 'created_at',
updated_at: 'updated_at'
updated_at: 'updated_at',
partner_id: 'partner_id'
} as const
export type ConsumerScalarFieldEnum = (typeof ConsumerScalarFieldEnum)[keyof typeof ConsumerScalarFieldEnum]
@@ -166,6 +172,7 @@ export type ConsumerScalarFieldEnum = (typeof ConsumerScalarFieldEnum)[keyof typ
export const BusinessActivityScalarFieldEnum = {
id: 'id',
economic_code: 'economic_code',
name: 'name',
created_at: 'created_at',
updated_at: 'updated_at',
@@ -179,8 +186,8 @@ export type BusinessActivityScalarFieldEnum = (typeof BusinessActivityScalarFiel
export const ComplexScalarFieldEnum = {
id: 'id',
name: 'name',
branch_code: 'branch_code',
address: 'address',
tax_id: 'tax_id',
created_at: 'created_at',
updated_at: 'updated_at',
business_activity_id: 'business_activity_id'
@@ -230,37 +237,88 @@ export type DeviceScalarFieldEnum = (typeof DeviceScalarFieldEnum)[keyof typeof
export const LicenseScalarFieldEnum = {
id: 'id',
accounts_limit: 'accounts_limit',
created_at: 'created_at',
updated_at: 'updated_at',
charged_license_transaction_id: 'charged_license_transaction_id'
charge_transaction_id: 'charge_transaction_id'
} as const
export type LicenseScalarFieldEnum = (typeof LicenseScalarFieldEnum)[keyof typeof LicenseScalarFieldEnum]
export const ActivatedLicenseScalarFieldEnum = {
export const LicenseActivationScalarFieldEnum = {
id: 'id',
starts_at: 'starts_at',
expires_at: 'expires_at',
created_at: 'created_at',
updated_at: 'updated_at',
license_id: 'license_id',
consumer_id: 'consumer_id'
business_activity_id: 'business_activity_id'
} as const
export type ActivatedLicenseScalarFieldEnum = (typeof ActivatedLicenseScalarFieldEnum)[keyof typeof ActivatedLicenseScalarFieldEnum]
export type LicenseActivationScalarFieldEnum = (typeof LicenseActivationScalarFieldEnum)[keyof typeof LicenseActivationScalarFieldEnum]
export const ChargedLicenseTransactionsScalarFieldEnum = {
export const LicenseChargeTransactionScalarFieldEnum = {
id: 'id',
activation_expires_at: 'activation_expires_at',
tracking_code: 'tracking_code',
purchased_count: 'purchased_count',
created_at: 'created_at',
updated_at: 'updated_at',
partner_id: 'partner_id'
} as const
export type ChargedLicenseTransactionsScalarFieldEnum = (typeof ChargedLicenseTransactionsScalarFieldEnum)[keyof typeof ChargedLicenseTransactionsScalarFieldEnum]
export type LicenseChargeTransactionScalarFieldEnum = (typeof LicenseChargeTransactionScalarFieldEnum)[keyof typeof LicenseChargeTransactionScalarFieldEnum]
export const LicenseRenewScalarFieldEnum = {
id: 'id',
expires_at: 'expires_at',
created_at: 'created_at',
updated_at: 'updated_at',
charge_transaction_id: 'charge_transaction_id',
activation_id: 'activation_id'
} as const
export type LicenseRenewScalarFieldEnum = (typeof LicenseRenewScalarFieldEnum)[keyof typeof LicenseRenewScalarFieldEnum]
export const LicenseRenewChargeTransactionScalarFieldEnum = {
id: 'id',
activation_expires_at: 'activation_expires_at',
tracking_code: 'tracking_code',
purchased_count: 'purchased_count',
created_at: 'created_at',
updated_at: 'updated_at',
partner_id: 'partner_id'
} as const
export type LicenseRenewChargeTransactionScalarFieldEnum = (typeof LicenseRenewChargeTransactionScalarFieldEnum)[keyof typeof LicenseRenewChargeTransactionScalarFieldEnum]
export const PartnerAccountQuotaChargeTransactionScalarFieldEnum = {
id: 'id',
activation_expires_at: 'activation_expires_at',
tracking_code: 'tracking_code',
purchased_count: 'purchased_count',
created_at: 'created_at',
updated_at: 'updated_at',
partner_id: 'partner_id'
} as const
export type PartnerAccountQuotaChargeTransactionScalarFieldEnum = (typeof PartnerAccountQuotaChargeTransactionScalarFieldEnum)[keyof typeof PartnerAccountQuotaChargeTransactionScalarFieldEnum]
export const PartnerAccountQuotaAllocationScalarFieldEnum = {
id: 'id',
created_at: 'created_at',
updated_at: 'updated_at',
charge_transaction_id: 'charge_transaction_id',
license_id: 'license_id'
} as const
export type PartnerAccountQuotaAllocationScalarFieldEnum = (typeof PartnerAccountQuotaAllocationScalarFieldEnum)[keyof typeof PartnerAccountQuotaAllocationScalarFieldEnum]
export const PartnerAccountScalarFieldEnum = {
@@ -631,8 +689,10 @@ export type ConsumerAccountOrderByRelevanceFieldEnum = (typeof ConsumerAccountOr
export const ConsumerOrderByRelevanceFieldEnum = {
id: 'id',
mobile_number: 'mobile_number',
national_code: 'national_code',
first_name: 'first_name',
last_name: 'last_name'
last_name: 'last_name',
partner_id: 'partner_id'
} as const
export type ConsumerOrderByRelevanceFieldEnum = (typeof ConsumerOrderByRelevanceFieldEnum)[keyof typeof ConsumerOrderByRelevanceFieldEnum]
@@ -640,6 +700,7 @@ export type ConsumerOrderByRelevanceFieldEnum = (typeof ConsumerOrderByRelevance
export const BusinessActivityOrderByRelevanceFieldEnum = {
id: 'id',
economic_code: 'economic_code',
name: 'name',
guild_id: 'guild_id',
consumer_id: 'consumer_id'
@@ -651,8 +712,8 @@ export type BusinessActivityOrderByRelevanceFieldEnum = (typeof BusinessActivity
export const ComplexOrderByRelevanceFieldEnum = {
id: 'id',
name: 'name',
branch_code: 'branch_code',
address: 'address',
tax_id: 'tax_id',
business_activity_id: 'business_activity_id'
} as const
@@ -692,28 +753,64 @@ export type DeviceOrderByRelevanceFieldEnum = (typeof DeviceOrderByRelevanceFiel
export const LicenseOrderByRelevanceFieldEnum = {
id: 'id',
charged_license_transaction_id: 'charged_license_transaction_id'
charge_transaction_id: 'charge_transaction_id'
} as const
export type LicenseOrderByRelevanceFieldEnum = (typeof LicenseOrderByRelevanceFieldEnum)[keyof typeof LicenseOrderByRelevanceFieldEnum]
export const ActivatedLicenseOrderByRelevanceFieldEnum = {
export const LicenseActivationOrderByRelevanceFieldEnum = {
id: 'id',
license_id: 'license_id',
consumer_id: 'consumer_id'
business_activity_id: 'business_activity_id'
} as const
export type ActivatedLicenseOrderByRelevanceFieldEnum = (typeof ActivatedLicenseOrderByRelevanceFieldEnum)[keyof typeof ActivatedLicenseOrderByRelevanceFieldEnum]
export type LicenseActivationOrderByRelevanceFieldEnum = (typeof LicenseActivationOrderByRelevanceFieldEnum)[keyof typeof LicenseActivationOrderByRelevanceFieldEnum]
export const ChargedLicenseTransactionsOrderByRelevanceFieldEnum = {
export const LicenseChargeTransactionOrderByRelevanceFieldEnum = {
id: 'id',
tracking_code: 'tracking_code',
partner_id: 'partner_id'
} as const
export type ChargedLicenseTransactionsOrderByRelevanceFieldEnum = (typeof ChargedLicenseTransactionsOrderByRelevanceFieldEnum)[keyof typeof ChargedLicenseTransactionsOrderByRelevanceFieldEnum]
export type LicenseChargeTransactionOrderByRelevanceFieldEnum = (typeof LicenseChargeTransactionOrderByRelevanceFieldEnum)[keyof typeof LicenseChargeTransactionOrderByRelevanceFieldEnum]
export const LicenseRenewOrderByRelevanceFieldEnum = {
id: 'id',
charge_transaction_id: 'charge_transaction_id',
activation_id: 'activation_id'
} as const
export type LicenseRenewOrderByRelevanceFieldEnum = (typeof LicenseRenewOrderByRelevanceFieldEnum)[keyof typeof LicenseRenewOrderByRelevanceFieldEnum]
export const LicenseRenewChargeTransactionOrderByRelevanceFieldEnum = {
id: 'id',
tracking_code: 'tracking_code',
partner_id: 'partner_id'
} as const
export type LicenseRenewChargeTransactionOrderByRelevanceFieldEnum = (typeof LicenseRenewChargeTransactionOrderByRelevanceFieldEnum)[keyof typeof LicenseRenewChargeTransactionOrderByRelevanceFieldEnum]
export const PartnerAccountQuotaChargeTransactionOrderByRelevanceFieldEnum = {
id: 'id',
tracking_code: 'tracking_code',
partner_id: 'partner_id'
} as const
export type PartnerAccountQuotaChargeTransactionOrderByRelevanceFieldEnum = (typeof PartnerAccountQuotaChargeTransactionOrderByRelevanceFieldEnum)[keyof typeof PartnerAccountQuotaChargeTransactionOrderByRelevanceFieldEnum]
export const PartnerAccountQuotaAllocationOrderByRelevanceFieldEnum = {
id: 'id',
charge_transaction_id: 'charge_transaction_id',
license_id: 'license_id'
} as const
export type PartnerAccountQuotaAllocationOrderByRelevanceFieldEnum = (typeof PartnerAccountQuotaAllocationOrderByRelevanceFieldEnum)[keyof typeof PartnerAccountQuotaAllocationOrderByRelevanceFieldEnum]
export const PartnerAccountOrderByRelevanceFieldEnum = {