Skip to content

Models

components.payment_gateway.subcomponents.payments.models.helpers

load_all_models

load_all_models()
Source code in components/payment_gateway/subcomponents/payments/models/helpers.py
def load_all_models() -> list[type[DbModel]]:
    from components.payment_gateway.subcomponents.payments.models.payment_request import (
        PaymentRequest,
    )

    return [
        PaymentRequest,
    ]

components.payment_gateway.subcomponents.payments.models.payment_request

PaymentRequest

Bases: ProviderEntityMixin, BaseModel

__table_args__

__table_args__()
Source code in components/payment_gateway/subcomponents/payments/models/payment_request.py
@declared_attr.directive
def __table_args__(cls) -> tuple[Any, ...]:
    return cls._provider_entity_mixin_table_args() + (
        {"schema": PAYMENT_GATEWAY_SCHEMA_NAME},
    )

__tablename__ class-attribute instance-attribute

__tablename__ = 'payment_request'

account class-attribute instance-attribute

account = relationship(Account, foreign_keys=[account_id])

account_id class-attribute instance-attribute

account_id = mapped_column(
    UUID(as_uuid=True),
    ForeignKey(id),
    index=True,
    nullable=False,
)

bank_transfer class-attribute instance-attribute

bank_transfer = relationship(
    BankTransfer, foreign_keys=[bank_transfer_id]
)

bank_transfer_id class-attribute instance-attribute

bank_transfer_id = mapped_column(
    UUID(as_uuid=True),
    ForeignKey(id),
    index=True,
    nullable=True,
)

raw class-attribute instance-attribute

raw = mapped_column(JSONB(none_as_null=True), nullable=True)