Subversion Repositories SmartDukaan

Rev

Rev 21844 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21844 Rev 23081
Line 3... Line 3...
3
 
3
 
4
@author: Chandranshu
4
@author: Chandranshu
5
'''
5
'''
6
from elixir.entity import Entity
6
from elixir.entity import Entity
7
from elixir.fields import Field
7
from elixir.fields import Field
8
from sqlalchemy.types import Integer, String
8
from sqlalchemy.types import Integer, String, UnicodeText
9
from elixir.options import using_options, using_table_options
9
from elixir.options import using_options, using_table_options
10
 
10
 
11
from shop2020.thriftpy.purchase.ttypes import Supplier as TSupplier
11
from shop2020.thriftpy.purchase.ttypes import Supplier as TSupplier
12
 
12
 
13
class Supplier(Entity):
13
class Supplier(Entity):
Line 30... Line 30...
30
    contactEmail = Field(String(50))
30
    contactEmail = Field(String(50))
31
    registeredAddress = Field(String(100))
31
    registeredAddress = Field(String(100))
32
    communicationAddress = Field(String(100))
32
    communicationAddress = Field(String(100))
33
    stateId = Field(Integer)
33
    stateId = Field(Integer)
34
    poValidityLimit = Field(Integer)
34
    poValidityLimit = Field(Integer)
-
 
35
    tnc = Field(UnicodeText)
35
    using_options(shortnames=True)
36
    using_options(shortnames=True)
36
    using_table_options(mysql_engine="InnoDB")
37
    using_table_options(mysql_engine="InnoDB")
37
    
38
    
38
    def __init__(self):
39
    def __init__(self):
39
        '''
40
        '''
Line 59... Line 60...
59
        t_supplier.registeredAddress = self.registeredAddress
60
        t_supplier.registeredAddress = self.registeredAddress
60
        t_supplier.communicationAddress = self.communicationAddress
61
        t_supplier.communicationAddress = self.communicationAddress
61
        t_supplier.stateId = self.stateId
62
        t_supplier.stateId = self.stateId
62
        t_supplier.poValidityLimit = self.poValidityLimit
63
        t_supplier.poValidityLimit = self.poValidityLimit
63
        t_supplier.gstin = self.gstin
64
        t_supplier.gstin = self.gstin
-
 
65
        t_supplier.tnc = self.tnc
64
        return t_supplier
66
        return t_supplier
65
67