| Line 795... |
Line 795... |
| 795 |
fixedMargin = Field(Float)
|
795 |
fixedMargin = Field(Float)
|
| 796 |
fixedMarginPercentage = Field(Float)
|
796 |
fixedMarginPercentage = Field(Float)
|
| 797 |
logisticCostSnapdeal = Field(Float)
|
797 |
logisticCostSnapdeal = Field(Float)
|
| 798 |
woodenPackagingCost = Field(Float)
|
798 |
woodenPackagingCost = Field(Float)
|
| 799 |
weightSnapdeal = Field(Float)
|
799 |
weightSnapdeal = Field(Float)
|
| - |
|
800 |
using_options(shortnames=True)
|
| - |
|
801 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
802 |
|
| 800 |
|
803 |
|
| 801 |
class BulkItemPricing(Entity):
|
804 |
class BulkItemPricing(Entity):
|
| 802 |
id = Field(Integer, primary_key=True, autoincrement = True)
|
805 |
id = Field(Integer, primary_key=True, autoincrement = True)
|
| 803 |
item_id = Field(Integer, index=True)
|
806 |
item_id = Field(Integer, index=True)
|
| 804 |
quantity = Field(Integer)
|
807 |
quantity = Field(Integer)
|
| 805 |
price = Field(Float)
|
808 |
price = Field(Float)
|
| 806 |
using_options(shortnames=True)
|
809 |
using_options(shortnames=True)
|
| 807 |
using_table_options(mysql_engine="InnoDB")
|
810 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
811 |
|
| - |
|
812 |
class ItemWarrantyInfo(Entity):
|
| - |
|
813 |
itemId = Field(Integer, primary_key=True, autoincrement=False)
|
| - |
|
814 |
itemCondition = Field(Integer, primary_key=True, autoincrement=False)
|
| - |
|
815 |
warrantyVal = Field(Integer)
|
| - |
|
816 |
warrantyPeriodType = Field(String(1))
|
| - |
|
817 |
using_options(shortnames=True)
|
| - |
|
818 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
819 |
|
| - |
|
820 |
class CategoryWarrantyInfo(Entity):
|
| - |
|
821 |
categoryId = Field(Integer, primary_key=True, autoincrement=False)
|
| - |
|
822 |
brand = Field(String(100), primary_key=True)
|
| - |
|
823 |
itemCondition = Field(Integer, primary_key=True, autoincrement=False)
|
| - |
|
824 |
warrantyVal = Field(Integer)
|
| - |
|
825 |
warrantyPeriodType = Field(String(1))
|
| - |
|
826 |
using_options(shortnames=True)
|
| - |
|
827 |
using_table_options(mysql_engine="InnoDB")
|
| 808 |
|
828 |
|
| 809 |
def initialize(dbname='catalog', db_hostname="localhost", setup=True):
|
829 |
def initialize(dbname='catalog', db_hostname="localhost", setup=True):
|
| 810 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
830 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 811 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
831 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 812 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
832 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|