Subversion Repositories SmartDukaan

Rev

Rev 1730 | Rev 3187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1730 Rev 3044
Line 10... Line 10...
10
import elixir
10
import elixir
11
 
11
 
12
class Provider(Entity):
12
class Provider(Entity):
13
    id = Field(Integer, primary_key=True, autoincrement=True)
13
    id = Field(Integer, primary_key=True, autoincrement=True)
14
    name = Field(String(100))
14
    name = Field(String(100))
-
 
15
    details = OneToMany("ProviderDetails")
-
 
16
    using_options(shortnames=True)
-
 
17
    using_table_options(mysql_engine="InnoDB")
-
 
18
 
-
 
19
class ProviderDetails(Entity):
-
 
20
    provider = ManyToOne("Provider", primary_key=True)
-
 
21
    type = Field(Integer, primary_key=True, autoincrement=False)
15
    accountNo = Field(String(10))
22
    accountNo = Field(String(10))
16
    email = Field(String(100))
23
    email = Field(String(100))
17
    phone = Field(String(15))
24
    phone = Field(String(15))    
18
    using_options(shortnames=True)
25
    using_options(shortnames=True)
19
    using_table_options(mysql_engine="InnoDB")
26
    using_table_options(mysql_engine="InnoDB")
20
 
27
    
21
class Slab(Entity):
28
class Slab(Entity):
22
    id = Field(Integer, primary_key=True, autoincrement=True)
29
    id = Field(Integer, primary_key=True, autoincrement=True)
23
    description = Field(String(50))
30
    description = Field(String(50))
24
    using_options(shortnames=True)
31
    using_options(shortnames=True)
25
    using_table_options(mysql_engine="InnoDB")
32
    using_table_options(mysql_engine="InnoDB")