| Line 181... |
Line 181... |
| 181 |
address = Field(String(255))
|
181 |
address = Field(String(255))
|
| 182 |
declaredAmount = Field(BigInteger)
|
182 |
declaredAmount = Field(BigInteger)
|
| 183 |
creditedAmount = Field(BigInteger)
|
183 |
creditedAmount = Field(BigInteger)
|
| 184 |
using_options(shortnames=True)
|
184 |
using_options(shortnames=True)
|
| 185 |
using_table_options(mysql_engine="InnoDB")
|
185 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
186 |
|
| - |
|
187 |
class FreebieItem(Entity):
|
| - |
|
188 |
itemId = Field(Integer, primary_key=True)
|
| - |
|
189 |
freebieItemId = Field(Integer)
|
| - |
|
190 |
using_options(shortnames=True)
|
| - |
|
191 |
using_table_options(mysql_engine="InnoDB")
|
| 186 |
|
192 |
|
| 187 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
193 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
| 188 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
194 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 189 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
195 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 190 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
196 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|