| Line 661... |
Line 661... |
| 661 |
user_id = Field(Integer(unsigned=True))
|
661 |
user_id = Field(Integer(unsigned=True))
|
| 662 |
account_type = Field(Enum('saholic','gcm_regid','cartId'))
|
662 |
account_type = Field(Enum('saholic','gcm_regid','cartId'))
|
| 663 |
account_key = Field(String(128))
|
663 |
account_key = Field(String(128))
|
| 664 |
using_options(shortnames=True)
|
664 |
using_options(shortnames=True)
|
| 665 |
using_table_options(mysql_engine="InnoDB")
|
665 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
666 |
|
| - |
|
667 |
class tinxys_stats(Entity):
|
| - |
|
668 |
id = Field(Integer(unsigned=True), primary_key=True)
|
| - |
|
669 |
req_date = Field(Date, unique=True, default=func.curdate())
|
| - |
|
670 |
total = Field(Integer, default=0)
|
| - |
|
671 |
request_failed = Field(Integer, defualt=0)
|
| - |
|
672 |
invalid_tin = Field(Integer, default=0)
|
| - |
|
673 |
using_options(shortnames=True, default=0)
|
| - |
|
674 |
using_table_options(mysql_engine="InnoDB")
|
| 666 |
|
675 |
|
| 667 |
def initialize(dbname='dtr', db_hostname="localhost", echo=True, setup=True):
|
676 |
def initialize(dbname='dtr', db_hostname="localhost", echo=True, setup=True):
|
| 668 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
677 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 669 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
678 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 670 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
679 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|