| Line 680... |
Line 680... |
| 680 |
timestamp =Field(DateTime, primary_key=True, autoincrement=False)
|
680 |
timestamp =Field(DateTime, primary_key=True, autoincrement=False)
|
| 681 |
using_options(shortnames=True)
|
681 |
using_options(shortnames=True)
|
| 682 |
using_table_options(mysql_engine="InnoDB")
|
682 |
using_table_options(mysql_engine="InnoDB")
|
| 683 |
|
683 |
|
| 684 |
|
684 |
|
| - |
|
685 |
class ExclusiveAffiliateItemInfo(Entity):
|
| - |
|
686 |
itemId = Field(Integer, primary_key=True, autoincrement=False)
|
| - |
|
687 |
affiliateId = Field(Integer)
|
| - |
|
688 |
offerText = Field(String(1023))
|
| - |
|
689 |
offerUrl = Field(String(255))
|
| - |
|
690 |
mOfferText = Field(String(1023))
|
| - |
|
691 |
mOfferUrl = Field(String(255))
|
| - |
|
692 |
affiliateSku = Field(String(255))
|
| - |
|
693 |
affiliateUrl = Field(String(255))
|
| - |
|
694 |
addedOn = Field(DateTime)
|
| - |
|
695 |
updatedOn = Field(DateTime)
|
| - |
|
696 |
isActive = Field(Boolean)
|
| - |
|
697 |
using_options(shortnames=True)
|
| - |
|
698 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
699 |
|
| - |
|
700 |
class OutboundAffiliateMaster(Entity):
|
| - |
|
701 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| - |
|
702 |
name = Field(String(100))
|
| - |
|
703 |
using_options(shortnames=True)
|
| - |
|
704 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
705 |
|
| 685 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
706 |
def initialize(dbname='catalog', db_hostname="localhost"):
|
| 686 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
707 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 687 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
708 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 688 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
709 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
| 689 |
metadata.bind = cengine
|
710 |
metadata.bind = cengine
|