Subversion Repositories SmartDukaan

Rev

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

Rev 1859 Rev 1976
Line 114... Line 114...
114
    quantity = Field(Float)
114
    quantity = Field(Float)
115
    line_status = Field(Integer)
115
    line_status = Field(Integer)
116
    estimate = Field(Integer)
116
    estimate = Field(Integer)
117
    created_on = Field(DateTime)
117
    created_on = Field(DateTime)
118
    updated_on = Field(DateTime)
118
    updated_on = Field(DateTime)
-
 
119
    actual_price = Field(Float)
-
 
120
    discounted_price = Field(Float)
119
    using_options(shortnames=True)
121
    using_options(shortnames=True)
120
    using_table_options(mysql_engine="InnoDB")
122
    using_table_options(mysql_engine="InnoDB")
121
    
123
    
122
class Cart(Entity):
124
class Cart(Entity):
123
    id = Field(Integer, primary_key=True, autoincrement=True)
125
    id = Field(Integer, primary_key=True, autoincrement=True)
Line 126... Line 128...
126
    address_id = Field(Integer)
128
    address_id = Field(Integer)
127
    checked_out_on = Field(DateTime)
129
    checked_out_on = Field(DateTime)
128
    created_on = Field(DateTime)
130
    created_on = Field(DateTime)
129
    updated_on = Field(DateTime)
131
    updated_on = Field(DateTime)
130
    lines = OneToMany("Line")
132
    lines = OneToMany("Line")
-
 
133
    total_price = Field(Float)
-
 
134
    discounted_price = Field(Float)
-
 
135
    coupon_code = Field(String(20))
131
    using_options(shortnames=True)
136
    using_options(shortnames=True)
132
    using_table_options(mysql_engine="InnoDB")
137
    using_table_options(mysql_engine="InnoDB")
133
 
138
 
134
#===============================================================================
139
#===============================================================================
-
 
140
# Entity generated from Promotion Service
-
 
141
#===============================================================================
-
 
142
class Promotion(Entity):
-
 
143
    id = Field(Integer, primary_key = True, autoincrement = True)
-
 
144
    name = Field(String(200))
-
 
145
    rule_execution_src = Field(String(100))
-
 
146
    start_on = Field(DateTime)
-
 
147
    end_on = Field(DateTime)
-
 
148
    coupons = OneToMany("Coupon")
-
 
149
    created_on = Field(DateTime)
-
 
150
    using_options(shortnames = True)
-
 
151
    using_table_options(mysql_engine = "InnoDB")
-
 
152
 
-
 
153
class Coupon(Entity):
-
 
154
    coupon_code = Field(String(20))
-
 
155
    promotion = ManyToOne("Promotion")
-
 
156
    arguments = Field(String(200))
-
 
157
    using_options(shortnames = True)
-
 
158
    using_table_options(mysql_engine = "InnoDB")
-
 
159
 
-
 
160
class PromotionTracker(Entity):
-
 
161
    coupon_code = Field(String(20))
-
 
162
    transaction_id = Field(Integer)
-
 
163
    user_id = Field(Integer)
-
 
164
    applied_on = Field(DateTime)
-
 
165
    using_options(shortnames = True)
-
 
166
    using_table_options(mysql_engine = "InnoDB")
-
 
167
    
-
 
168
#===============================================================================
135
# Entity generated from Contact Us form
169
# Entity generated from Contact Us form
136
#===============================================================================
170
#===============================================================================
137
class UserCommunication(Entity):
171
class UserCommunication(Entity):
138
    id = Field(Integer, primary_key = True, autoincrement = True)
172
    id = Field(Integer, primary_key = True, autoincrement = True)
139
    user_id = Field(Integer)
173
    user_id = Field(Integer)