diff --git a/corepos/db/office_trans/model.py b/corepos/db/office_trans/model.py index 55aff86..7b6240c 100644 --- a/corepos/db/office_trans/model.py +++ b/corepos/db/office_trans/model.py @@ -35,11 +35,10 @@ Base = declarative_base() @six.python_2_unicode_compatible -class TransactionDetail(Base): +class TransactionDetailBase(object): """ Represents a POS transaction detail record. """ - __tablename__ = 'dtransactions' # store store_row_id = sa.Column(sa.Integer(), primary_key=True, nullable=False) @@ -123,3 +122,10 @@ class TransactionDetail(Base): def __str__(self): return self.description or '' + + +class TransactionDetail(TransactionDetailBase, Base): + """ + Represents a POS transaction detail record. + """ + __tablename__ = 'dtransactions' diff --git a/corepos/db/office_trans_archive/__init__.py b/corepos/db/office_trans_archive/__init__.py new file mode 100644 index 0000000..e25b200 --- /dev/null +++ b/corepos/db/office_trans_archive/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8; -*- +################################################################################ +# +# pyCOREPOS -- Python Interface to CORE POS +# Copyright © 2018-2022 Lance Edgar +# +# This file is part of pyCOREPOS. +# +# pyCOREPOS is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# pyCOREPOS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# pyCOREPOS. If not, see . +# +################################################################################ +""" +"Archive" Transaction Database Interface +""" + +from sqlalchemy import orm + + +Session = orm.sessionmaker() diff --git a/corepos/db/office_trans_archive/model.py b/corepos/db/office_trans_archive/model.py new file mode 100644 index 0000000..ce70603 --- /dev/null +++ b/corepos/db/office_trans_archive/model.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8; -*- +################################################################################ +# +# pyCOREPOS -- Python Interface to CORE POS +# Copyright © 2018-2022 Lance Edgar +# +# This file is part of pyCOREPOS. +# +# pyCOREPOS is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# pyCOREPOS is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# pyCOREPOS. If not, see . +# +################################################################################ +""" +CORE POS Transaction Data Model +""" + +from sqlalchemy.ext.declarative import declarative_base + +from corepos.db.office_trans.model import TransactionDetailBase + + +Base = declarative_base() + + +class TransactionDetail(TransactionDetailBase, Base): + """ + Represents a POS transaction detail record. + """ + __tablename__ = 'bigArchive'