| Line 563... |
Line 563... |
| 563 |
brand = Field(String(100))
|
563 |
brand = Field(String(100))
|
| 564 |
category_id = Field(Integer)
|
564 |
category_id = Field(Integer)
|
| 565 |
returnProvision = Field(Float)
|
565 |
returnProvision = Field(Float)
|
| 566 |
using_options(shortnames=True)
|
566 |
using_options(shortnames=True)
|
| 567 |
using_table_options(mysql_engine="InnoDB")
|
567 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
568 |
|
| - |
|
569 |
class CompetitorPricingRequest(Entity):
|
| - |
|
570 |
requestId = Field(BigInteger, primary_key=True,autoincrement=False)
|
| - |
|
571 |
user = Field(String(50))
|
| - |
|
572 |
isProcessed = Field(Boolean)
|
| - |
|
573 |
competitorPricing = OneToMany("CompetitorPricing")
|
| - |
|
574 |
using_options(shortnames=True)
|
| - |
|
575 |
using_table_options(mysql_engine="InnoDB")
|
| 568 |
|
576 |
|
| 569 |
class CompetitorPricing(Entity):
|
577 |
class CompetitorPricing(Entity):
|
| 570 |
item_id = Field(Integer)
|
578 |
item_id = Field(Integer)
|
| 571 |
snapdealScraping = Field(Boolean)
|
579 |
snapdealScraping = Field(Boolean)
|
| 572 |
flipkartScraping = Field(Boolean)
|
580 |
flipkartScraping = Field(Boolean)
|
| 573 |
amazonScraping = Field(Boolean)
|
581 |
amazonScraping = Field(Boolean)
|
| - |
|
582 |
ourSnapdealPrice = Field(Float)
|
| - |
|
583 |
ourSnapdealOfferPrice = Field(Float)
|
| - |
|
584 |
ourSnapdealInventory = Field(Integer)
|
| 574 |
lowestSnapdealPrice = Field(Float)
|
585 |
lowestSnapdealPrice = Field(Float)
|
| - |
|
586 |
lowestSnapdealOfferPrice = Field(Float)
|
| - |
|
587 |
lowestSnapdealSeller = Field(String(255))
|
| - |
|
588 |
lowestSnapdealSellerInventory = Field(Integer)
|
| - |
|
589 |
ourFlipkartPrice = Field(Float)
|
| - |
|
590 |
ourFlipkartInventory = Field(Integer)
|
| 575 |
lowestFlipkartPrice = Field(Float)
|
591 |
lowestFlipkartPrice = Field(Float)
|
| - |
|
592 |
lowestFlipkartSeller = Field(String(255))
|
| 576 |
lowestMfnPrice = Field(Float)
|
593 |
ourMfnPrice = Field(Float)
|
| 577 |
lowestFbaPrice = Field(Float)
|
594 |
ourFbaPrice = Field(Float)
|
| 578 |
isProcessed = Field(Boolean)
|
595 |
ourMfnInventory = Field(Integer)
|
| 579 |
uploadId = Field(BigInteger)
|
596 |
ourFbaInventory = Field(Integer)
|
| - |
|
597 |
lowestAmazonPrice = Field(Float)
|
| - |
|
598 |
lowestAmazonSeller = Field(String(255))
|
| - |
|
599 |
competitorPricing = ManyToOne("CompetitorPricingRequest")
|
| 580 |
using_options(shortnames=True)
|
600 |
using_options(shortnames=True)
|
| 581 |
using_table_options(mysql_engine="InnoDB")
|
601 |
using_table_options(mysql_engine="InnoDB")
|
| 582 |
|
- |
|
| 583 |
|
602 |
|
| 584 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
603 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
| 585 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
604 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 586 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
605 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 587 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
606 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|