Subversion Repositories SmartDukaan

Rev

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

Rev 18307 Rev 18352
Line 641... Line 641...
641
    disposition_comments = Field(String(192))
641
    disposition_comments = Field(String(192))
642
    created = Field(DateTime,default=func.now())
642
    created = Field(DateTime,default=func.now())
643
    using_options(shortnames=True)
643
    using_options(shortnames=True)
644
    using_table_options(mysql_engine="InnoDB")
644
    using_table_options(mysql_engine="InnoDB")
645
 
645
 
-
 
646
class ProductPricingInputs(Entity):
-
 
647
    id = Field(Integer(unsigned=True), primary_key=True)
-
 
648
    user_id = Field(Integer(unsigned=True))
-
 
649
    disposition_id = Field(Integer(unsigned=True))
-
 
650
    call_disposition = Field(Enum('call_later','technical_issue', 'pricing_issue', 'shipping_issue','internet_issue','checking_price', 'order_process', 'placed_order','place_order'))
-
 
651
    agent_id = Field(Integer(unsigned=True))
-
 
652
    project_id = Field(Integer(unsigned=True))
-
 
653
    product_input = Field (String(256))
-
 
654
    pricing_input = Field(Float) 
-
 
655
    created = Field(DateTime,default=func.now())
-
 
656
    using_options(shortnames=True)
-
 
657
    using_table_options(mysql_engine="InnoDB")
-
 
658
    
646
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
659
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
647
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
660
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
648
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
661
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
649
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
662
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
650
    metadata.bind = cengine
663
    metadata.bind = cengine