| Line 4... |
Line 4... |
| 4 |
from elixir.fields import Field
|
4 |
from elixir.fields import Field
|
| 5 |
from elixir.options import using_options, using_table_options
|
5 |
from elixir.options import using_options, using_table_options
|
| 6 |
from sqlalchemy.sql.expression import func
|
6 |
from sqlalchemy.sql.expression import func
|
| 7 |
from sqlalchemy.types import Integer, String, DateTime, Float, Boolean, Enum, \
|
7 |
from sqlalchemy.types import Integer, String, DateTime, Float, Boolean, Enum, \
|
| 8 |
Text
|
8 |
Text
|
| - |
|
9 |
from docutils.nodes import date
|
| 9 |
|
10 |
|
| 10 |
|
11 |
|
| 11 |
class Users(Entity):
|
12 |
class Users(Entity):
|
| 12 |
id = Field(Integer(unsigned=True), primary_key=True)
|
13 |
id = Field(Integer(unsigned=True), primary_key=True)
|
| 13 |
username = Field(String(128))
|
14 |
username = Field(String(128))
|
| Line 121... |
Line 122... |
| 121 |
created = Field(DateTime)
|
122 |
created = Field(DateTime)
|
| 122 |
modified = Field(DateTime, default=func.now(), onupdate=func.utc_timestamp())
|
123 |
modified = Field(DateTime, default=func.now(), onupdate=func.utc_timestamp())
|
| 123 |
using_options(shortnames=True)
|
124 |
using_options(shortnames=True)
|
| 124 |
using_table_options(mysql_engine="InnoDB")
|
125 |
using_table_options(mysql_engine="InnoDB")
|
| 125 |
|
126 |
|
| - |
|
127 |
class CallHistory(Entity):
|
| - |
|
128 |
id = Field(Integer(unsigned=True), primary_key=True)
|
| - |
|
129 |
retailer_id = Field(Integer(unsigned=True))
|
| - |
|
130 |
agent_id = Field(Integer(unsigned=True))
|
| - |
|
131 |
mobile_number = Field(String(10))
|
| - |
|
132 |
sms_verified = Field(Boolean)
|
| - |
|
133 |
call_time = Field(DateTime)
|
| - |
|
134 |
duration_sec = Field(Integer)
|
| - |
|
135 |
call_disposition = Field(Enum('call_later','ringing_no_answer', 'not_reachable', 'switch_off', 'invalid_no', 'wrong_no', 'not_interested','retailer_not_interested', 'alreadyuser', 'verified_link_sent'))
|
| - |
|
136 |
disposition_description = Field(String(192))
|
| - |
|
137 |
created = Field(DateTime,default=func.now())
|
| - |
|
138 |
|
| 126 |
class RetryConfig(Entity):
|
139 |
class RetryConfig(Entity):
|
| 127 |
call_type = Field(Enum('fresh', 'followup'))
|
140 |
call_type = Field(Enum('fresh', 'followup'))
|
| 128 |
disposition_type = Field(Enum('call_later', 'ringing_no_answer', 'not_reachable', 'switch_off'))
|
141 |
disposition_type = Field(Enum('ringing_no_answer', 'not_reachable'))
|
| 129 |
retry_count = Field(Integer(unsigned=True))
|
142 |
retry_count = Field(Integer(unsigned=True))
|
| 130 |
days_ahead = Field(DateTime)
|
143 |
days_ahead = Field(DateTime)
|
| 131 |
using_options(shortnames=True)
|
144 |
using_options(shortnames=True)
|
| 132 |
using_table_options(mysql_engine="InnoDB")
|
145 |
using_table_options(mysql_engine="InnoDB")
|
| 133 |
|
146 |
|