| Line 160... |
Line 160... |
| 160 |
responseId = Field(String(30))
|
160 |
responseId = Field(String(30))
|
| 161 |
responseText = Field(String(150))
|
161 |
responseText = Field(String(150))
|
| 162 |
deliveryStatus = Field(Enum('NOT_SENT','SENT_TO_OPERATOR','SUBMITTED_TO_SMSC','GOT_STATUS_CODE'))
|
162 |
deliveryStatus = Field(Enum('NOT_SENT','SENT_TO_OPERATOR','SUBMITTED_TO_SMSC','GOT_STATUS_CODE'))
|
| 163 |
using_options(shortnames = True)
|
163 |
using_options(shortnames = True)
|
| 164 |
using_table_options(mysql_engine = "InnoDB")
|
164 |
using_table_options(mysql_engine = "InnoDB")
|
| - |
|
165 |
|
| - |
|
166 |
class Campaigns(Entity):
|
| - |
|
167 |
userEmail = Field(String(256),primary_key=True)
|
| - |
|
168 |
campaignType = Field(Integer,primary_key=True,autoincrement=False)
|
| - |
|
169 |
using_options(shortnames = True)
|
| - |
|
170 |
using_table_options(mysql_engine = "InnoDB")
|
| 165 |
|
171 |
|
| 166 |
|
172 |
|
| 167 |
def initialize(dbname='helper', db_hostname='localhost'):
|
173 |
def initialize(dbname='helper', db_hostname='localhost'):
|
| 168 |
#metadata.bind = "sqlite:///message.sqlite" #need to read it from configserver.
|
174 |
#metadata.bind = "sqlite:///message.sqlite" #need to read it from configserver.
|
| 169 |
engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
175 |
engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|