| 94 |
ashish |
1 |
'''
|
|
|
2 |
Created on 22-Mar-2010
|
|
|
3 |
|
|
|
4 |
@author: ashish
|
|
|
5 |
'''
|
| 23142 |
ashik.ali |
6 |
import datetime
|
|
|
7 |
|
| 4873 |
mandeep.dh |
8 |
from elixir import metadata, setup_all
|
| 23142 |
ashik.ali |
9 |
import elixir
|
| 94 |
ashish |
10 |
from elixir.entity import Entity
|
|
|
11 |
from elixir.fields import Field
|
| 4873 |
mandeep.dh |
12 |
from elixir.options import using_options, using_table_options
|
| 5318 |
rajveer |
13 |
from elixir.relationships import OneToMany, ManyToOne
|
| 23142 |
ashik.ali |
14 |
from sqlalchemy import Column
|
| 4873 |
mandeep.dh |
15 |
from sqlalchemy import create_engine
|
| 12363 |
kshitij.so |
16 |
from sqlalchemy.types import Integer, String, DateTime, Float, Boolean, Text, Enum, BigInteger, Date
|
| 94 |
ashish |
17 |
|
| 23142 |
ashik.ali |
18 |
|
| 626 |
chandransh |
19 |
class EntityIDGenerator(Entity):
|
|
|
20 |
id=Field(Integer, primary_key=True)
|
|
|
21 |
using_options(shortnames=True)
|
| 746 |
rajveer |
22 |
using_table_options(mysql_engine="InnoDB")
|
| 122 |
ashish |
23 |
|
| 94 |
ashish |
24 |
class Item(Entity):
|
| 122 |
ashish |
25 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| 963 |
chandransh |
26 |
product_group = Field(String(100))
|
| 4917 |
phani.kuma |
27 |
brand = Field(String(100), default='', server_default='')
|
|
|
28 |
model_number = Field(String(50), default='', server_default='')
|
|
|
29 |
model_name = Field(String(100), default='', server_default='')
|
|
|
30 |
color = Field(String(20), default='', server_default='')
|
|
|
31 |
category = Field(Integer, default=0, server_default="0")
|
| 483 |
rajveer |
32 |
comments = Field(String(200))
|
| 122 |
ashish |
33 |
catalog_item_id = Field(Integer)
|
|
|
34 |
feature_id = Field(Integer)
|
|
|
35 |
feature_description = Field(String(200))
|
| 483 |
rajveer |
36 |
mrp = Field(Float)
|
|
|
37 |
sellingPrice = Field(Float)
|
|
|
38 |
weight = Field(Float)
|
| 122 |
ashish |
39 |
addedOn = Field(DateTime)
|
| 609 |
chandransh |
40 |
updatedOn = Field(DateTime)
|
| 122 |
ashish |
41 |
startDate = Field(DateTime)
|
|
|
42 |
retireDate = Field(DateTime)
|
| 5217 |
amit.gupta |
43 |
comingSoonStartDate = Field(DateTime)
|
|
|
44 |
expectedArrivalDate = Field(DateTime)
|
| 483 |
rajveer |
45 |
status = Field(Integer)
|
| 2035 |
rajveer |
46 |
status_description = Field(String(100))
|
| 609 |
chandransh |
47 |
bestDealText = Field(String(100))
|
| 6777 |
vikram.rag |
48 |
bestDealsDetailsText = Field(String(1000))
|
|
|
49 |
bestDealsDetailsLink = Field(String(200))
|
| 630 |
chandransh |
50 |
bestDealValue = Field(Float)
|
| 621 |
chandransh |
51 |
bestSellingRank = Field(Integer)
|
| 103 |
ashish |
52 |
statusChangeLog = OneToMany("ItemChangeLog")
|
| 1910 |
varun.gupt |
53 |
defaultForEntity = Field(Boolean)
|
| 2251 |
ankur.sing |
54 |
risky = Field(Boolean)
|
| 3355 |
chandransh |
55 |
expectedDelay = Field(Integer)
|
| 4295 |
varun.gupt |
56 |
warranty_period = Field(Integer)
|
| 4406 |
anupam.sin |
57 |
isWarehousePreferenceSticky = Field(Boolean)
|
| 4506 |
phani.kuma |
58 |
preferredVendor = Field(Integer)
|
| 5135 |
mandeep.dh |
59 |
type = Field(Enum('SERIALIZED', 'NON_SERIALIZED'), default = 'NON_SERIALIZED', server_default='NON_SERIALIZED')
|
| 5385 |
phani.kuma |
60 |
hasItemNo = Field(Boolean)
|
| 7256 |
rajveer |
61 |
activeOnStore = Field(Boolean)
|
| 6241 |
amit.gupta |
62 |
showSellingPrice = Field(Boolean)
|
| 6805 |
anupam.sin |
63 |
preferredInsurer = Field(Integer)
|
| 7291 |
vikram.rag |
64 |
asin = Field(String(20))
|
|
|
65 |
holdInventory = Field(Integer, default=0, server_default="0")
|
|
|
66 |
defaultInventory = Field(Integer, default=0, server_default="0")
|
| 9841 |
rajveer |
67 |
holdOverride = Field(Boolean)
|
| 18150 |
kshitij.so |
68 |
packQuantity = Field(Integer, default=1, server_default="1")
|
|
|
69 |
quantityStep = Field(Integer, default=1, server_default="1")
|
|
|
70 |
minimumBuyQuantity = Field(Integer, default=1, server_default="1")
|
| 18414 |
kshitij.so |
71 |
maximumBuyQuantity = Field(Integer, default=0, server_default="0")
|
| 21838 |
amit.gupta |
72 |
hsnCode = Field(String(12))
|
| 746 |
rajveer |
73 |
using_options(shortnames=True)
|
|
|
74 |
using_table_options(mysql_engine="InnoDB")
|
| 103 |
ashish |
75 |
|
| 94 |
ashish |
76 |
def __repr__(self):
|
| 122 |
ashish |
77 |
return "<Item>%d</item>" % (self.id)
|
| 1308 |
chandransh |
78 |
|
| 7330 |
amit.gupta |
79 |
class ItemVatMaster(Entity):
|
|
|
80 |
itemId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
81 |
stateId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
82 |
vatPercentage = Field(Float)
|
|
|
83 |
using_options(shortnames=True)
|
|
|
84 |
using_table_options(mysql_engine="InnoDB")
|
| 21838 |
amit.gupta |
85 |
|
|
|
86 |
class CategoryHsnCodes(Entity):
|
|
|
87 |
categoryId = Field(Integer, primary_key=True)
|
|
|
88 |
hsnCode = Field(String(12), primary_key=True)
|
| 21853 |
amit.gupta |
89 |
description = Field(String(64))
|
| 21838 |
amit.gupta |
90 |
using_options(shortnames=True)
|
|
|
91 |
using_table_options(mysql_engine="InnoDB")
|
|
|
92 |
|
| 23142 |
ashik.ali |
93 |
class StateGstRate(Entity):
|
|
|
94 |
item_id = Field(Integer, primary_key=True)
|
|
|
95 |
state_id = Field(Integer, primary_key=True)
|
| 23156 |
ashik.ali |
96 |
igst_rate = Field(Float)
|
|
|
97 |
cgst_rate = Field(Float)
|
|
|
98 |
sgst_rate = Field(Float)
|
| 23142 |
ashik.ali |
99 |
using_options(shortnames=True)
|
|
|
100 |
using_table_options(mysql_engine="InnoDB")
|
| 7330 |
amit.gupta |
101 |
|
| 103 |
ashish |
102 |
class ItemChangeLog(Entity):
|
| 122 |
ashish |
103 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| 103 |
ashish |
104 |
old_status = Field(Integer)
|
|
|
105 |
new_status = Field(Integer)
|
| 1308 |
chandransh |
106 |
timestamp = Field(DateTime)
|
| 103 |
ashish |
107 |
item = ManyToOne("Item")
|
| 746 |
rajveer |
108 |
using_options(shortnames=True)
|
|
|
109 |
using_table_options(mysql_engine="InnoDB")
|
| 94 |
ashish |
110 |
|
| 103 |
ashish |
111 |
def __repr__(self):
|
|
|
112 |
return "<Log><id>%d</id><item>%d</item><old_status>%d</old_status><new_status>%d</new_status></Log>" %(self.id,self.item.id, self.old_status, self.new_status)
|
| 94 |
ashish |
113 |
|
| 635 |
rajveer |
114 |
class Category(Entity):
|
| 1970 |
rajveer |
115 |
id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
116 |
label = Field(String(50))
|
|
|
117 |
description = Field(String(200))
|
|
|
118 |
parent_category_id = Field(Integer)
|
| 4762 |
phani.kuma |
119 |
display_name = Field(String(50))
|
| 746 |
rajveer |
120 |
using_options(shortnames=True)
|
|
|
121 |
using_table_options(mysql_engine="InnoDB")
|
| 1970 |
rajveer |
122 |
|
| 3008 |
rajveer |
123 |
class SimilarItems(Entity):
|
|
|
124 |
item = ManyToOne('Item', primary_key=True)
|
|
|
125 |
catalog_item_id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
126 |
using_options(shortnames=True)
|
|
|
127 |
using_table_options(mysql_engine="InnoDB")
|
|
|
128 |
|
| 3079 |
rajveer |
129 |
class ProductNotification(Entity):
|
|
|
130 |
item = ManyToOne('Item', primary_key=True)
|
|
|
131 |
email = Field(String(100), primary_key=True, autoincrement=False)
|
|
|
132 |
addedOn = Field(DateTime, primary_key=True, autoincrement=False)
|
|
|
133 |
using_options(shortnames=True)
|
|
|
134 |
using_table_options(mysql_engine="InnoDB")
|
| 3557 |
rajveer |
135 |
|
|
|
136 |
class Source(Entity):
|
|
|
137 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
138 |
name = Field(String(50))
|
|
|
139 |
identifier = Field(String(100))
|
|
|
140 |
using_options(shortnames=True)
|
|
|
141 |
using_table_options(mysql_engine="InnoDB")
|
| 6511 |
kshitij.so |
142 |
|
| 3557 |
rajveer |
143 |
class SourceItemPricing(Entity):
|
|
|
144 |
source = ManyToOne('Source', primary_key=True)
|
|
|
145 |
item = ManyToOne('Item', primary_key=True)
|
|
|
146 |
mrp = Field(Float)
|
|
|
147 |
sellingPrice = Field(Float)
|
|
|
148 |
using_options(shortnames=True)
|
|
|
149 |
using_table_options(mysql_engine="InnoDB")
|
| 746 |
rajveer |
150 |
|
| 4649 |
phani.kuma |
151 |
class AuthorizationLog(Entity):
|
|
|
152 |
id = Field(Integer, primary_key=True, autoincrement = True)
|
|
|
153 |
timestamp = Field(DateTime, default=datetime.datetime.now())
|
|
|
154 |
item = ManyToOne('Item')
|
|
|
155 |
username = Field(String(30))
|
|
|
156 |
reason = Field(Text)
|
|
|
157 |
using_options(shortnames=True)
|
|
|
158 |
using_table_options(mysql_engine="InnoDB")
|
|
|
159 |
|
| 5504 |
phani.kuma |
160 |
class VoucherItemMapping(Entity):
|
| 5512 |
rajveer |
161 |
voucherType = Field(Integer, primary_key=True)
|
| 5504 |
phani.kuma |
162 |
item = ManyToOne('Item', primary_key=True)
|
|
|
163 |
amount = Field(Integer, default=0, server_default="0")
|
|
|
164 |
using_options(shortnames=True)
|
|
|
165 |
using_table_options(mysql_engine="InnoDB")
|
|
|
166 |
|
| 6039 |
amit.gupta |
167 |
class CategoryVatMaster(Entity):
|
| 7330 |
amit.gupta |
168 |
categoryId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
169 |
stateId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
170 |
minVal = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
171 |
maxVal = Field(Integer, primary_key=True, autoincrement=False)
|
| 6039 |
amit.gupta |
172 |
vatPercent = Field(Float)
|
|
|
173 |
using_options(shortnames=True)
|
|
|
174 |
using_table_options(mysql_engine="InnoDB")
|
|
|
175 |
|
| 21838 |
amit.gupta |
176 |
class CentralGstMaster(Entity):
|
|
|
177 |
hsnCode = Field(String(12), primary_key=True)
|
|
|
178 |
startDate = Field(DateTime, primary_key=True)
|
|
|
179 |
gstPercent = Field(Float)
|
|
|
180 |
using_options(shortnames=True)
|
|
|
181 |
using_table_options(mysql_engine="InnoDB")
|
|
|
182 |
|
|
|
183 |
class StateGstMaster(Entity):
|
|
|
184 |
hsnCode = Field(String(12), primary_key=True)
|
|
|
185 |
startDate = Field(DateTime, primary_key=True)
|
|
|
186 |
stateId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
187 |
sgstPercent = Field(Float)
|
|
|
188 |
cgstPercent = Field(Float)
|
|
|
189 |
using_options(shortnames=True)
|
|
|
190 |
using_table_options(mysql_engine="InnoDB")
|
|
|
191 |
|
| 6255 |
rajveer |
192 |
class OOSTracker(Entity):
|
|
|
193 |
itemId = Field(Integer, primary_key=True)
|
|
|
194 |
using_options(shortnames=True)
|
|
|
195 |
using_table_options(mysql_engine="InnoDB")
|
| 6532 |
amit.gupta |
196 |
|
|
|
197 |
class EntityTag(Entity):
|
|
|
198 |
tag = Field(String(100),primary_key=True)
|
|
|
199 |
entityId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
200 |
using_options(shortnames=True)
|
|
|
201 |
using_table_options(mysql_engine="InnoDB")
|
| 6848 |
kshitij.so |
202 |
|
|
|
203 |
class Banner(Entity):
|
|
|
204 |
bannerName = Field(String(100),primary_key=True)
|
|
|
205 |
imageName = Field(String(100))
|
|
|
206 |
link = Field(String(400))
|
|
|
207 |
priority = Field(Integer)
|
|
|
208 |
hasMap = Field(Boolean)
|
| 9156 |
amit.gupta |
209 |
bannerType = Field(Integer,primary_key=True, autoincrement=False)
|
| 6848 |
kshitij.so |
210 |
using_options(shortnames=True)
|
|
|
211 |
using_table_options(mysql_engine="InnoDB")
|
|
|
212 |
|
|
|
213 |
class BannerMap(Entity):
|
|
|
214 |
bannerName = Field(String(100))
|
|
|
215 |
mapLink = Field(String(400))
|
|
|
216 |
coordinates = Field(String(20))
|
| 9155 |
kshitij.so |
217 |
bannerType = Field(Integer)
|
| 6848 |
kshitij.so |
218 |
using_options(shortnames=True)
|
|
|
219 |
using_table_options(mysql_engine="InnoDB")
|
| 8579 |
kshitij.so |
220 |
|
|
|
221 |
class BannerUriMapping(Entity):
|
|
|
222 |
bannerName = Field(String(100))
|
|
|
223 |
uri = Field(String(100))
|
|
|
224 |
isActive = Field(Boolean)
|
| 9155 |
kshitij.so |
225 |
bannerType = Field(Integer)
|
| 10097 |
kshitij.so |
226 |
target = Field(Boolean)
|
| 8579 |
kshitij.so |
227 |
using_options(shortnames=True)
|
|
|
228 |
using_table_options(mysql_engine="InnoDB")
|
|
|
229 |
|
|
|
230 |
class Campaign(Entity):
|
|
|
231 |
id = Field(Integer,primary_key=True)
|
|
|
232 |
campaignName = Field(String(255))
|
|
|
233 |
imageName = Field(String(255))
|
|
|
234 |
using_options(shortnames=True)
|
|
|
235 |
using_table_options(mysql_engine="InnoDB")
|
| 6255 |
rajveer |
236 |
|
| 6805 |
anupam.sin |
237 |
class ItemInsurerMapping(Entity):
|
|
|
238 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
239 |
itemId = Field(Integer)
|
|
|
240 |
insurerId = Field(Integer)
|
|
|
241 |
premiumType = Field(Integer)
|
|
|
242 |
premiumAmount = Field(Float)
|
| 9299 |
kshitij.so |
243 |
insurerType = Field(Integer)
|
| 6805 |
anupam.sin |
244 |
using_options(shortnames=True)
|
|
|
245 |
using_table_options(mysql_engine="InnoDB")
|
|
|
246 |
|
|
|
247 |
class Insurer(Entity):
|
|
|
248 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
249 |
name = Field(String(255))
|
|
|
250 |
address = Field(String(255))
|
| 6903 |
anupam.sin |
251 |
declaredAmount = Field(BigInteger)
|
|
|
252 |
creditedAmount = Field(BigInteger)
|
| 9299 |
kshitij.so |
253 |
insurerType = Field(Integer)
|
| 6805 |
anupam.sin |
254 |
using_options(shortnames=True)
|
|
|
255 |
using_table_options(mysql_engine="InnoDB")
|
| 7190 |
amar.kumar |
256 |
|
|
|
257 |
class FreebieItem(Entity):
|
|
|
258 |
itemId = Field(Integer, primary_key=True)
|
|
|
259 |
freebieItemId = Field(Integer)
|
|
|
260 |
using_options(shortnames=True)
|
|
|
261 |
using_table_options(mysql_engine="InnoDB")
|
| 7256 |
rajveer |
262 |
|
| 7272 |
amit.gupta |
263 |
class BrandInfo(Entity):
|
|
|
264 |
name = Field(String(255), primary_key=True)
|
|
|
265 |
serviceCenterLocatorUrl = Field(String(255))
|
|
|
266 |
using_options(shortnames=True)
|
|
|
267 |
using_table_options(mysql_engine="InnoDB")
|
|
|
268 |
|
| 7256 |
rajveer |
269 |
class StorePricing(Entity):
|
|
|
270 |
item = ManyToOne('Item', primary_key=True)
|
|
|
271 |
recommendedPrice = Field(Float)
|
|
|
272 |
minPrice = Field(Float)
|
|
|
273 |
maxPrice = Field(Float)
|
|
|
274 |
minAdvancePrice = Field(Float)
|
| 7308 |
rajveer |
275 |
freebieItemId = Field(Integer)
|
| 7351 |
rajveer |
276 |
absoluteMinPrice = Field(Float)
|
| 7308 |
rajveer |
277 |
bestDealText = Field(String(100))
|
| 7256 |
rajveer |
278 |
using_options(shortnames=True)
|
| 7291 |
vikram.rag |
279 |
using_table_options(mysql_engine="InnoDB")
|
|
|
280 |
|
| 7281 |
kshitij.so |
281 |
class Amazonlisted(Entity):
|
| 7396 |
kshitij.so |
282 |
itemId = Field(Integer, primary_key=True, autoincrement=False)
|
| 7281 |
kshitij.so |
283 |
asin = Field(String(255))
|
|
|
284 |
name = Field(String(255))
|
|
|
285 |
brand = Field(String(255))
|
|
|
286 |
model = Field(String(255))
|
|
|
287 |
manufacturer_name = Field(String(255))
|
|
|
288 |
part_number = Field(String(255))
|
|
|
289 |
ean = Field(String(255))
|
|
|
290 |
upc = Field(String(255))
|
|
|
291 |
fbaPrice = Field(Float)
|
| 10909 |
vikram.rag |
292 |
fbbPrice = Field(Float)
|
| 12888 |
kshitij.so |
293 |
fbgPrice = Field(Float)
|
| 15687 |
kshitij.so |
294 |
fbdPrice = Field(Float)
|
| 7281 |
kshitij.so |
295 |
sellingPrice = Field(Float)
|
|
|
296 |
isFba = Field(Boolean)
|
|
|
297 |
isNonFba = Field(Boolean)
|
| 10909 |
vikram.rag |
298 |
isFbb = Field(Boolean)
|
| 12888 |
kshitij.so |
299 |
isFbg = Field(Boolean)
|
| 15687 |
kshitij.so |
300 |
isFbd = Field(Boolean)
|
| 7281 |
kshitij.so |
301 |
isInventoryOverride = Field(Boolean)
|
| 12448 |
kshitij.so |
302 |
otherCost = Field(Float, default=0.0, server_default="0.0")
|
| 7281 |
kshitij.so |
303 |
color = Field(String(255))
|
|
|
304 |
category = Field(String(255))
|
| 7367 |
kshitij.so |
305 |
handlingTime = Field(Integer)
|
|
|
306 |
isCustomTime = Field(Boolean)
|
| 7516 |
vikram.rag |
307 |
category_code = Field(Integer, default=0, server_default="0")
|
| 10920 |
vikram.rag |
308 |
fbbListedOn = Field(DateTime)
|
| 7770 |
kshitij.so |
309 |
mfnPriceLastUpdatedOn = Field(DateTime)
|
|
|
310 |
fbaPriceLastUpdatedOn = Field(DateTime)
|
| 10909 |
vikram.rag |
311 |
fbbPriceLastUpdatedOn = Field(DateTime)
|
| 12888 |
kshitij.so |
312 |
fbgPriceLastUpdatedOn = Field(DateTime)
|
| 15687 |
kshitij.so |
313 |
fbdPriceLastUpdatedOn = Field(DateTime)
|
| 7770 |
kshitij.so |
314 |
mfnPriceLastUpdatedOnSc = Field(DateTime)
|
|
|
315 |
fbaPriceLastUpdatedOnSc = Field(DateTime)
|
| 10909 |
vikram.rag |
316 |
fbbPriceLastUpdatedOnSc = Field(DateTime)
|
| 12888 |
kshitij.so |
317 |
fbgPriceLastUpdatedOnSc = Field(DateTime)
|
| 15687 |
kshitij.so |
318 |
fbdPriceLastUpdatedOnSc = Field(DateTime)
|
| 8139 |
kshitij.so |
319 |
suppressMfnPriceUpdate = Field(Boolean)
|
| 8140 |
kshitij.so |
320 |
suppressFbaPriceUpdate = Field(Boolean)
|
| 10909 |
vikram.rag |
321 |
suppressFbbPriceUpdate = Field(Boolean)
|
| 12888 |
kshitij.so |
322 |
suppressFbgPriceUpdate = Field(Boolean)
|
| 15687 |
kshitij.so |
323 |
suppressFbdPriceUpdate = Field(Boolean)
|
| 8619 |
kshitij.so |
324 |
taxCode = Field(String(255))
|
| 10909 |
vikram.rag |
325 |
fbbtaxCode = Field(String(255))
|
| 12888 |
kshitij.so |
326 |
fbgtaxCode = Field(String(255))
|
| 15687 |
kshitij.so |
327 |
fbdtaxCode = Field(String(255))
|
| 12363 |
kshitij.so |
328 |
overrrideWanlc = Field(Boolean)
|
|
|
329 |
exceptionalWanlc = Field(Float)
|
| 12396 |
kshitij.so |
330 |
autoDecrement = Field(Boolean)
|
|
|
331 |
autoIncrement = Field(Boolean)
|
|
|
332 |
autoFavourite = Field(Boolean)
|
|
|
333 |
manualFavourite = Field(Boolean)
|
| 12663 |
kshitij.so |
334 |
fbaPromoPrice = Field(Float, default=0.0, server_default="0.0")
|
|
|
335 |
fbbPromoPrice = Field(Float, default=0.0, server_default="0.0")
|
| 12888 |
kshitij.so |
336 |
fbgPromoPrice = Field(Float, default=0.0, server_default="0.0")
|
| 15687 |
kshitij.so |
337 |
fbdPromoPrice = Field(Float, default=0.0, server_default="0.0")
|
| 12719 |
kshitij.so |
338 |
fbaPromoStartDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
|
|
339 |
fbaPromoEndDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
|
|
340 |
fbbPromoStartDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
|
|
341 |
fbbPromoEndDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
| 12888 |
kshitij.so |
342 |
fbgPromoStartDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
|
|
343 |
fbgPromoEndDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
| 15687 |
kshitij.so |
344 |
fbdPromoStartDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
|
|
345 |
fbdPromoEndDate = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
| 12663 |
kshitij.so |
346 |
fbaPromotionActive = Field(Boolean)
|
|
|
347 |
fbbPromotionActive = Field(Boolean)
|
| 12888 |
kshitij.so |
348 |
fbgPromotionActive = Field(Boolean)
|
| 15687 |
kshitij.so |
349 |
fbdPromotionActive = Field(Boolean)
|
|
|
350 |
packagingHeight = Field(Float)
|
|
|
351 |
packagingLength = Field(Float)
|
|
|
352 |
packagingWidth = Field(Float)
|
|
|
353 |
packagingWeight = Field(Float)
|
| 7281 |
kshitij.so |
354 |
using_options(shortnames=True)
|
|
|
355 |
using_table_options(mysql_engine="InnoDB")
|
|
|
356 |
|
| 7977 |
kshitij.so |
357 |
class PageViewEvents(Entity):
|
|
|
358 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| 8139 |
kshitij.so |
359 |
catalogId = Field(Integer,index=True)
|
|
|
360 |
url = Field(String(255),index=True)
|
| 7977 |
kshitij.so |
361 |
sellingPrice = Field(Float)
|
|
|
362 |
comingSoon = Field(Boolean)
|
|
|
363 |
ip = Field(String(255))
|
|
|
364 |
sessionId = Field(String(255))
|
| 8139 |
kshitij.so |
365 |
eventTimestamp = Field(DateTime,index=True)
|
| 7977 |
kshitij.so |
366 |
using_options(shortnames=True)
|
|
|
367 |
using_table_options(mysql_engine="InnoDB")
|
|
|
368 |
|
|
|
369 |
class CartEvents(Entity):
|
|
|
370 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| 8139 |
kshitij.so |
371 |
catalogId = Field(Integer,index=True)
|
|
|
372 |
itemId = Field(Integer,index=True)
|
| 7977 |
kshitij.so |
373 |
sellingPrice = Field(Float)
|
|
|
374 |
inStock = Field(Boolean)
|
|
|
375 |
comingSoon = Field(Boolean)
|
|
|
376 |
ip = Field(String(255))
|
|
|
377 |
sessionId = Field(String(255))
|
| 8139 |
kshitij.so |
378 |
eventTimestamp = Field(DateTime,index=True)
|
| 7977 |
kshitij.so |
379 |
using_options(shortnames=True)
|
|
|
380 |
using_table_options(mysql_engine="InnoDB")
|
|
|
381 |
|
| 8182 |
amar.kumar |
382 |
class EbayItem(Entity):
|
|
|
383 |
ebayListingId = Field(String(32), primary_key=True)
|
|
|
384 |
itemId = Field(Integer, primary_key=True, autoincrement = False)
|
|
|
385 |
listingName = Field(String(255))
|
|
|
386 |
listingPrice = Field(Float)
|
|
|
387 |
listingExpiryDate = Field(DateTime)
|
|
|
388 |
subsidy = Field(Float)
|
|
|
389 |
defaultWarehouseId = Field(Integer)
|
|
|
390 |
using_options(shortnames=True)
|
|
|
391 |
using_table_options(mysql_engine="InnoDB")
|
| 8739 |
vikram.rag |
392 |
|
|
|
393 |
class SnapdealItem(Entity):
|
|
|
394 |
item_id = Field(Integer, primary_key=True, autoincrement = False)
|
|
|
395 |
exceptionPrice = Field(Float)
|
|
|
396 |
warehouseId = Field(Integer)
|
| 9242 |
kshitij.so |
397 |
transferPrice = Field(Float)
|
|
|
398 |
sellingPrice = Field(Float)
|
|
|
399 |
courierCost = Field(Float)
|
| 11095 |
kshitij.so |
400 |
courierCostMarketplace = Field(Float)
|
| 9242 |
kshitij.so |
401 |
commission = Field(Float)
|
|
|
402 |
serviceTax = Field(Float)
|
|
|
403 |
updatedOn = Field(DateTime)
|
| 9404 |
vikram.rag |
404 |
maxNlc = Field(Float)
|
| 9478 |
kshitij.so |
405 |
skuAtSnapdeal = Field(String(255))
|
| 9242 |
kshitij.so |
406 |
isListedOnSnapdeal = Field(Boolean)
|
|
|
407 |
suppressPriceFeed = Field(Boolean)
|
|
|
408 |
suppressInventoryFeed = Field(Boolean)
|
| 9568 |
kshitij.so |
409 |
supc = Field(String(255))
|
| 9724 |
kshitij.so |
410 |
shippingTime = Field(Integer)
|
| 9779 |
kshitij.so |
411 |
priceUpdatedBy = Field(String(255))
|
| 14780 |
manish.sha |
412 |
isVoiListed = Field(Boolean)
|
|
|
413 |
voiSellingPrice = Field(Float)
|
|
|
414 |
suppressVoiPriceFeed = Field(Boolean)
|
|
|
415 |
voiPriceLastUpdatedOn = Field(DateTime)
|
|
|
416 |
voiSkuAtSnapdeal = Field(String(255))
|
|
|
417 |
minimumPossibleSpVoi = Field(Float)
|
|
|
418 |
minimumPossibleTpVoi = Field(Float)
|
|
|
419 |
courierCostVoi = Field(Float)
|
|
|
420 |
serviceTaxVoi = Field(Float)
|
|
|
421 |
transferPriceVoi = Field(Float)
|
|
|
422 |
commissionVoi = Field(Float)
|
| 14862 |
manish.sha |
423 |
courierCostMarketplaceVoi = Field(Float)
|
|
|
424 |
commissionPercentageVoi = Field(Float)
|
| 8739 |
vikram.rag |
425 |
using_options(shortnames=True)
|
|
|
426 |
using_table_options(mysql_engine="InnoDB")
|
| 9242 |
kshitij.so |
427 |
|
| 10097 |
kshitij.so |
428 |
class MarketPlaceUpdateHistory(Entity):
|
| 9242 |
kshitij.so |
429 |
id = Field(Integer, primary_key=True, autoincrement = True)
|
|
|
430 |
item_id = Field(Integer)
|
| 10097 |
kshitij.so |
431 |
source = Field(Integer)
|
|
|
432 |
isListedOnSource = Field(Boolean)
|
| 9242 |
kshitij.so |
433 |
exceptionPrice = Field(Float)
|
|
|
434 |
warehouseId = Field(Integer)
|
|
|
435 |
transferPrice = Field(Float)
|
|
|
436 |
sellingPrice = Field(Float)
|
|
|
437 |
courierCost = Field(Float)
|
| 11095 |
kshitij.so |
438 |
courierCostMarketplace = Field(Float)
|
| 9242 |
kshitij.so |
439 |
commission = Field(Float)
|
|
|
440 |
serviceTax = Field(Float)
|
|
|
441 |
suppressPriceFeed = Field(Boolean)
|
|
|
442 |
suppressInventoryFeed = Field(Boolean)
|
| 9478 |
kshitij.so |
443 |
maxNlc = Field(Float)
|
| 10097 |
kshitij.so |
444 |
skuAtSource = Field(String(255))
|
| 9242 |
kshitij.so |
445 |
updatedOn = Field(DateTime)
|
| 10097 |
kshitij.so |
446 |
marketPlaceSerialNumber = Field(String(255))
|
| 9779 |
kshitij.so |
447 |
priceUpdatedBy = Field(String(255))
|
| 9242 |
kshitij.so |
448 |
using_options(shortnames=True)
|
|
|
449 |
using_table_options(mysql_engine="InnoDB")
|
| 9724 |
kshitij.so |
450 |
|
|
|
451 |
class MarketplaceItems(Entity):
|
|
|
452 |
itemId = Field(Integer,primary_key=True, autoincrement = False)
|
|
|
453 |
source = Field(Integer,primary_key=True, autoincrement = False)
|
|
|
454 |
emiFee = Field(Float)
|
|
|
455 |
courierCost = Field(Float)
|
| 11095 |
kshitij.so |
456 |
courierCostMarketplace = Field(Float)
|
| 9724 |
kshitij.so |
457 |
closingFee = Field(Float)
|
|
|
458 |
returnProvision = Field(Float)
|
|
|
459 |
commission = Field(Float)
|
| 10287 |
kshitij.so |
460 |
pgFee = Field(Float)
|
| 9724 |
kshitij.so |
461 |
vat = Field(Float)
|
|
|
462 |
packagingCost = Field(Float)
|
|
|
463 |
otherCost = Field(Float)
|
|
|
464 |
serviceTax = Field(Float)
|
|
|
465 |
autoIncrement = Field(Boolean)
|
|
|
466 |
autoDecrement = Field(Boolean)
|
|
|
467 |
manualFavourite = Field(Boolean)
|
|
|
468 |
autoFavourite = Field(Boolean)
|
|
|
469 |
currentSp = Field(Float)
|
|
|
470 |
currentTp = Field(Float)
|
|
|
471 |
minimumPossibleSp = Field(Float)
|
|
|
472 |
minimumPossibleTp = Field(Float)
|
| 9909 |
kshitij.so |
473 |
maximumSellingPrice = Field(Float)
|
| 9724 |
kshitij.so |
474 |
lastCheckedTimestamp = Field(DateTime)
|
|
|
475 |
using_options(shortnames=True)
|
|
|
476 |
using_table_options(mysql_engine="InnoDB")
|
| 7977 |
kshitij.so |
477 |
|
| 9621 |
manish.sha |
478 |
class ProductFeedSubmit(Entity):
|
|
|
479 |
catalogItemId = Field(Integer, primary_key=True)
|
|
|
480 |
stockLinkedFeed = Field(Boolean)
|
|
|
481 |
using_options(shortnames=True)
|
|
|
482 |
using_table_options(mysql_engine="InnoDB")
|
| 9776 |
vikram.rag |
483 |
|
|
|
484 |
class MarketPlaceItemPrice(Entity):
|
|
|
485 |
item_id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
486 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
487 |
sellingPrice = Field(Float)
|
|
|
488 |
lastUpdatedOn = Field(DateTime)
|
|
|
489 |
lastUpdatedOnMarketplace = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 15:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
|
|
490 |
suppressPriceFeed = Field(Boolean)
|
|
|
491 |
isListedOnSource = Field(Boolean)
|
|
|
492 |
using_options(shortnames=True)
|
|
|
493 |
using_table_options(mysql_engine="InnoDB")
|
| 9242 |
kshitij.so |
494 |
|
| 9779 |
kshitij.so |
495 |
class SourcePercentageMaster(Entity):
|
|
|
496 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
497 |
emiFee = Field(Float)
|
|
|
498 |
closingFee = Field(Float)
|
|
|
499 |
returnProvision = Field(Float)
|
|
|
500 |
commission = Field(Float)
|
| 10287 |
kshitij.so |
501 |
pgFee = Field(Float)
|
| 9884 |
kshitij.so |
502 |
competitorCommissionAccessory = Field(Float)
|
|
|
503 |
competitorCommissionOther = Field(Float)
|
| 9779 |
kshitij.so |
504 |
serviceTax = Field(Float)
|
|
|
505 |
using_options(shortnames=True)
|
|
|
506 |
using_table_options(mysql_engine="InnoDB")
|
|
|
507 |
|
|
|
508 |
class SourceItemPercentage(Entity):
|
|
|
509 |
item_id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
510 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
511 |
emiFee = Field(Float)
|
|
|
512 |
closingFee = Field(Float)
|
|
|
513 |
returnProvision = Field(Float)
|
|
|
514 |
commission = Field(Float)
|
| 10287 |
kshitij.so |
515 |
pgFee = Field(Float)
|
| 9884 |
kshitij.so |
516 |
competitorCommissionAccessory = Field(Float)
|
|
|
517 |
competitorCommissionOther = Field(Float)
|
| 9779 |
kshitij.so |
518 |
serviceTax = Field(Float)
|
| 10097 |
kshitij.so |
519 |
startDate = Field(DateTime, primary_key=True, autoincrement=False)
|
|
|
520 |
expiryDate = Field(DateTime)
|
| 9779 |
kshitij.so |
521 |
using_options(shortnames=True)
|
|
|
522 |
using_table_options(mysql_engine="InnoDB")
|
|
|
523 |
|
| 10097 |
kshitij.so |
524 |
class SourceCategoryPercentage(Entity):
|
|
|
525 |
category_id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
526 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
527 |
emiFee = Field(Float)
|
|
|
528 |
closingFee = Field(Float)
|
|
|
529 |
returnProvision = Field(Float)
|
|
|
530 |
commission = Field(Float)
|
| 10287 |
kshitij.so |
531 |
pgFee = Field(Float)
|
| 10097 |
kshitij.so |
532 |
competitorCommissionAccessory = Field(Float)
|
|
|
533 |
competitorCommissionOther = Field(Float)
|
|
|
534 |
serviceTax = Field(Float)
|
|
|
535 |
startDate = Field(DateTime, primary_key=True, autoincrement=False)
|
|
|
536 |
expiryDate = Field(DateTime)
|
|
|
537 |
using_options(shortnames=True)
|
|
|
538 |
using_table_options(mysql_engine="InnoDB")
|
|
|
539 |
|
| 9884 |
kshitij.so |
540 |
class MarketPlaceHistory(Entity):
|
|
|
541 |
item_id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
542 |
source = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
543 |
lowestPossibleTp = Field(Float)
|
|
|
544 |
lowestPossibleSp = Field(Float)
|
|
|
545 |
ourInventory = Field(Integer)
|
|
|
546 |
otherInventory = Field(Integer)
|
|
|
547 |
secondLowestInventory = Field(Integer)
|
|
|
548 |
ourRank = Field(Integer)
|
| 11193 |
kshitij.so |
549 |
ourOfferPrice = Field(Float)
|
|
|
550 |
ourSellingPrice = Field(Float)
|
|
|
551 |
ourTp = Field(Float)
|
|
|
552 |
ourNlc = Field(Float)
|
|
|
553 |
ourRating = Field(Float)
|
|
|
554 |
ourShippingTime = Field(String(10))
|
| 9884 |
kshitij.so |
555 |
competitionBasis = Field(Integer)
|
|
|
556 |
competitiveCategory = Field(Integer)
|
|
|
557 |
risky = Field(Boolean)
|
|
|
558 |
lowestOfferPrice = Field(Float)
|
|
|
559 |
lowestSellingPrice = Field(Float)
|
| 11193 |
kshitij.so |
560 |
lowestTp = Field(Float)
|
| 9884 |
kshitij.so |
561 |
lowestSellerName = Field(String(255))
|
|
|
562 |
lowestSellerCode = Field(String(255))
|
| 11193 |
kshitij.so |
563 |
lowestSellerRating = Field(Float)
|
|
|
564 |
lowestSellerShippingTime = Field(String(10))
|
| 9884 |
kshitij.so |
565 |
proposedSellingPrice = Field(Float)
|
|
|
566 |
proposedTp = Field(Float)
|
|
|
567 |
targetNlc = Field(Float)
|
|
|
568 |
salesPotential = Field(Integer)
|
|
|
569 |
secondLowestSellerName = Field(String(255))
|
|
|
570 |
secondLowestSellerCode = Field(String(255))
|
|
|
571 |
secondLowestSellingPrice = Field(Float)
|
|
|
572 |
secondLowestOfferPrice = Field(Float)
|
|
|
573 |
secondLowestTp = Field(Float)
|
| 11193 |
kshitij.so |
574 |
secondLowestSellerRating = Field(Float)
|
|
|
575 |
secondLowestSellerShippingTime = Field(String(10))
|
|
|
576 |
prefferedSellerName = Field(String(255))
|
|
|
577 |
prefferedSellerCode = Field(String(255))
|
|
|
578 |
prefferedSellerSellingPrice = Field(Float)
|
|
|
579 |
prefferedSellerOfferPrice = Field(Float)
|
|
|
580 |
prefferedSellerTp = Field(Float)
|
|
|
581 |
prefferedSellerRating = Field(Float)
|
|
|
582 |
prefferedSellerShippingTime = Field(String(10))
|
| 9884 |
kshitij.so |
583 |
marginIncreasedPotential = Field(Float)
|
|
|
584 |
margin = Field(Float)
|
|
|
585 |
competitorEnoughStock = Field(Boolean)
|
|
|
586 |
ourEnoughStock = Field(Boolean)
|
|
|
587 |
totalSeller = Field(Integer)
|
|
|
588 |
avgSales = Field(Float)
|
|
|
589 |
decision = Field(Integer)
|
| 9909 |
kshitij.so |
590 |
reason = Field(String(255))
|
| 9949 |
kshitij.so |
591 |
run = Field(Integer)
|
| 11193 |
kshitij.so |
592 |
toGroup = Field(Boolean)
|
| 9884 |
kshitij.so |
593 |
timestamp =Field(DateTime, primary_key=True, autoincrement=False)
|
|
|
594 |
using_options(shortnames=True)
|
|
|
595 |
using_table_options(mysql_engine="InnoDB")
|
| 11193 |
kshitij.so |
596 |
|
| 9884 |
kshitij.so |
597 |
|
| 9945 |
vikram.rag |
598 |
class FlipkartItem(Entity):
|
|
|
599 |
item_id = Field(Integer, primary_key=True, autoincrement = False)
|
|
|
600 |
exceptionPrice = Field(Float)
|
|
|
601 |
warehouseId = Field(Integer)
|
|
|
602 |
commissionValue = Field(Float)
|
|
|
603 |
serviceTaxValue = Field(Float)
|
|
|
604 |
maxNlc = Field(Float)
|
|
|
605 |
skuAtFlipkart = Field(String(255))
|
|
|
606 |
isListedOnFlipkart = Field(Boolean)
|
|
|
607 |
suppressPriceFeed = Field(Boolean)
|
|
|
608 |
suppressInventoryFeed = Field(Boolean)
|
| 10097 |
kshitij.so |
609 |
flipkartSerialNumber = Field(String(255))
|
| 9945 |
vikram.rag |
610 |
updatedOn = Field(DateTime)
|
|
|
611 |
updatedBy = Field(String(255))
|
| 14780 |
manish.sha |
612 |
isFaListed = Field(Boolean)
|
| 9945 |
vikram.rag |
613 |
using_options(shortnames=True)
|
|
|
614 |
using_table_options(mysql_engine="InnoDB")
|
| 13709 |
manish.sha |
615 |
|
|
|
616 |
'''
|
|
|
617 |
class DealTag(Entity):
|
|
|
618 |
id = Field(Integer, primary_key=True, autoincrement = True)
|
|
|
619 |
name = Field(String(100))
|
|
|
620 |
using_options(shortnames=True)
|
|
|
621 |
using_table_options(mysql_engine="InnoDB")
|
|
|
622 |
|
|
|
623 |
class ItemTag(Entity):
|
|
|
624 |
itemId= Field(Integer, primary_key=True)
|
|
|
625 |
tagId = Field(Integer, primary_key=True)
|
|
|
626 |
startDate = Field(DateTime)
|
|
|
627 |
endDate = Field(DateTime)
|
|
|
628 |
status = Field(Boolean)
|
|
|
629 |
using_options(shortnames=True)
|
|
|
630 |
using_table_options(mysql_engine="InnoDB")
|
|
|
631 |
'''
|
|
|
632 |
|
| 11531 |
vikram.rag |
633 |
class PrivateDeals(Entity):
|
|
|
634 |
item_id = Field(Integer, primary_key=True, autoincrement = False)
|
|
|
635 |
dealFreebieItemId = Field(Integer)
|
|
|
636 |
dealPrice = Field(Float)
|
|
|
637 |
startDate = Field(DateTime)
|
|
|
638 |
endDate = Field(DateTime)
|
| 11566 |
vikram.rag |
639 |
dealTextOption = Field(Integer)
|
| 11531 |
vikram.rag |
640 |
dealText = Field(String(500))
|
|
|
641 |
isCod = Field(Boolean)
|
|
|
642 |
rank = Field(Integer)
|
| 11566 |
vikram.rag |
643 |
dealFreebieOption = Field(Integer)
|
| 11606 |
vikram.rag |
644 |
isActive = Field(Boolean)
|
| 13493 |
amit.gupta |
645 |
minLot = Field(Integer)
|
|
|
646 |
lotDealPrice = Field(Float)
|
| 11531 |
vikram.rag |
647 |
using_options(shortnames=True)
|
|
|
648 |
using_table_options(mysql_engine="InnoDB")
|
| 11816 |
kshitij.so |
649 |
|
|
|
650 |
class AmazonOutOfSync(Entity):
|
|
|
651 |
item_id = Field(Integer, primary_key=True, autoincrement = False)
|
|
|
652 |
mfn = Field(Boolean)
|
|
|
653 |
fba = Field(Boolean)
|
|
|
654 |
fbb = Field(Boolean)
|
|
|
655 |
using_options(shortnames=True)
|
|
|
656 |
using_table_options(mysql_engine="InnoDB")
|
| 11531 |
vikram.rag |
657 |
|
| 11905 |
kshitij.so |
658 |
class PrivateDealsPriceComparison(Entity):
|
|
|
659 |
item_id= Field(Integer, primary_key=True, autoincrement=False)
|
| 12133 |
kshitij.so |
660 |
asin = Field(String(20))
|
|
|
661 |
fsn = Field(String(20))
|
|
|
662 |
supc = Field(String(20))
|
| 11905 |
kshitij.so |
663 |
sdPrice = Field(Float)
|
|
|
664 |
fkPrice = Field(Float)
|
|
|
665 |
amazonPrice = Field(Float)
|
|
|
666 |
dealPrice = Field(Float)
|
|
|
667 |
saholicPrice = Field(Float)
|
|
|
668 |
lastProcessedTimestamp = Field(DateTime)
|
|
|
669 |
using_options(shortnames=True)
|
|
|
670 |
using_table_options(mysql_engine="InnoDB")
|
| 11531 |
vikram.rag |
671 |
|
| 12133 |
kshitij.so |
672 |
class SourceReturnPercentage(Entity):
|
|
|
673 |
source = Field(Integer)
|
|
|
674 |
brand = Field(String(100))
|
|
|
675 |
category_id = Field(Integer)
|
|
|
676 |
returnProvision = Field(Float)
|
|
|
677 |
using_options(shortnames=True)
|
|
|
678 |
using_table_options(mysql_engine="InnoDB")
|
| 12256 |
kshitij.so |
679 |
|
|
|
680 |
class CompetitorPricingRequest(Entity):
|
|
|
681 |
requestId = Field(BigInteger, primary_key=True,autoincrement=False)
|
|
|
682 |
user = Field(String(50))
|
|
|
683 |
isProcessed = Field(Boolean)
|
|
|
684 |
competitorPricing = OneToMany("CompetitorPricing")
|
|
|
685 |
using_options(shortnames=True)
|
|
|
686 |
using_table_options(mysql_engine="InnoDB")
|
| 12243 |
kshitij.so |
687 |
|
|
|
688 |
class CompetitorPricing(Entity):
|
|
|
689 |
item_id = Field(Integer)
|
|
|
690 |
snapdealScraping = Field(Boolean)
|
|
|
691 |
flipkartScraping = Field(Boolean)
|
|
|
692 |
amazonScraping = Field(Boolean)
|
| 12256 |
kshitij.so |
693 |
ourSnapdealPrice = Field(Float)
|
|
|
694 |
ourSnapdealOfferPrice = Field(Float)
|
|
|
695 |
ourSnapdealInventory = Field(Integer)
|
| 12243 |
kshitij.so |
696 |
lowestSnapdealPrice = Field(Float)
|
| 12256 |
kshitij.so |
697 |
lowestSnapdealOfferPrice = Field(Float)
|
|
|
698 |
lowestSnapdealSeller = Field(String(255))
|
|
|
699 |
lowestSnapdealSellerInventory = Field(Integer)
|
|
|
700 |
ourFlipkartPrice = Field(Float)
|
|
|
701 |
ourFlipkartInventory = Field(Integer)
|
| 12243 |
kshitij.so |
702 |
lowestFlipkartPrice = Field(Float)
|
| 12256 |
kshitij.so |
703 |
lowestFlipkartSeller = Field(String(255))
|
| 15485 |
kshitij.so |
704 |
ourAmazonPrice = Field(Float)
|
| 12256 |
kshitij.so |
705 |
lowestAmazonPrice = Field(Float)
|
| 15485 |
kshitij.so |
706 |
lowestAmazonSeller = Field(String(255))
|
| 12256 |
kshitij.so |
707 |
competitorPricing = ManyToOne("CompetitorPricingRequest")
|
| 12243 |
kshitij.so |
708 |
using_options(shortnames=True)
|
|
|
709 |
using_table_options(mysql_engine="InnoDB")
|
| 12363 |
kshitij.so |
710 |
|
|
|
711 |
class AmazonPromotion(Entity):
|
|
|
712 |
sku = Field(String(20))
|
|
|
713 |
standardPrice = Field(Float)
|
|
|
714 |
salePrice = Field(Float)
|
| 12431 |
kshitij.so |
715 |
subsidy = Field(Float)
|
| 12363 |
kshitij.so |
716 |
startDate = Field(DateTime)
|
|
|
717 |
endDate = Field(DateTime)
|
|
|
718 |
addedOn = Field(DateTime)
|
|
|
719 |
updatedOnMarketplace = Field(DateTime,default = datetime.datetime.strptime('01-01-1970 00:00:00', '%d-%m-%Y %H:%M:%S'),server_default = '1970-01-01')
|
|
|
720 |
promotionActive = Field(Boolean)
|
|
|
721 |
stateId = Field(Integer)
|
|
|
722 |
promotionType = Field(Integer)
|
|
|
723 |
using_options(shortnames=True)
|
|
|
724 |
using_table_options(mysql_engine="InnoDB")
|
| 12133 |
kshitij.so |
725 |
|
| 12363 |
kshitij.so |
726 |
class AmazonScrapingHistory(Entity):
|
|
|
727 |
item_id = Field(Integer, primary_key=True, autoincrement=False)
|
| 12472 |
kshitij.so |
728 |
asin = Field(String(255))
|
| 12363 |
kshitij.so |
729 |
warehouseLocation = Field(Integer, primary_key=True, autoincrement=False)
|
| 12396 |
kshitij.so |
730 |
parentCategoryId = Field(Integer)
|
| 12363 |
kshitij.so |
731 |
ourSellingPrice = Field(Float)
|
| 12474 |
kshitij.so |
732 |
promoPrice = Field(Float)
|
| 12511 |
kshitij.so |
733 |
subsidy = Field(Float)
|
| 12363 |
kshitij.so |
734 |
lowestPossibleSp = Field(Float)
|
|
|
735 |
ourRank = Field(Integer)
|
|
|
736 |
ourInventory = Field(Integer)
|
|
|
737 |
lowestSellerName = Field(String(255))
|
|
|
738 |
lowestSellerSp = Field(Float)
|
| 12431 |
kshitij.so |
739 |
lowestSellerShippingTime = Field(String(10))
|
|
|
740 |
lowestSellerRating = Field(String(10))
|
|
|
741 |
lowestSellerType = Field(String(20))
|
| 12363 |
kshitij.so |
742 |
secondLowestSellerName = Field(String(255))
|
|
|
743 |
secondLowestSellerSp = Field(Float)
|
| 12431 |
kshitij.so |
744 |
secondLowestSellerShippingTime = Field(String(10))
|
|
|
745 |
secondLowestSellerRating = Field(String(10))
|
|
|
746 |
secondLowestSellerType = Field(String(20))
|
| 12363 |
kshitij.so |
747 |
thirdLowestSellerName = Field(String(255))
|
|
|
748 |
thirdLowestSellerSp = Field(Float)
|
| 12431 |
kshitij.so |
749 |
thirdLowestSellerShippingTime = Field(String(10))
|
|
|
750 |
thirdLowestSellerRating = Field(String(10))
|
|
|
751 |
thirdLowestSellerType = Field(String(20))
|
| 12363 |
kshitij.so |
752 |
competitiveCategory = Field(Integer)
|
| 12448 |
kshitij.so |
753 |
otherCost = Field(Float)
|
| 12597 |
kshitij.so |
754 |
isLowestMfnIgnored = Field(Boolean)
|
|
|
755 |
lowestMfnIgnoredOffer = Field(Float)
|
|
|
756 |
isLowestMfn = Field(Boolean)
|
|
|
757 |
lowestMfnOffer = Field(Float)
|
|
|
758 |
isLowestFba = Field(Boolean)
|
|
|
759 |
lowestFbaOffer = Field(Float)
|
|
|
760 |
competitivePrice = Field(Float)
|
|
|
761 |
cheapestMfnCount = Field(Boolean)
|
| 12363 |
kshitij.so |
762 |
wanlc = Field(Float)
|
|
|
763 |
commission = Field(Float)
|
|
|
764 |
competitorCommission = Field(Float)
|
|
|
765 |
returnProvision = Field(Float)
|
| 12511 |
kshitij.so |
766 |
vatRate = Field(Float)
|
| 12363 |
kshitij.so |
767 |
courierCost = Field(Float)
|
|
|
768 |
risky = Field(Boolean)
|
|
|
769 |
runType = Field(Integer)
|
|
|
770 |
totalSeller = Field(Integer)
|
|
|
771 |
ourEnoughStock = Field(Boolean)
|
|
|
772 |
marginIncreasedPotential = Field(Float)
|
|
|
773 |
avgSale = Field(Float)
|
|
|
774 |
multipleListings = Field(Boolean)
|
| 12431 |
kshitij.so |
775 |
isPromotion = Field(Boolean)
|
| 12363 |
kshitij.so |
776 |
proposedSp = Field(Float)
|
|
|
777 |
proposedTp = Field(Float)
|
|
|
778 |
targetNlc = Field(Float)
|
|
|
779 |
decision = Field(Integer)
|
|
|
780 |
reason = Field(String(255))
|
| 12841 |
kshitij.so |
781 |
exceptionType = Field(Integer)
|
| 12843 |
kshitij.so |
782 |
isNlcOverridden = Field(Boolean)
|
| 15694 |
kshitij.so |
783 |
packagingHeight = Field(Float)
|
|
|
784 |
packagingLength = Field(Float)
|
|
|
785 |
packagingWidth = Field(Float)
|
|
|
786 |
packagingWeight = Field(Float)
|
|
|
787 |
isOversized = Field(Boolean)
|
| 12363 |
kshitij.so |
788 |
timestamp =Field(DateTime, primary_key=True, autoincrement=False)
|
|
|
789 |
using_options(shortnames=True)
|
|
|
790 |
using_table_options(mysql_engine="InnoDB")
|
|
|
791 |
|
|
|
792 |
|
| 12620 |
amit.gupta |
793 |
class ExclusiveAffiliateItemInfo(Entity):
|
|
|
794 |
itemId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
795 |
affiliateId = Field(Integer)
|
|
|
796 |
offerText = Field(String(1023))
|
|
|
797 |
offerUrl = Field(String(255))
|
|
|
798 |
mOfferText = Field(String(1023))
|
|
|
799 |
mOfferUrl = Field(String(255))
|
|
|
800 |
affiliateSku = Field(String(255))
|
|
|
801 |
affiliateUrl = Field(String(255))
|
|
|
802 |
addedOn = Field(DateTime)
|
|
|
803 |
updatedOn = Field(DateTime)
|
|
|
804 |
isActive = Field(Boolean)
|
|
|
805 |
using_options(shortnames=True)
|
|
|
806 |
using_table_options(mysql_engine="InnoDB")
|
|
|
807 |
|
|
|
808 |
class OutboundAffiliateMaster(Entity):
|
|
|
809 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
810 |
name = Field(String(100))
|
|
|
811 |
using_options(shortnames=True)
|
|
|
812 |
using_table_options(mysql_engine="InnoDB")
|
| 13709 |
manish.sha |
813 |
|
|
|
814 |
class HsItem(Entity):
|
|
|
815 |
hsItemId = Field(String(32), primary_key=True)
|
|
|
816 |
itemId = Field(Integer, primary_key=True, autoincrement = False)
|
|
|
817 |
hsProductId = Field(String(32))
|
|
|
818 |
listingPrice = Field(Float)
|
|
|
819 |
defaultWarehouseId = Field(Integer)
|
|
|
820 |
addedTimestamp = Field(DateTime)
|
|
|
821 |
addedBy = Field(String(100))
|
|
|
822 |
using_options(shortnames=True)
|
|
|
823 |
using_table_options(mysql_engine="InnoDB")
|
| 12620 |
amit.gupta |
824 |
|
| 14862 |
manish.sha |
825 |
class VoiSnapdealItemInfo(Entity):
|
|
|
826 |
item_id = Field(Integer, primary_key=True, autoincrement = False)
|
|
|
827 |
voiSkuAtSnapdeal = Field(String(255))
|
|
|
828 |
sellingPriceSnapdeal = Field(Float)
|
|
|
829 |
transferPriceSnapdeal = Field(Float)
|
|
|
830 |
fixedMargin = Field(Float)
|
|
|
831 |
fixedMarginPercentage = Field(Float)
|
|
|
832 |
logisticCostSnapdeal = Field(Float)
|
|
|
833 |
woodenPackagingCost = Field(Float)
|
|
|
834 |
weightSnapdeal = Field(Float)
|
| 19691 |
manish.sha |
835 |
using_options(shortnames=True)
|
|
|
836 |
using_table_options(mysql_engine="InnoDB")
|
|
|
837 |
|
| 14862 |
manish.sha |
838 |
|
| 18150 |
kshitij.so |
839 |
class BulkItemPricing(Entity):
|
|
|
840 |
id = Field(Integer, primary_key=True, autoincrement = True)
|
|
|
841 |
item_id = Field(Integer, index=True)
|
|
|
842 |
quantity = Field(Integer)
|
|
|
843 |
price = Field(Float)
|
|
|
844 |
using_options(shortnames=True)
|
|
|
845 |
using_table_options(mysql_engine="InnoDB")
|
| 19691 |
manish.sha |
846 |
|
|
|
847 |
class ItemWarrantyInfo(Entity):
|
| 19714 |
manish.sha |
848 |
catalogItemId = Field(Integer, primary_key=True, autoincrement=False)
|
| 19691 |
manish.sha |
849 |
itemCondition = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
850 |
warrantyVal = Field(Integer)
|
|
|
851 |
warrantyPeriodType = Field(String(1))
|
|
|
852 |
using_options(shortnames=True)
|
|
|
853 |
using_table_options(mysql_engine="InnoDB")
|
|
|
854 |
|
|
|
855 |
class CategoryWarrantyInfo(Entity):
|
|
|
856 |
categoryId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
857 |
brand = Field(String(100), primary_key=True)
|
|
|
858 |
itemCondition = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
859 |
warrantyVal = Field(Integer)
|
|
|
860 |
warrantyPeriodType = Field(String(1))
|
|
|
861 |
using_options(shortnames=True)
|
|
|
862 |
using_table_options(mysql_engine="InnoDB")
|
| 22249 |
amit.gupta |
863 |
|
|
|
864 |
class Tag_Listing(Entity):
|
|
|
865 |
id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
866 |
item_id = Field(Integer)
|
| 26887 |
amit.gupta |
867 |
tag_id = Field(Integer)
|
|
|
868 |
mrp = Field(Float)
|
| 22249 |
amit.gupta |
869 |
selling_price = Field(Float)
|
|
|
870 |
created_by = Field(Integer)
|
|
|
871 |
active = Field(Boolean)
|
| 23806 |
tejbeer |
872 |
hot_deals = Field(Boolean)
|
| 22249 |
amit.gupta |
873 |
start_date = Field(DateTime)
|
|
|
874 |
create_timestamp = Field(DateTime)
|
|
|
875 |
support_price = Field(Float)
|
|
|
876 |
mop = Field(Float)
|
|
|
877 |
using_options(shortnames=True)
|
|
|
878 |
using_table_options(mysql_engine="InnoDB")
|
| 22309 |
amit.gupta |
879 |
|
|
|
880 |
class Tag_Ranking(Entity):
|
|
|
881 |
catalogItemId = Field(Integer)
|
| 24111 |
amit.gupta |
882 |
rankPoints = Field(Integer)
|
|
|
883 |
feature = Field(String(512))
|
| 22309 |
amit.gupta |
884 |
using_options(shortnames=True)
|
|
|
885 |
using_table_options(mysql_engine="InnoDB")
|
| 18150 |
kshitij.so |
886 |
|
| 22249 |
amit.gupta |
887 |
|
|
|
888 |
|
|
|
889 |
|
| 17770 |
kshitij.so |
890 |
def initialize(dbname='catalog', db_hostname="localhost", setup=True):
|
| 746 |
rajveer |
891 |
#metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
|
| 1122 |
chandransh |
892 |
#metadata.bind = 'mysql://root:shop2020@localhost/catalog'
|
| 6532 |
amit.gupta |
893 |
cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
|
|
894 |
metadata.bind = cengine
|
| 21838 |
amit.gupta |
895 |
metadata.bind.echo = True
|
| 17770 |
kshitij.so |
896 |
setup_all(setup)
|
| 115 |
ashish |
897 |
|
|
|
898 |
if __name__=="__main__":
|
| 9242 |
kshitij.so |
899 |
initialize()
|