| Line 391... |
Line 391... |
| 391 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
391 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
| 392 |
emiFee = Field(Float)
|
392 |
emiFee = Field(Float)
|
| 393 |
closingFee = Field(Float)
|
393 |
closingFee = Field(Float)
|
| 394 |
returnProvision = Field(Float)
|
394 |
returnProvision = Field(Float)
|
| 395 |
commission = Field(Float)
|
395 |
commission = Field(Float)
|
| - |
|
396 |
competitorCommissionAccessory = Field(Float)
|
| - |
|
397 |
competitorCommissionOther = Field(Float)
|
| 396 |
serviceTax = Field(Float)
|
398 |
serviceTax = Field(Float)
|
| 397 |
using_options(shortnames=True)
|
399 |
using_options(shortnames=True)
|
| 398 |
using_table_options(mysql_engine="InnoDB")
|
400 |
using_table_options(mysql_engine="InnoDB")
|
| 399 |
|
401 |
|
| 400 |
class SourceItemPercentage(Entity):
|
402 |
class SourceItemPercentage(Entity):
|
| Line 402... |
Line 404... |
| 402 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
404 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
| 403 |
emiFee = Field(Float)
|
405 |
emiFee = Field(Float)
|
| 404 |
closingFee = Field(Float)
|
406 |
closingFee = Field(Float)
|
| 405 |
returnProvision = Field(Float)
|
407 |
returnProvision = Field(Float)
|
| 406 |
commission = Field(Float)
|
408 |
commission = Field(Float)
|
| - |
|
409 |
competitorCommissionAccessory = Field(Float)
|
| - |
|
410 |
competitorCommissionOther = Field(Float)
|
| 407 |
serviceTax = Field(Float)
|
411 |
serviceTax = Field(Float)
|
| 408 |
using_options(shortnames=True)
|
412 |
using_options(shortnames=True)
|
| 409 |
using_table_options(mysql_engine="InnoDB")
|
413 |
using_table_options(mysql_engine="InnoDB")
|
| 410 |
|
414 |
|
| - |
|
415 |
class MarketPlaceHistory(Entity):
|
| - |
|
416 |
item_id = Field(Integer, primary_key=True, autoincrement=False)
|
| - |
|
417 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
| - |
|
418 |
lowestTp = Field(Float)
|
| - |
|
419 |
lowestPossibleTp = Field(Float)
|
| - |
|
420 |
lowestPossibleSp = Field(Float)
|
| - |
|
421 |
ourInventory = Field(Integer)
|
| - |
|
422 |
otherInventory = Field(Integer)
|
| - |
|
423 |
secondLowestInventory = Field(Integer)
|
| - |
|
424 |
ourRank = Field(Integer)
|
| - |
|
425 |
competitionBasis = Field(Integer)
|
| - |
|
426 |
competitiveCategory = Field(Integer)
|
| - |
|
427 |
risky = Field(Boolean)
|
| - |
|
428 |
lowestOfferPrice = Field(Float)
|
| - |
|
429 |
lowestSellingPrice = Field(Float)
|
| - |
|
430 |
lowestSellerName = Field(String(255))
|
| - |
|
431 |
lowestSellerCode = Field(String(255))
|
| - |
|
432 |
ourOfferPrice = Field(Float)
|
| - |
|
433 |
ourSellingPrice = Field(Float)
|
| - |
|
434 |
ourTp = Field(Float)
|
| - |
|
435 |
ourNlc = Field(Float)
|
| - |
|
436 |
proposedSellingPrice = Field(Float)
|
| - |
|
437 |
proposedTp = Field(Float)
|
| - |
|
438 |
targetNlc = Field(Float)
|
| - |
|
439 |
salesPotential = Field(Integer)
|
| - |
|
440 |
secondLowestSellerName = Field(String(255))
|
| - |
|
441 |
secondLowestSellerCode = Field(String(255))
|
| - |
|
442 |
secondLowestSellingPrice = Field(Float)
|
| - |
|
443 |
secondLowestOfferPrice = Field(Float)
|
| - |
|
444 |
secondLowestTp = Field(Float)
|
| - |
|
445 |
marginIncreasedPotential = Field(Float)
|
| - |
|
446 |
margin = Field(Float)
|
| - |
|
447 |
competitorEnoughStock = Field(Boolean)
|
| - |
|
448 |
ourEnoughStock = Field(Boolean)
|
| - |
|
449 |
totalSeller = Field(Integer)
|
| - |
|
450 |
salesPotential = Field(Integer)
|
| - |
|
451 |
avgSales = Field(Float)
|
| - |
|
452 |
decision = Field(Integer)
|
| - |
|
453 |
reason = Field(Integer)
|
| - |
|
454 |
timestamp =Field(DateTime, primary_key=True, autoincrement=False)
|
| - |
|
455 |
using_options(shortnames=True)
|
| - |
|
456 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
457 |
|
| 411 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
458 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
| 412 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
459 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 413 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
460 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 414 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
461 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
| 415 |
metadata.bind = cengine
|
462 |
metadata.bind = cengine
|