| 6159 |
rajveer |
1 |
'''
|
|
|
2 |
Created on 11-Oct-2012
|
|
|
3 |
|
|
|
4 |
@author: rajveer
|
|
|
5 |
'''
|
|
|
6 |
from elixir.fields import Field
|
|
|
7 |
from elixir.options import using_options, using_table_options
|
|
|
8 |
from shop2020.thriftpy.model.v1.order.ttypes import RechargePlan as TRechargePlan
|
|
|
9 |
from sqlalchemy.types import String, Integer
|
|
|
10 |
|
|
|
11 |
class RechargePlan():
|
|
|
12 |
'''
|
|
|
13 |
classdocs
|
|
|
14 |
'''
|
|
|
15 |
operatorId = Field(Integer)
|
|
|
16 |
name = Field(String(256))
|
|
|
17 |
displayName = Field(String(256))
|
|
|
18 |
description = Field(String(256))
|
|
|
19 |
using_options(shortnames=True)
|
|
|
20 |
using_table_options(mysql_engine="InnoDB")
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
def __init__(self):
|
|
|
24 |
'''
|
|
|
25 |
Constructor
|
|
|
26 |
'''
|
|
|
27 |
|
|
|
28 |
def to_thrift_object(self):
|
|
|
29 |
rechargePlan = TRechargePlan()
|
|
|
30 |
rechargePlan.operatorId = self.operatorId
|
|
|
31 |
rechargePlan.name = self.name
|
|
|
32 |
rechargePlan.displayName = self.displayName
|
|
|
33 |
rechargePlan.description = self.description
|
|
|
34 |
return rechargePlan
|
|
|
35 |
|
|
|
36 |
def from_thrift_object(self, thriftRechargePlan):
|
|
|
37 |
self.operatorId = thriftRechargePlan.operatorId
|
|
|
38 |
self.name = thriftRechargePlan.name
|
|
|
39 |
self.displayName = thriftRechargePlan.displayName
|
|
|
40 |
self.description = thriftRechargePlan.description
|