"""Payment Allocation Ledger Adjustment model.""" from sqlalchemy import Column from sqlalchemy import Integer from moneyhub.config import Config from moneyhub.constants.constants import Environment from moneyhub.models.snowflake_base import BaseModel class PaymentAllocationLedgerAdjustmentReplica(BaseModel): """Payment Allocation Ledger Adjustment model.""" __tablename__ = 'payment_allocation_ledger_adjustment' if Config.ENVIRONMENT != Config.TEST_ENVIRONMENT: if Config.ENVIRONMENT in [Environment.QA, Environment.DEV]: env = 'QA_ROYALTY_ACCOUNTING_ROYALTY_ACCOUNTING' else: env = 'PROD_ROYALTY_ACCOUNTING_ROYALTY_ACCOUNTING' __table_args__ = {'schema': f'ORCHARD_APP_REPORTING_V2.{env}'} payment_allocation_ledger_adjustment_id = Column(Integer, nullable=False, primary_key=True) payment_allocation_id = Column(Integer, nullable=False) ledger_adjustment_applied_id = Column(Integer, nullable=False)