| Line 53... |
Line 53... |
| 53 |
warranty_period = Field(Integer)
|
53 |
warranty_period = Field(Integer)
|
| 54 |
isWarehousePreferenceSticky = Field(Boolean)
|
54 |
isWarehousePreferenceSticky = Field(Boolean)
|
| 55 |
preferredVendor = Field(Integer)
|
55 |
preferredVendor = Field(Integer)
|
| 56 |
type = Field(Enum('SERIALIZED', 'NON_SERIALIZED'), default = 'NON_SERIALIZED', server_default='NON_SERIALIZED')
|
56 |
type = Field(Enum('SERIALIZED', 'NON_SERIALIZED'), default = 'NON_SERIALIZED', server_default='NON_SERIALIZED')
|
| 57 |
hasItemNo = Field(Boolean)
|
57 |
hasItemNo = Field(Boolean)
|
| 58 |
clearance = Field(Boolean)
|
58 |
activeOnStore = Field(Boolean)
|
| 59 |
vatPercentage = Field(Float)
|
59 |
vatPercentage = Field(Float)
|
| 60 |
showSellingPrice = Field(Boolean)
|
60 |
showSellingPrice = Field(Boolean)
|
| 61 |
preferredInsurer = Field(Integer)
|
61 |
preferredInsurer = Field(Integer)
|
| 62 |
using_options(shortnames=True)
|
62 |
using_options(shortnames=True)
|
| 63 |
using_table_options(mysql_engine="InnoDB")
|
63 |
using_table_options(mysql_engine="InnoDB")
|
| Line 187... |
Line 187... |
| 187 |
class FreebieItem(Entity):
|
187 |
class FreebieItem(Entity):
|
| 188 |
itemId = Field(Integer, primary_key=True)
|
188 |
itemId = Field(Integer, primary_key=True)
|
| 189 |
freebieItemId = Field(Integer)
|
189 |
freebieItemId = Field(Integer)
|
| 190 |
using_options(shortnames=True)
|
190 |
using_options(shortnames=True)
|
| 191 |
using_table_options(mysql_engine="InnoDB")
|
191 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
192 |
|
| - |
|
193 |
class StorePricing(Entity):
|
| - |
|
194 |
item = ManyToOne('Item', primary_key=True)
|
| - |
|
195 |
recommendedPrice = Field(Float)
|
| - |
|
196 |
minPrice = Field(Float)
|
| - |
|
197 |
maxPrice = Field(Float)
|
| - |
|
198 |
minAdvancePrice = Field(Float)
|
| - |
|
199 |
using_options(shortnames=True)
|
| - |
|
200 |
using_table_options(mysql_engine="InnoDB")
|
| 192 |
|
201 |
|
| 193 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
202 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
| 194 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
203 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 195 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
204 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 196 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
205 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|