feat: refactor ComplexPosesService to remove unused defaultInsert method and improve findAll logic

fix: update PartnersService to use 'isNot' instead of 'not' for allocation checks

refactor: enhance BusinessActivityComplexesService to validate license activation before creating a complex

fix: adjust ComplexPosesService to ensure account allocation checks are accurate and handle errors properly

refactor: modify ConsumerMiddleware to set consumerData instead of partnerData for better clarity

feat: expand SaleInvoicesService to include additional fields in the invoice selection

chore: update business-activities module to include accounts-charge module for better organization

fix: ensure ComplexPosesService correctly handles account allocation during POS creation

feat: implement PartnerBusinessActivityAccountsCharge module with create functionality for account charges

refactor: streamline getPartnerBusinessActivityAllocationLimits utility for better clarity and functionality

chore: add migration script to update database schema with necessary constraints and foreign keys

feat: create DTO for accounts charge to validate incoming data
This commit is contained in:
2026-04-25 15:16:59 +03:30
parent 12506de863
commit b72e6c7194
36 changed files with 975 additions and 568 deletions
@@ -3221,8 +3221,8 @@ export const PosScalarFieldEnum = {
updated_at: 'updated_at',
complex_id: 'complex_id',
device_id: 'device_id',
account_id: 'account_id',
provider_id: 'provider_id'
provider_id: 'provider_id',
account_id: 'account_id'
} as const
export type PosScalarFieldEnum = (typeof PosScalarFieldEnum)[keyof typeof PosScalarFieldEnum]
@@ -3329,8 +3329,7 @@ export const PartnerAccountQuotaCreditScalarFieldEnum = {
id: 'id',
created_at: 'created_at',
updated_at: 'updated_at',
charge_transaction_id: 'charge_transaction_id',
allocation_id: 'allocation_id'
charge_transaction_id: 'charge_transaction_id'
} as const
export type PartnerAccountQuotaCreditScalarFieldEnum = (typeof PartnerAccountQuotaCreditScalarFieldEnum)[keyof typeof PartnerAccountQuotaCreditScalarFieldEnum]
@@ -3341,7 +3340,8 @@ export const LicenseAccountAllocationScalarFieldEnum = {
created_at: 'created_at',
updated_at: 'updated_at',
license_activation_id: 'license_activation_id',
account_id: 'account_id'
account_id: 'account_id',
credit_id: 'credit_id'
} as const
export type LicenseAccountAllocationScalarFieldEnum = (typeof LicenseAccountAllocationScalarFieldEnum)[keyof typeof LicenseAccountAllocationScalarFieldEnum]
@@ -3754,8 +3754,8 @@ export const PosOrderByRelevanceFieldEnum = {
serial_number: 'serial_number',
complex_id: 'complex_id',
device_id: 'device_id',
account_id: 'account_id',
provider_id: 'provider_id'
provider_id: 'provider_id',
account_id: 'account_id'
} as const
export type PosOrderByRelevanceFieldEnum = (typeof PosOrderByRelevanceFieldEnum)[keyof typeof PosOrderByRelevanceFieldEnum]
@@ -3834,8 +3834,7 @@ export type PartnerAccountQuotaChargeTransactionOrderByRelevanceFieldEnum = (typ
export const PartnerAccountQuotaCreditOrderByRelevanceFieldEnum = {
id: 'id',
charge_transaction_id: 'charge_transaction_id',
allocation_id: 'allocation_id'
charge_transaction_id: 'charge_transaction_id'
} as const
export type PartnerAccountQuotaCreditOrderByRelevanceFieldEnum = (typeof PartnerAccountQuotaCreditOrderByRelevanceFieldEnum)[keyof typeof PartnerAccountQuotaCreditOrderByRelevanceFieldEnum]
@@ -3844,7 +3843,8 @@ export type PartnerAccountQuotaCreditOrderByRelevanceFieldEnum = (typeof Partner
export const LicenseAccountAllocationOrderByRelevanceFieldEnum = {
id: 'id',
license_activation_id: 'license_activation_id',
account_id: 'account_id'
account_id: 'account_id',
credit_id: 'credit_id'
} as const
export type LicenseAccountAllocationOrderByRelevanceFieldEnum = (typeof LicenseAccountAllocationOrderByRelevanceFieldEnum)[keyof typeof LicenseAccountAllocationOrderByRelevanceFieldEnum]