Import Store, ProductCost from CORE DB

and tweak API importer accordingly
This commit is contained in:
Lance Edgar 2023-10-20 14:37:25 -05:00
parent 67861522eb
commit b6e21f52ee
5 changed files with 199 additions and 9 deletions

View file

@ -195,11 +195,24 @@ class CoreProductCost(model.Base):
Reference to the CORE-POS extension record for this product cost.
"""))
corepos_id = sa.Column(sa.Integer(), nullable=False, doc="""
``vendorItemID`` value for the corresponding record within CORE-POS.
corepos_vendor_id = sa.Column(sa.Integer(), nullable=False, doc="""
``vendorItems.vendorID`` value for the corresponding record within
CORE-POS.
""")
corepos_sku = sa.Column(sa.String(length=13), nullable=False, doc="""
``vendorItems.sku`` value for the corresponding record within
CORE-POS.
""")
corepos_id = sa.Column(sa.Integer(), nullable=True, doc="""
``vendorItems.vendorItemID`` value for the corresponding record
within CORE-POS.
""")
def __str__(self):
return str(self.cost)
CoreProductCost.make_proxy(model.ProductCost, '_corepos', 'corepos_vendor_id')
CoreProductCost.make_proxy(model.ProductCost, '_corepos', 'corepos_sku')
CoreProductCost.make_proxy(model.ProductCost, '_corepos', 'corepos_id')