Add employee importer for CORE -> Rattail, and CORE cashier auth handler
This commit is contained in:
parent
fd5d3142ed
commit
117442f8db
9 changed files with 255 additions and 1 deletions
|
@ -65,6 +65,41 @@ class CorePerson(model.Base):
|
|||
CorePerson.make_proxy(model.Person, '_corepos', 'corepos_customer_id')
|
||||
|
||||
|
||||
class CoreEmployee(model.Base):
|
||||
"""
|
||||
CORE-specific extensions to :class:`~rattail:rattail.db.model.Employee`
|
||||
"""
|
||||
__tablename__ = 'corepos_employee'
|
||||
__table_args__ = (
|
||||
sa.ForeignKeyConstraint(['uuid'], ['employee.uuid'],
|
||||
name='corepos_employee_fk_employee'),
|
||||
)
|
||||
__versioned__ = {}
|
||||
|
||||
uuid = model.uuid_column(default=None)
|
||||
employee = orm.relationship(
|
||||
model.Employee,
|
||||
doc="""
|
||||
Reference to the actual employee record, which this one extends.
|
||||
""",
|
||||
backref=orm.backref(
|
||||
'_corepos',
|
||||
uselist=False,
|
||||
cascade='all, delete-orphan',
|
||||
doc="""
|
||||
Reference to the CORE-POS extension record for this employee.
|
||||
"""))
|
||||
|
||||
corepos_number = sa.Column(sa.Integer(), nullable=True, doc="""
|
||||
``employees.emp_no`` value for this employee, within CORE-POS.
|
||||
""")
|
||||
|
||||
def __str__(self):
|
||||
return str(self.employee)
|
||||
|
||||
CoreEmployee.make_proxy(model.Employee, '_corepos', 'corepos_number')
|
||||
|
||||
|
||||
class CoreCustomer(model.Base):
|
||||
"""
|
||||
CORE-specific extensions to :class:`rattail:rattail.db.model.Customer`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue