| 104 |
ashish |
1 |
'''
|
|
|
2 |
Created on 29-Mar-2010
|
|
|
3 |
|
|
|
4 |
@author: ashish
|
|
|
5 |
'''
|
| 6594 |
anupam.sin |
6 |
from MySQLdb.constants.FLAG import AUTO_INCREMENT
|
| 4501 |
mandeep.dh |
7 |
from elixir import metadata, setup_all
|
| 104 |
ashish |
8 |
from elixir.entity import Entity
|
|
|
9 |
from elixir.fields import Field
|
| 4501 |
mandeep.dh |
10 |
from elixir.options import using_options, using_table_options
|
|
|
11 |
from elixir.relationships import ManyToOne, OneToMany
|
|
|
12 |
from sqlalchemy.engine import create_engine
|
| 6594 |
anupam.sin |
13 |
from sqlalchemy.types import Integer, String, Float, DateTime, Boolean, Enum, \
|
| 8282 |
kshitij.so |
14 |
Numeric, BigInteger, LargeBinary,Date
|
| 104 |
ashish |
15 |
|
|
|
16 |
#===============================================================================
|
|
|
17 |
# Different entities in the model
|
|
|
18 |
#===============================================================================
|
|
|
19 |
|
| 3187 |
rajveer |
20 |
def initialize(dbname='transaction', db_hostname="localhost", echoOn=True):
|
| 746 |
rajveer |
21 |
#metadata.bind = "sqlite:///Transactionsnew.sqlite"
|
| 1122 |
chandransh |
22 |
#metadata.bind = 'mysql://root:shop2020@localhost/transaction'
|
| 3187 |
rajveer |
23 |
engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
|
| 1122 |
chandransh |
24 |
metadata.bind = engine
|
| 1911 |
chandransh |
25 |
metadata.bind.echo = echoOn
|
| 483 |
rajveer |
26 |
setup_all(True)
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
if __name__=="__main__":
|
|
|
30 |
initialize()
|
| 2783 |
chandransh |
31 |
|
|
|
32 |
class InvoiceIDGenerator(Entity):
|
| 5527 |
anupam.sin |
33 |
id = Field(Integer)
|
| 5528 |
anupam.sin |
34 |
orderType = Field(Integer, primary_key = True)
|
| 2783 |
chandransh |
35 |
using_options(shortnames=True)
|
|
|
36 |
using_table_options(mysql_engine="InnoDB")
|
| 483 |
rajveer |
37 |
|
| 5508 |
rajveer |
38 |
class RechargeVoucherTracker(Entity):
|
|
|
39 |
order = ManyToOne("Order")
|
|
|
40 |
voucherType = Field(Integer)
|
|
|
41 |
amount = Field(Integer)
|
|
|
42 |
voucherIssued = Field(Boolean)
|
|
|
43 |
voucherCode = Field(String(30))
|
|
|
44 |
issuedOn = Field(DateTime)
|
|
|
45 |
using_options(shortnames=True)
|
|
|
46 |
using_table_options(mysql_engine="InnoDB")
|
|
|
47 |
|
| 483 |
rajveer |
48 |
class LineItem(Entity):
|
|
|
49 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| 699 |
chandransh |
50 |
item_id = Field(Integer)
|
| 963 |
chandransh |
51 |
productGroup = Field(String(100))
|
|
|
52 |
brand = Field(String(100))
|
|
|
53 |
model_number = Field(String(50))
|
|
|
54 |
model_name = Field(String(50))
|
| 669 |
chandransh |
55 |
color = Field(String(20))
|
| 483 |
rajveer |
56 |
extra_info = Field(String(100))
|
|
|
57 |
quantity = Field(Float)
|
|
|
58 |
unit_price = Field(Float)
|
|
|
59 |
unit_weight = Field(Float)
|
|
|
60 |
total_price = Field(Float)
|
| 996 |
varun.gupt |
61 |
transfer_price = Field(Float)
|
| 6751 |
amar.kumar |
62 |
nlc = Field(Float)
|
| 483 |
rajveer |
63 |
total_weight = Field(Float)
|
| 2783 |
chandransh |
64 |
item_number = Field(String(50))
|
| 7322 |
vikram.rag |
65 |
serial_number = Field(String(50))
|
| 4172 |
rajveer |
66 |
dealText = Field(String(100))
|
| 4295 |
varun.gupt |
67 |
warranty_expiry_timestamp = Field(DateTime)
|
| 483 |
rajveer |
68 |
order = ManyToOne("Order")
|
| 6039 |
amit.gupta |
69 |
vatRate = Field(Float)
|
| 746 |
rajveer |
70 |
using_options(shortnames=True)
|
|
|
71 |
using_table_options(mysql_engine="InnoDB")
|
|
|
72 |
|
| 1276 |
chandransh |
73 |
def __repr__(self):
|
|
|
74 |
return "{0} {1} {2} {3}".format(self.brand or "", self.model_name or "", self.model_number or "", self.color or "")
|
|
|
75 |
|
| 483 |
rajveer |
76 |
class Order(Entity):
|
|
|
77 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
78 |
warehouse_id = Field(Integer)
|
|
|
79 |
logistics_provider_id = Field(Integer)
|
|
|
80 |
airwaybill_no = Field(String(50))
|
|
|
81 |
tracking_id = Field(String(50))
|
|
|
82 |
expected_delivery_time = Field(DateTime)
|
| 3986 |
chandransh |
83 |
promised_delivery_time = Field(DateTime)
|
| 4004 |
chandransh |
84 |
expected_shipping_time = Field(DateTime)
|
| 4102 |
chandransh |
85 |
promised_shipping_time = Field(DateTime)
|
| 6726 |
rajveer |
86 |
courier_delivery_time = Field(DateTime)
|
| 483 |
rajveer |
87 |
customer_id = Field(Integer)
|
|
|
88 |
customer_name = Field(String(50))
|
|
|
89 |
customer_mobilenumber = Field(String(20))
|
|
|
90 |
customer_pincode = Field(String(10))
|
| 738 |
chandransh |
91 |
customer_address1 = Field(String(100))
|
|
|
92 |
customer_address2 = Field(String(100))
|
| 669 |
chandransh |
93 |
customer_city = Field(String(100))
|
|
|
94 |
customer_state = Field(String(100))
|
| 483 |
rajveer |
95 |
customer_email = Field(String(50))
|
|
|
96 |
status = Field(Integer)
|
|
|
97 |
statusDescription = Field(String(50))
|
|
|
98 |
total_amount = Field(Float)
|
| 6318 |
rajveer |
99 |
gvAmount = Field(Float)
|
| 483 |
rajveer |
100 |
total_weight = Field(Float)
|
|
|
101 |
invoice_number = Field(String(30))
|
|
|
102 |
billed_by = Field(String(30))
|
|
|
103 |
created_timestamp = Field(DateTime)
|
|
|
104 |
accepted_timestamp = Field(DateTime)
|
|
|
105 |
billing_timestamp = Field(DateTime)
|
|
|
106 |
shipping_timestamp = Field(DateTime)
|
| 1113 |
chandransh |
107 |
pickup_timestamp = Field(DateTime)
|
| 483 |
rajveer |
108 |
delivery_timestamp = Field(DateTime)
|
| 1208 |
chandransh |
109 |
outofstock_timestamp = Field(DateTime)
|
| 483 |
rajveer |
110 |
lineitems = OneToMany("LineItem")
|
|
|
111 |
transaction = ManyToOne("Transaction")
|
| 6903 |
anupam.sin |
112 |
insuranceDetails = OneToMany("InsuranceDetailForOrder")
|
| 642 |
chandransh |
113 |
jacket_number = Field(Integer)
|
| 1132 |
chandransh |
114 |
receiver = Field(String(50))
|
| 1220 |
chandransh |
115 |
batchNo = Field(Integer)
|
|
|
116 |
serialNo = Field(Integer)
|
| 2536 |
chandransh |
117 |
doaFlag = Field(Boolean)
|
|
|
118 |
pickupRequestNo = Field(String(20))
|
| 2764 |
chandransh |
119 |
doa_auth_timestamp = Field(DateTime)
|
|
|
120 |
doa_pickup_timestamp = Field(DateTime)
|
|
|
121 |
received_return_timestamp = Field(DateTime)
|
|
|
122 |
reship_timestamp = Field(DateTime)
|
|
|
123 |
refund_timestamp = Field(DateTime)
|
| 2628 |
chandransh |
124 |
new_order_id = Field(Integer)
|
| 2819 |
chandransh |
125 |
purchase_order_id = Field(Integer)
|
| 3064 |
chandransh |
126 |
cod = Field(Boolean)
|
| 3226 |
chandransh |
127 |
refunded_by = Field(String(30))
|
| 5141 |
anupam.sin |
128 |
refund_reason = Field(String(256))
|
| 3064 |
chandransh |
129 |
verification_timestamp = Field(DateTime)
|
| 3581 |
chandransh |
130 |
delay_reason = Field(Enum('INVENTORY_LOW_PHASED_OUT', 'INVENTORY_LOW_COLOR_NOT_AVAILABLE',\
|
|
|
131 |
'INVENTORY_LOW_REVERSAL_NOT_ON_TIME', 'INVENTORY_LOW_PRODUCT_NOT_SEALED',\
|
|
|
132 |
'COURIER_DELAY_NOT_DELIVERED_TO_COURIER_ON_TIME', 'COURIER_DELAY_DID_NOT_CONNECT',\
|
|
|
133 |
'COURIER_DELAY_CUSTOMER_NOT_AVAILABLE', 'COURIER_DELAY_INCORRECT_ADDRESS',\
|
|
|
134 |
'COURIER_DELAY_OCTROI_DELAY', 'COURIER_DELAY_FORCES_OF_NATURE',\
|
|
|
135 |
'COD_VERIFICATION_DELAY', 'PAYMENT_FLAGGED', 'OTHERS'))
|
| 3956 |
chandransh |
136 |
cod_reconciliation_timestamp = Field(DateTime)
|
| 4247 |
rajveer |
137 |
previousStatus = Field(Integer)
|
| 4269 |
anupam.sin |
138 |
vendorId = Field(Integer)
|
| 5302 |
rajveer |
139 |
delayReasonText= Field(String(250))
|
| 4815 |
phani.kuma |
140 |
doa_logistics_provider_id = Field(Integer)
|
| 4910 |
phani.kuma |
141 |
local_connected_timestamp = Field(DateTime)
|
|
|
142 |
reached_destination_timestamp = Field(DateTime)
|
|
|
143 |
first_dlvyatmp_timestamp = Field(DateTime)
|
| 4303 |
rajveer |
144 |
orderInventory = OneToMany("OrderInventory")
|
| 5386 |
phani.kuma |
145 |
vendor_paid = Field(Boolean, default=0, server_default="0")
|
| 5062 |
varun.gupt |
146 |
originalOrderId = Field(Integer)
|
| 5110 |
mandeep.dh |
147 |
fulfilmentWarehouseId = Field(Integer)
|
| 5527 |
anupam.sin |
148 |
orderType = Field(Integer)
|
| 5720 |
rajveer |
149 |
pickupStoreId = Field(Integer, default=0, server_default="0")
|
| 6525 |
rajveer |
150 |
otg = Field(Boolean, default=0, server_default="0")
|
| 7033 |
anupam.sin |
151 |
insurer = Field(Integer, default=0, server_default="0")
|
|
|
152 |
insuranceAmount = Field(Float, default=0, server_default="0")
|
| 7190 |
amar.kumar |
153 |
freebieItemId = Field(Integer, default=0, server_default="0")
|
| 7564 |
rajveer |
154 |
source = Field(Integer, default=1, server_default="1")
|
| 7293 |
anupam.sin |
155 |
storeId = Field(Integer, default=0, server_default="0")
|
| 7549 |
rajveer |
156 |
advanceAmount = Field(Float, default=0, server_default="0")
|
| 2628 |
chandransh |
157 |
using_options(shortnames=True)
|
|
|
158 |
using_table_options(mysql_engine="InnoDB")
|
| 5348 |
anupam.sin |
159 |
|
|
|
160 |
class CodVerificationAgent(Entity):
|
|
|
161 |
orderId = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
162 |
verificationAgent = Field(String(200))
|
|
|
163 |
using_options(shortnames=True)
|
|
|
164 |
using_table_options(mysql_engine="InnoDB")
|
|
|
165 |
|
| 104 |
ashish |
166 |
class Transaction(Entity):
|
| 483 |
rajveer |
167 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
168 |
createdOn = Field(DateTime)
|
|
|
169 |
status = Field(Integer)
|
|
|
170 |
status_message = Field(String(100))
|
|
|
171 |
customer_id = Field(Integer)
|
|
|
172 |
shopping_cart_id = Field(Integer)
|
| 2815 |
vikas |
173 |
session_source = Field(String(100))
|
|
|
174 |
session_start_time = Field(DateTime)
|
| 3858 |
vikas |
175 |
first_source = Field(String(100))
|
|
|
176 |
first_source_start_time = Field(DateTime)
|
| 483 |
rajveer |
177 |
orders = OneToMany("Order")
|
| 2219 |
varun.gupt |
178 |
coupon_code = Field(String(20))
|
| 746 |
rajveer |
179 |
using_options(shortnames=True)
|
|
|
180 |
using_table_options(mysql_engine="InnoDB")
|
| 132 |
ashish |
181 |
|
| 4394 |
rajveer |
182 |
class Alert(Entity):
|
| 132 |
ashish |
183 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| 483 |
rajveer |
184 |
type = Field(Integer)
|
| 4394 |
rajveer |
185 |
status = Field(Integer)
|
|
|
186 |
timestamp = Field(DateTime)
|
|
|
187 |
description = Field(String(100))
|
| 4444 |
rajveer |
188 |
warehouseId = Field(Integer)
|
| 746 |
rajveer |
189 |
using_options(shortnames=True)
|
| 1225 |
chandransh |
190 |
using_table_options(mysql_engine="InnoDB")
|
|
|
191 |
|
|
|
192 |
class BatchNoGenerator(Entity):
|
|
|
193 |
id=Field(Integer, primary_key=True)
|
|
|
194 |
using_options(shortnames=True)
|
|
|
195 |
using_table_options(mysql_engine="InnoDB")
|
| 4008 |
mandeep.dh |
196 |
|
|
|
197 |
class TransactionRequiringExtraProcessing(Entity):
|
| 4015 |
mandeep.dh |
198 |
transaction_id = Field(Integer, primary_key=True, autoincrement=False)
|
| 6733 |
anupam.sin |
199 |
category = Field(Enum('COD_VERIFICATION', 'DELAYED_DELIVERY', 'PAYMENT_FLAGGED', 'RECHARGE_UNKNOWN'), primary_key=True, autoincrement=False)
|
| 4008 |
mandeep.dh |
200 |
using_options(shortnames=True)
|
|
|
201 |
using_table_options(mysql_engine="InnoDB")
|
| 4303 |
rajveer |
202 |
|
|
|
203 |
class OrderInventory(Entity):
|
|
|
204 |
order = ManyToOne("Order", primary_key=True)
|
|
|
205 |
itemId = Field(Integer)
|
|
|
206 |
timestamp = Field(DateTime)
|
|
|
207 |
hotspotAction = Field(Integer)
|
|
|
208 |
estimate = Field(Integer)
|
|
|
209 |
using_options(shortnames=True)
|
|
|
210 |
using_table_options(mysql_engine="InnoDB")
|
| 4600 |
varun.gupt |
211 |
|
|
|
212 |
class EBSSettlementSummary(Entity):
|
|
|
213 |
settlementId = Field(Integer, primary_key = True)
|
|
|
214 |
settlementDate = Field(DateTime)
|
|
|
215 |
transactionDateFrom = Field(DateTime)
|
|
|
216 |
transactionDateTo = Field(DateTime)
|
| 5389 |
phani.kuma |
217 |
amount = Field(Numeric(precision=11, scale=3, asdecimal=False))
|
| 4600 |
varun.gupt |
218 |
detailsUploaded = Field(Boolean)
|
|
|
219 |
using_options(shortnames=True)
|
|
|
220 |
using_table_options(mysql_engine="InnoDB")
|
| 4905 |
varun.gupt |
221 |
|
| 4600 |
varun.gupt |
222 |
class PaymentSettlement(Entity):
|
| 4905 |
varun.gupt |
223 |
referenceId = Field(Integer) #PaymentID in case of prepaid & Order Id in case of COD
|
| 5386 |
phani.kuma |
224 |
originalOrderId = Field(Integer) #originalOrderId in case of prepaid is NULL & Order Id of original Order or Order Id in case of COD
|
| 4600 |
varun.gupt |
225 |
paymentGatewayId = Field(Integer)
|
|
|
226 |
settlementDate = Field(DateTime)
|
| 5389 |
phani.kuma |
227 |
serviceTax = Field(Numeric(precision=11, scale=3, asdecimal=False))
|
|
|
228 |
otherCharges = Field(Numeric(precision=11, scale=3, asdecimal=False))
|
|
|
229 |
netCollection = Field(Numeric(precision=11, scale=3, asdecimal=False))
|
| 4600 |
varun.gupt |
230 |
using_options(shortnames=True)
|
| 5527 |
anupam.sin |
231 |
using_table_options(mysql_engine="InnoDB")
|
|
|
232 |
|
|
|
233 |
class Attribute(Entity):
|
|
|
234 |
orderId = Field(Integer)
|
|
|
235 |
name = Field(String(100))
|
|
|
236 |
value = Field(String(100))
|
|
|
237 |
using_options(shortnames=True)
|
| 6389 |
rajveer |
238 |
using_table_options(mysql_engine="InnoDB")
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
class EmiScheme(Entity):
|
|
|
242 |
id = Field(Integer, primary_key=True)
|
|
|
243 |
gatewayId = Field(Integer)
|
|
|
244 |
bankId = Field(Integer)
|
|
|
245 |
tenure = Field(Integer)
|
| 6396 |
amit.gupta |
246 |
bankName = Field(String(256))
|
|
|
247 |
tenureDescription = Field(String(256))
|
| 6389 |
rajveer |
248 |
minAmount = Field(Integer)
|
|
|
249 |
chargeType = Field(Integer)
|
| 6409 |
rajveer |
250 |
chargeValue = Field(Float)
|
| 6389 |
rajveer |
251 |
using_options(shortnames=True)
|
|
|
252 |
using_table_options(mysql_engine="InnoDB")
|
|
|
253 |
|
|
|
254 |
class MiscCharges(Entity):
|
|
|
255 |
transaction = ManyToOne("Transaction", primary_key=True)
|
| 6396 |
amit.gupta |
256 |
chargeType = Field(Integer, primary_key=True, autoincrement=False)
|
| 6389 |
rajveer |
257 |
chargeAmount = Field(Float)
|
|
|
258 |
using_options(shortnames=True)
|
| 6580 |
anupam.sin |
259 |
using_table_options(mysql_engine="InnoDB")
|
|
|
260 |
|
| 6591 |
anupam.sin |
261 |
class BlockedIpRange(Entity):
|
| 6580 |
anupam.sin |
262 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
| 6594 |
anupam.sin |
263 |
start = Field(BigInteger)
|
|
|
264 |
end = Field(BigInteger)
|
| 6591 |
anupam.sin |
265 |
expiredOn = Field(DateTime)
|
| 6580 |
anupam.sin |
266 |
using_options(shortnames=True)
|
| 6591 |
anupam.sin |
267 |
using_table_options(mysql_engine="InnoDB")
|
|
|
268 |
|
|
|
269 |
class DeniedIpAddress(Entity):
|
|
|
270 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
271 |
ip = Field(String(256))
|
|
|
272 |
deniedOn = Field(DateTime)
|
|
|
273 |
rechargeType = Field(Integer)
|
|
|
274 |
deviceNumber = Field(String(128))
|
|
|
275 |
using_options(shortnames=True)
|
| 6903 |
anupam.sin |
276 |
using_table_options(mysql_engine="InnoDB")
|
|
|
277 |
|
|
|
278 |
class InsuranceDetailForOrder(Entity):
|
|
|
279 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
280 |
dob = Field(String(64))
|
|
|
281 |
guardianName = Field(String(255))
|
|
|
282 |
startDate = Field(DateTime)
|
|
|
283 |
expiryDate = Field(DateTime)
|
| 6915 |
anupam.sin |
284 |
isDeclared = Field(Boolean, default=0)
|
| 6903 |
anupam.sin |
285 |
order = ManyToOne("Order")
|
|
|
286 |
using_options(shortnames=True)
|
| 6906 |
rajveer |
287 |
using_table_options(mysql_engine="InnoDB")
|
|
|
288 |
|
| 6915 |
anupam.sin |
289 |
def __init__(self):
|
|
|
290 |
self.isDeclared = 0
|
|
|
291 |
|
| 6906 |
rajveer |
292 |
class DocumentStore(Entity):
|
|
|
293 |
docType = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
294 |
docSource = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
295 |
document = Field(LargeBinary)
|
|
|
296 |
using_options(shortnames=True)
|
| 7073 |
anupam.sin |
297 |
using_table_options(mysql_engine="InnoDB")
|
|
|
298 |
|
|
|
299 |
class Company(Entity):
|
|
|
300 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
301 |
name = Field(String(255))
|
|
|
302 |
Address = Field(String(255))
|
|
|
303 |
using_options(shortnames=True)
|
|
|
304 |
using_table_options(mysql_engine="InnoDB")
|
|
|
305 |
|
|
|
306 |
class WalletForCompany(Entity):
|
|
|
307 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
308 |
companyId = Field(Integer)
|
| 7102 |
rajveer |
309 |
amount = Field(Integer)
|
| 7073 |
anupam.sin |
310 |
using_options(shortnames=True)
|
|
|
311 |
using_table_options(mysql_engine="InnoDB")
|
|
|
312 |
|
|
|
313 |
class WalletHistoryForCompany(Entity):
|
|
|
314 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
315 |
walletId = Field(Integer)
|
| 7102 |
rajveer |
316 |
amount = Field(Integer)
|
| 7073 |
anupam.sin |
317 |
transactionTime = Field(DateTime)
|
| 7102 |
rajveer |
318 |
openingBal = Field(Integer)
|
|
|
319 |
closingBal = Field(Integer)
|
| 7073 |
anupam.sin |
320 |
referenceNumber = Field(Integer)
|
|
|
321 |
description = Field(String(255))
|
|
|
322 |
using_options(shortnames=True)
|
|
|
323 |
using_table_options(mysql_engine="InnoDB")
|
|
|
324 |
|
|
|
325 |
class RechargeTransaction(Entity):
|
|
|
326 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
327 |
storeId = Field(Integer)
|
| 7102 |
rajveer |
328 |
amount = Field(Integer)
|
| 7073 |
anupam.sin |
329 |
transactionTime = Field(DateTime)
|
| 7075 |
rajveer |
330 |
responseTime = Field(DateTime)
|
|
|
331 |
description = Field(String(255))
|
|
|
332 |
spiceTID = Field(String(255))
|
| 7369 |
rajveer |
333 |
aggTID = Field(String(255))
|
|
|
334 |
providerTID = Field(String(255))
|
| 7075 |
rajveer |
335 |
plan = Field(String(255))
|
| 7073 |
anupam.sin |
336 |
deviceNum = Field(String(64))
|
|
|
337 |
deviceType = Field(Integer)
|
|
|
338 |
isFrc = Field(Boolean)
|
|
|
339 |
email = Field(String(255))
|
| 7102 |
rajveer |
340 |
discount = Field(Integer)
|
|
|
341 |
paymentAmount = Field(Integer)
|
| 7145 |
rajveer |
342 |
payMethod = Field(Integer, default=0, server_default="0")
|
| 7073 |
anupam.sin |
343 |
status = Field(Integer)
|
|
|
344 |
invoiceNumber = Field(Integer)
|
|
|
345 |
circleId = Field(Integer)
|
| 7075 |
rajveer |
346 |
operatorId = Field(Integer)
|
| 7073 |
anupam.sin |
347 |
name = Field(String(255))
|
|
|
348 |
simNum = Field(String(255))
|
|
|
349 |
cafNum = Field(String(255))
|
| 7080 |
anupam.sin |
350 |
ipAddress = Field(String(255))
|
|
|
351 |
alternateNumber = Field(String(255))
|
| 7073 |
anupam.sin |
352 |
using_options(shortnames=True)
|
| 7075 |
rajveer |
353 |
using_table_options(mysql_engine="InnoDB")
|
| 7076 |
rajveer |
354 |
|
| 7120 |
rajveer |
355 |
class OperatorSeries(Entity):
|
|
|
356 |
series = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
357 |
operatorId = Field(Integer)
|
|
|
358 |
circleId = Field(Integer)
|
|
|
359 |
using_options(shortnames=True)
|
|
|
360 |
using_table_options(mysql_engine="InnoDB")
|
|
|
361 |
|
| 7076 |
rajveer |
362 |
class FRC(Entity):
|
|
|
363 |
id = Field(Integer, primary_key=True)
|
|
|
364 |
operatorId = Field(Integer)
|
|
|
365 |
circleId = Field(Integer)
|
|
|
366 |
denomination = Field(Integer)
|
|
|
367 |
maxDiscount = Field(Integer)
|
|
|
368 |
using_options(shortnames=True)
|
|
|
369 |
using_table_options(mysql_engine="InnoDB")
|
| 7120 |
rajveer |
370 |
|
| 7075 |
rajveer |
371 |
class HotspotStore(Entity):
|
|
|
372 |
id = Field(Integer, primary_key=True)
|
|
|
373 |
hotspotId = Field(String(3))
|
|
|
374 |
companyId = Field(Integer)
|
|
|
375 |
name = Field(String(100))
|
|
|
376 |
city = Field(String(100))
|
| 7076 |
rajveer |
377 |
collectedAmount = Field(Integer)
|
| 7075 |
rajveer |
378 |
availableLimit = Field(Integer)
|
|
|
379 |
creditLimit = Field(Integer)
|
|
|
380 |
salt = Field(String(100))
|
|
|
381 |
password = Field(String(100))
|
|
|
382 |
isActive = Field(Boolean)
|
| 7096 |
anupam.sin |
383 |
circleId = Field(Integer)
|
| 7169 |
anupam.sin |
384 |
email = Field(String(100))
|
| 7308 |
rajveer |
385 |
line1 = Field(String(100))
|
|
|
386 |
line2 = Field(String(100))
|
|
|
387 |
state = Field(String(100))
|
|
|
388 |
pin = Field(String(10))
|
|
|
389 |
phone = Field(String(20))
|
| 7423 |
anupam.sin |
390 |
tin = Field(String(100))
|
| 7308 |
rajveer |
391 |
approvalEmail = Field(String(255))
|
| 7967 |
anupam.sin |
392 |
clusterEmail = Field(String(100))
|
| 7075 |
rajveer |
393 |
using_options(shortnames=True)
|
| 7251 |
rajveer |
394 |
using_table_options(mysql_engine="InnoDB")
|
|
|
395 |
|
|
|
396 |
class RechargeCollection(Entity):
|
|
|
397 |
hotspotId = Field(String(3), primary_key=True, autoincrement=False)
|
|
|
398 |
reconDate = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
399 |
cash = Field(Integer)
|
|
|
400 |
hdfc = Field(Integer)
|
|
|
401 |
grossAmount = Field(Integer)
|
|
|
402 |
discount = Field(Integer)
|
|
|
403 |
netCollection = Field(Integer)
|
|
|
404 |
addedAt = Field(DateTime)
|
|
|
405 |
pushedAt = Field(DateTime)
|
|
|
406 |
pushedToOcr = Field(Boolean)
|
|
|
407 |
using_options(shortnames=True)
|
|
|
408 |
using_table_options(mysql_engine="InnoDB")
|
| 7406 |
rajveer |
409 |
|
|
|
410 |
class StoreOrderCollection(Entity):
|
|
|
411 |
hotspotId = Field(String(3), primary_key=True, autoincrement=False)
|
|
|
412 |
orderId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
413 |
collectionType = Field(String(255), primary_key=True, autoincrement=False)
|
|
|
414 |
productName = Field(String(255))
|
|
|
415 |
advanceAmount = Field(Integer)
|
|
|
416 |
cash = Field(Integer)
|
|
|
417 |
card = Field(Integer)
|
|
|
418 |
addedAt = Field(DateTime)
|
|
|
419 |
pushedAt = Field(DateTime)
|
|
|
420 |
pushedToOcr = Field(Boolean)
|
|
|
421 |
using_options(shortnames=True)
|
|
|
422 |
using_table_options(mysql_engine="InnoDB")
|
| 7263 |
anupam.sin |
423 |
|
|
|
424 |
class SourceDetail(Entity):
|
|
|
425 |
id = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
426 |
name = Field(String(255))
|
|
|
427 |
email = Field(String(255))
|
| 7410 |
amar.kumar |
428 |
tinNumber = Field(String(255))
|
| 7530 |
kshitij.so |
429 |
lastUpdatedOn = Field(DateTime)
|
| 7263 |
anupam.sin |
430 |
using_options(shortnames=True)
|
| 7311 |
kshitij.so |
431 |
using_table_options(mysql_engine="InnoDB")
|
|
|
432 |
|
|
|
433 |
class AmazonOrder(Entity):
|
|
|
434 |
orderId = Field(Integer, primary_key=True, autoincrement=False)
|
| 7322 |
vikram.rag |
435 |
amazonOrderCode = Field(String(255))
|
|
|
436 |
amazonOrderItemCode = Field(String(255))
|
| 7311 |
kshitij.so |
437 |
transactionId = Field(Integer)
|
|
|
438 |
item_id = Field(Integer)
|
| 7322 |
vikram.rag |
439 |
status = Field(String(50))
|
| 7715 |
vikram.rag |
440 |
purchaseDateOnAmazon = Field(DateTime)
|
| 7311 |
kshitij.so |
441 |
using_options(shortnames=True)
|
| 7386 |
anupam.sin |
442 |
using_table_options(mysql_engine="InnoDB")
|
|
|
443 |
|
|
|
444 |
class StoreOrderDetail(Entity):
|
|
|
445 |
orderId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
446 |
storeId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
447 |
advanceAmount = Field(Float)
|
|
|
448 |
cashAmount = Field(Float)
|
|
|
449 |
cardAmount = Field(Float)
|
|
|
450 |
payStatus = Field(Integer)
|
| 7393 |
anupam.sin |
451 |
edcBank = Field(String(100))
|
|
|
452 |
cashRefundAmount = Field(Float)
|
|
|
453 |
cardRefundAmount = Field(Float)
|
| 7423 |
anupam.sin |
454 |
approvalCode = Field(String(100))
|
| 7611 |
anupam.sin |
455 |
cardType = Field(String(100))
|
| 7386 |
anupam.sin |
456 |
using_options(shortnames=True)
|
|
|
457 |
using_table_options(mysql_engine="InnoDB")
|
|
|
458 |
|
|
|
459 |
class EdcBank(Entity):
|
|
|
460 |
id = Field(Integer, primary_key=True, autoincrement=True)
|
|
|
461 |
name = Field(String(255))
|
|
|
462 |
using_options(shortnames=True)
|
| 7967 |
anupam.sin |
463 |
using_table_options(mysql_engine="InnoDB")
|
|
|
464 |
|
|
|
465 |
class HotspotServiceMatrix(Entity):
|
|
|
466 |
storeId = Field(Integer, primary_key=True)
|
|
|
467 |
hotspotId = Field(String(3))
|
|
|
468 |
rechargeService = Field(Boolean, default=0, server_default="0")
|
|
|
469 |
storeWebsiteService = Field(Boolean, default=0, server_default="0")
|
|
|
470 |
pickupFromStoreService = Field(Boolean, default=0, server_default="0")
|
|
|
471 |
using_options(shortnames=True)
|
| 8182 |
amar.kumar |
472 |
using_table_options(mysql_engine="InnoDB")
|
|
|
473 |
|
|
|
474 |
class EbayOrder(Entity):
|
|
|
475 |
orderId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
476 |
salesRecordNumber = Field(Integer)
|
|
|
477 |
paisaPayId = Field(String(32))
|
|
|
478 |
ebayListingId = Field(String(32))
|
|
|
479 |
subsidyAmount = Field(Float)
|
|
|
480 |
ebayTxnDate = Field(DateTime)
|
|
|
481 |
transactionId = Field(String(16))
|
|
|
482 |
listingName = Field(String(128))
|
|
|
483 |
listingPrice = Field(Float)
|
| 8247 |
amar.kumar |
484 |
bluedartPaisaPayRef = Field(String(16))
|
| 8182 |
amar.kumar |
485 |
using_options(shortnames=True)
|
|
|
486 |
using_table_options(mysql_engine="InnoDB")
|
| 8488 |
amar.kumar |
487 |
|
|
|
488 |
class SnapdealOrder(Entity):
|
|
|
489 |
orderId = Field(Integer, primary_key=True, autoincrement=False)
|
|
|
490 |
subOrderId = Field(Integer)
|
|
|
491 |
referenceCode = Field(String(32))
|
|
|
492 |
snapdealTxnDate = Field(DateTime)
|
|
|
493 |
productName = Field(String(128))
|
|
|
494 |
listingPrice = Field(Float)
|
|
|
495 |
using_options(shortnames=True)
|
|
|
496 |
using_table_options(mysql_engine="InnoDB")
|
| 8282 |
kshitij.so |
497 |
|
|
|
498 |
class AmazonFbaSalesSnapshot(Entity):
|
|
|
499 |
dateOfSale = Field(Date, primary_key=True)
|
| 8363 |
vikram.rag |
500 |
item_id = Field(Integer, primary_key=True,autoincrement=False)
|
|
|
501 |
totalOrderCount = Field(Integer)
|
| 8282 |
kshitij.so |
502 |
amazonFbaInventory = Field(Integer)
|
|
|
503 |
isOutOfStock = Field(Boolean)
|
|
|
504 |
salePrice = Field(Float)
|
| 8445 |
vikram.rag |
505 |
ourPrice = Field(Float)
|
| 8282 |
kshitij.so |
506 |
minFbaPrice = Field(Float)
|
| 8363 |
vikram.rag |
507 |
minMfnPrice = Field(Float)
|
|
|
508 |
totalSale = Field(Float)
|
|
|
509 |
promotionSale = Field(Float)
|
|
|
510 |
promotionOrderCount = Field(Integer)
|
| 8532 |
vikram.rag |
511 |
ourPriceSnapshotDate = Field(DateTime)
|
|
|
512 |
salePriceSnapshotDate = Field(DateTime)
|
|
|
513 |
minMfnPriceSnapshotDate = Field(DateTime)
|
|
|
514 |
minFbaPriceSnapshotDate = Field(DateTime)
|
| 8282 |
kshitij.so |
515 |
using_options(shortnames=True)
|
| 8532 |
vikram.rag |
516 |
using_table_options(mysql_engine="InnoDB")
|