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