Add basic TransactionDetail for trans archive model

This commit is contained in:
Lance Edgar 2022-03-26 23:04:05 -05:00
parent af6189b237
commit 2b80fd6a6b
3 changed files with 77 additions and 2 deletions

View file

@ -35,11 +35,10 @@ Base = declarative_base()
@six.python_2_unicode_compatible @six.python_2_unicode_compatible
class TransactionDetail(Base): class TransactionDetailBase(object):
""" """
Represents a POS transaction detail record. Represents a POS transaction detail record.
""" """
__tablename__ = 'dtransactions'
# store # store
store_row_id = sa.Column(sa.Integer(), primary_key=True, nullable=False) store_row_id = sa.Column(sa.Integer(), primary_key=True, nullable=False)
@ -123,3 +122,10 @@ class TransactionDetail(Base):
def __str__(self): def __str__(self):
return self.description or '' return self.description or ''
class TransactionDetail(TransactionDetailBase, Base):
"""
Represents a POS transaction detail record.
"""
__tablename__ = 'dtransactions'

View file

@ -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 <http://www.gnu.org/licenses/>.
#
################################################################################
"""
"Archive" Transaction Database Interface
"""
from sqlalchemy import orm
Session = orm.sessionmaker()

View file

@ -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 <http://www.gnu.org/licenses/>.
#
################################################################################
"""
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'