Rev 746 | Rev 1131 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
'''Created on 14-Jul-2010@author: ashish'''from elixir import *import elixirclass Message(Entity):id = Field(Integer, primary_key=True, autoincrement=True)message_id = Field(Integer)message = Field(String(200))using_options(shortnames=True)using_table_options(mysql_engine="InnoDB")class DashboardUser(Entity):username = Field(String(30), primary_key=True)password = Field(String(30))warehouseId = Field(Integer)addedOn = Field(DateTime)loggedOn = Field(DateTime)status = Field(Integer)otherInfo = Field(String(200))using_options(shortnames=True)using_table_options(mysql_engine="InnoDB")class LogisticsUser(Entity):username = Field(String(30), primary_key=True)password = Field(String(30))providerId = Field(Integer)using_options(shortnames=True)using_table_options(mysql_engine="InnoDB")def initialize():#metadata.bind = "sqlite:///message.sqlite" #need to read it from configserver.metadata.bind = 'mysql://root:shop2020@localhost/helper'metadata.bind.echo = Truesetup_all(True)if __name__=="__main__":initialize()