Subversion Repositories SmartDukaan

Rev

Rev 15131 | Rev 15135 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15131 Rev 15133
Line 134... Line 134...
134
    sms_verified = Field(Boolean)
134
    sms_verified = Field(Boolean)
135
    call_time = Field(DateTime)
135
    call_time = Field(DateTime)
136
    duration_sec = Field(Integer)
136
    duration_sec = Field(Integer)
137
    call_disposition = Field(Enum('call_later','ringing_no_answer', 'not_reachable', 'switch_off', 'invalid_no', 'wrong_no', 'hang_up','retailer_not_interested', 'alreadyuser', 'verified_link_sent'))
137
    call_disposition = Field(Enum('call_later','ringing_no_answer', 'not_reachable', 'switch_off', 'invalid_no', 'wrong_no', 'hang_up','retailer_not_interested', 'alreadyuser', 'verified_link_sent'))
138
    disposition_description = Field(String(192))
138
    disposition_description = Field(String(192))
-
 
139
    link_sent = Field(Boolean)
139
    created = Field(DateTime,default=func.now())
140
    created = Field(DateTime,default=func.now())
140
    using_options(shortnames=True)
141
    using_options(shortnames=True)
141
    using_table_options(mysql_engine="InnoDB")
142
    using_table_options(mysql_engine="InnoDB")
142
    
143
    
143
class RetryConfig(Entity):
144
class RetryConfig(Entity):
Line 145... Line 146...
145
    disposition_type = Field(Enum('ringing_no_answer', 'not_reachable'))
146
    disposition_type = Field(Enum('ringing_no_answer', 'not_reachable'))
146
    retry_count = Field(Integer(unsigned=True))
147
    retry_count = Field(Integer(unsigned=True))
147
    minutes_ahead = Field(Integer(unsigned=True))
148
    minutes_ahead = Field(Integer(unsigned=True))
148
    using_options(shortnames=True)
149
    using_options(shortnames=True)
149
    using_table_options(mysql_engine="InnoDB")
150
    using_table_options(mysql_engine="InnoDB")
-
 
151
    
-
 
152
class RetailerLinks(Entity):
-
 
153
    retailer_id = Field(Integer(unsigned=True))
-
 
154
    code = Field(String(10), unique=True)
-
 
155
    is_activated = Field(Boolean)
-
 
156
    activated = Field(DateTime,onupdate=func.now())
-
 
157
    created = Field(DateTime,default=func.now())
-
 
158
    using_options(shortnames=True)
-
 
159
    using_table_options(mysql_engine="InnoDB")
150
 
160
 
151
 
161
 
152
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
162
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
153
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
163
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
154
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
164
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'