Subversion Repositories SmartDukaan

Rev

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

Rev 4439 Rev 5277
Line 23... Line 23...
23
    email = Field(String(100))
23
    email = Field(String(100))
24
    phone = Field(String(15))    
24
    phone = Field(String(15))    
25
    using_options(shortnames=True)
25
    using_options(shortnames=True)
26
    using_table_options(mysql_engine="InnoDB")
26
    using_table_options(mysql_engine="InnoDB")
27
    
27
    
28
class Slab(Entity):
-
 
29
    id = Field(Integer, primary_key=True, autoincrement=True)
-
 
30
    description = Field(String(50))
-
 
31
    using_options(shortnames=True)
-
 
32
    using_table_options(mysql_engine="InnoDB")
-
 
33
 
-
 
34
class Cost(Entity):
-
 
35
    provider = ManyToOne("Provider", primary_key=True)
-
 
36
    slab = ManyToOne("Slab", primary_key=True)
-
 
37
    cost = Field(Float)
-
 
38
    using_options(shortnames=True)
-
 
39
    using_table_options(mysql_engine="InnoDB")
-
 
40
 
-
 
41
class Awb(Entity):
28
class Awb(Entity):
42
    id = Field(Integer, primary_key=True, autoincrement=True)
29
    id = Field(Integer, primary_key=True, autoincrement=True)
43
    awb_number = Field(String(100))
30
    awb_number = Field(String(100))
44
    provider = ManyToOne("Provider")
31
    provider = ManyToOne("Provider")
45
    is_available = Field(Boolean)
32
    is_available = Field(Boolean)
Line 76... Line 63...
76
 
63
 
77
class DeliveryEstimate(Entity):
64
class DeliveryEstimate(Entity):
78
    destination_pin = Field(String(6), primary_key=True)
65
    destination_pin = Field(String(6), primary_key=True)
79
    provider = ManyToOne("Provider", primary_key=True)
66
    provider = ManyToOne("Provider", primary_key=True)
80
    warehouse_location = Field(Integer, primary_key=True, autoincrement=False)
67
    warehouse_location = Field(Integer, primary_key=True, autoincrement=False)
81
    #slab = ManyToOne("Slab")
-
 
82
    delivery_time = Field(Integer)
68
    delivery_time = Field(Integer)
83
    reliability = Field(Integer)
69
    reliability = Field(Integer)
84
    using_options(shortnames=True)
70
    using_options(shortnames=True)
85
    using_table_options(mysql_engine="InnoDB")
71
    using_table_options(mysql_engine="InnoDB")
86
    
72
    
87
class DestinationProviderAllocation(Entity):
-
 
88
    destination_pin = Field(String(6), primary_key=True)
-
 
89
    provider_less_amount = ManyToOne("Provider")
-
 
90
    provider_more_amount = ManyToOne("Provider")
-
 
91
    using_options(shortnames=True)
-
 
92
    using_table_options(mysql_engine="InnoDB")
-
 
93
    
-
 
94
class PublicHolidays(Entity):
73
class PublicHolidays(Entity):
95
    date = Field(Date, primary_key=True)
74
    date = Field(Date, primary_key=True)
96
    occasion = Field(String(100))
75
    occasion = Field(String(100))
97
    using_options(shortnames=True)
76
    using_options(shortnames=True)
98
    using_table_options(mysql_engine="InnoDB")
77
    using_table_options(mysql_engine="InnoDB")