Subversion Repositories SmartDukaan

Rev

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

Rev 3499 Rev 3554
Line 119... Line 119...
119
    estimate = Field(Integer)
119
    estimate = Field(Integer)
120
    created_on = Field(DateTime)
120
    created_on = Field(DateTime)
121
    updated_on = Field(DateTime)
121
    updated_on = Field(DateTime)
122
    actual_price = Field(Float)
122
    actual_price = Field(Float)
123
    discounted_price = Field(Float)
123
    discounted_price = Field(Float)
-
 
124
    discounts = OneToMany('Discount')
124
    using_options(shortnames=True)
125
    using_options(shortnames=True)
125
    using_table_options(mysql_engine="InnoDB")
126
    using_table_options(mysql_engine="InnoDB")
126
    
127
    
127
class Cart(Entity):
128
class Cart(Entity):
128
    id = Field(Integer, primary_key=True, autoincrement=True)
129
    id = Field(Integer, primary_key=True, autoincrement=True)
Line 137... Line 138...
137
    discounted_price = Field(Float)
138
    discounted_price = Field(Float)
138
    coupon_code = Field(String(20))
139
    coupon_code = Field(String(20))
139
    using_options(shortnames=True)
140
    using_options(shortnames=True)
140
    using_table_options(mysql_engine="InnoDB")
141
    using_table_options(mysql_engine="InnoDB")
141
 
142
 
-
 
143
class Discount(Entity):
-
 
144
    line = ManyToOne("Line", primary_key=True)
-
 
145
    discount = Field(Float, primary_key = True)
-
 
146
    quantity = Field(Float)
-
 
147
    using_options(shortnames = True)
-
 
148
    using_table_options(mysql_engine = 'InnoDB')
-
 
149
 
142
#===============================================================================
150
#===============================================================================
143
# Entity generated from Promotion Service
151
# Entity generated from Promotion Service
144
#===============================================================================
152
#===============================================================================
145
class Promotion(Entity):
153
class Promotion(Entity):
146
    id = Field(Integer, primary_key = True, autoincrement = True)
154
    id = Field(Integer, primary_key = True, autoincrement = True)