Rev 6159 | Blame | Compare with Previous | Last modification | View Log | RSS feed
'''Created on 11-Oct-2012@author: rajveer'''from elixir.entity import Entityfrom elixir.fields import Fieldfrom elixir.options import using_options, using_table_optionsfrom shop2020.thriftpy.model.v1.order.ttypes import RechargePlan as TRechargePlanfrom sqlalchemy.types import String, Integerclass RechargePlan(Entity):'''classdocs'''operatorId = Field(Integer)name = Field(String(256))displayName = Field(String(256))description = Field(String(256))using_options(shortnames=True)using_table_options(mysql_engine="InnoDB")def __init__(self):'''Constructor'''def to_thrift_object(self):rechargePlan = TRechargePlan()rechargePlan.operatorId = self.operatorIdrechargePlan.name = self.namerechargePlan.displayName = self.displayNamerechargePlan.description = self.descriptionreturn rechargePlandef from_thrift_object(self, thriftRechargePlan):self.operatorId = thriftRechargePlan.operatorIdself.name = thriftRechargePlan.nameself.displayName = thriftRechargePlan.displayNameself.description = thriftRechargePlan.description