Rev 2823 | Blame | Compare with Previous | Last modification | View Log | RSS feed
'''Created on 05-Jul-2011@author: ashish'''from elixir.entity import Entityfrom elixir.fields import Fieldfrom sqlalchemy.types import String, Integer, DateTimefrom elixir.options import using_options, using_table_optionsfrom shop2020.thriftpy.utils.ttypes import DashboardUser as TDashboardUserclass 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))role = Field(Integer)source = Field(Integer)using_options(shortnames=True)using_table_options(mysql_engine="InnoDB")def to_thrift_object(self):'''Returns the thrift object corresponding to this dashboard user object.Doesn't set the password in the object being returned.'''t_dashboard_user = TDashboardUser()t_dashboard_user.username = self.usernamet_dashboard_user.role = self.rolet_dashboard_user.warehouseId = self.warehouseIdt_dashboard_user.source = self.sourcereturn t_dashboard_user