fix: add base class for all transaction tables, views
also rename some classes; add `dlogBig` for archive view
This commit is contained in:
parent
464f107a88
commit
47c23a65ae
2 changed files with 43 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# pyCOREPOS -- Python Interface to CORE POS
|
||||
# Copyright © 2018-2023 Lance Edgar
|
||||
# Copyright © 2018-2024 Lance Edgar
|
||||
#
|
||||
# This file is part of pyCOREPOS.
|
||||
#
|
||||
|
@ -26,14 +26,25 @@ CORE Office "arch" data model
|
|||
|
||||
from sqlalchemy import orm
|
||||
|
||||
from corepos.db.office_trans.model import TransactionDetailBase
|
||||
from corepos.db.office_trans.model import DTransactionBase, DLogBase
|
||||
|
||||
|
||||
Base = orm.declarative_base()
|
||||
|
||||
|
||||
class TransactionDetail(TransactionDetailBase, Base):
|
||||
class BigArchive(DTransactionBase, Base):
|
||||
"""
|
||||
Represents a POS transaction detail record.
|
||||
Represents a record from ``bigArchive`` table.
|
||||
"""
|
||||
__tablename__ = 'bigArchive'
|
||||
|
||||
|
||||
# TODO: deprecate / remove this
|
||||
TransactionDetail = BigArchive
|
||||
|
||||
|
||||
class DLogBig(DLogBase, Base):
|
||||
"""
|
||||
Represents a record from ``dlogBig`` view.
|
||||
"""
|
||||
__tablename__ = 'dlogBig'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue