Subversion Repositories SmartDukaan

Rev

Rev 6289 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6289 anupam.sin 1
'''
2
Created on 30-Oct-2012
3
 
4
@author: anupam
5
'''
6
 
7
from elixir.entity import Entity
8
from elixir.fields import Field
9
from elixir.options import using_options, using_table_options
7096 anupam.sin 10
from sqlalchemy.types import String, Integer
11
from shop2020.thriftpy.model.v1.order.ttypes import TelecomCircle as t_TelecomCircle
6289 anupam.sin 12
 
13
class TelecomCircle(Entity):
14
    '''
15
    classdocs
16
    '''
7096 anupam.sin 17
    id = Field(Integer, primary_key=True)
6289 anupam.sin 18
    name = Field(String(256))
19
    code = Field(String(8))
20
    using_options(shortnames=True)
21
    using_table_options(mysql_engine="InnoDB")
22
 
23
 
24
    def __init__(self):
25
        '''
26
        Constructor
27
        '''
7096 anupam.sin 28
 
29
    def to_thrift_object(self, ):
30
        '''
31
        Copies attributes to thrift object
32
        '''
33
        thriftObject = t_TelecomCircle()
34
        thriftObject.id = self.id
35
        thriftObject.name = self.name
36
        thriftObject.code = self.code
37
        return thriftObject