Subversion Repositories SmartDukaan

Rev

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

Rev 18265 Rev 18293
Line 626... Line 626...
626
    created = Field(DateTime, default=func.now())
626
    created = Field(DateTime, default=func.now())
627
    modified = Field(DateTime, default=func.now(), onupdate=func.now())
627
    modified = Field(DateTime, default=func.now(), onupdate=func.now())
628
    using_options(shortnames=True)
628
    using_options(shortnames=True)
629
    using_table_options(mysql_engine="InnoDB")
629
    using_table_options(mysql_engine="InnoDB")
630
 
630
 
-
 
631
class CallHistoryCrm(Entity):
-
 
632
    id = Field(Integer(unsigned=True), primary_key=True)
-
 
633
    user_id = Field(Integer(unsigned=True))
-
 
634
    agent_id = Field(Integer(unsigned=True))
-
 
635
    project_id = Field(Integer(unsigned=True))
-
 
636
    mobile_number = Field(String(10))
-
 
637
    call_time = Field(DateTime)
-
 
638
    duration_sec = Field(Integer)
-
 
639
    call_disposition = Field(Enum('call_later','ringing_no_answer', 'not_reachable', 'switch_off', 'technical_issue', 'pricing_issue', 'shipping_issue','internet_issue','checking_price', 'order_process', 'placed_order','place_order'))
-
 
640
    disposition_description = Field(String(192))
-
 
641
    disposition_comments = Field(String(192))
-
 
642
    created = Field(DateTime,default=func.now())
-
 
643
    using_options(shortnames=True)
-
 
644
    using_table_options(mysql_engine="InnoDB")
-
 
645
 
631
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
646
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
632
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
647
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
633
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
648
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
634
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
649
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
635
    metadata.bind = cengine
650
    metadata.bind = cengine