Subversion Repositories SmartDukaan

Rev

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

Rev 11193 Rev 11531
Line 519... Line 519...
519
    updatedOn = Field(DateTime)
519
    updatedOn = Field(DateTime)
520
    updatedBy = Field(String(255))
520
    updatedBy = Field(String(255))
521
    using_options(shortnames=True)
521
    using_options(shortnames=True)
522
    using_table_options(mysql_engine="InnoDB")
522
    using_table_options(mysql_engine="InnoDB")
523
 
523
 
-
 
524
class PrivateDeals(Entity):   
-
 
525
    item_id = Field(Integer, primary_key=True, autoincrement = False)
-
 
526
    dealFreebieItemId =  Field(Integer)
-
 
527
    dealPrice = Field(Float)
-
 
528
    startDate = Field(DateTime)
-
 
529
    endDate = Field(DateTime)
-
 
530
    isDealTextIdentical = Field(Boolean)
-
 
531
    dealText = Field(String(500))
-
 
532
    isCod =  Field(Boolean)
-
 
533
    rank = Field(Integer)
-
 
534
    using_options(shortnames=True)
-
 
535
    using_table_options(mysql_engine="InnoDB")
-
 
536
 
-
 
537
 
524
def initialize(dbname='catalog', db_hostname="localhost"):
538
def initialize(dbname='catalog', db_hostname="localhost"):
525
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
539
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
526
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
540
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
527
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
541
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
528
    metadata.bind = cengine
542
    metadata.bind = cengine