Subversion Repositories SmartDukaan

Rev

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

Rev 4985 Rev 5110
Line 8... Line 8...
8
*/
8
*/
9
 
9
 
10
/**
10
/**
11
Caution :- Never ever change the numbers in it. Please confirm from @Chandranshu or @Rajveer before any changes in enum and other entries in file.
11
Caution :- Never ever change the numbers in it. Please confirm from @Chandranshu or @Rajveer before any changes in enum and other entries in file.
12
**/
12
**/
13
enum status{
13
enum status {
14
	PHASED_OUT = 0,		//Item is no longer selling
14
	PHASED_OUT = 0,		//Item is no longer selling
15
	DELETED = 1,		//Item has been deliberately deleted 
15
	DELETED = 1,		//Item has been deliberately deleted 
16
	PAUSED = 2,			//Item's sale has been paused manually.
16
	PAUSED = 2,			//Item's sale has been paused manually.
17
	ACTIVE = 3,			//Item is available for sale as of now
17
	ACTIVE = 3,			//Item is available for sale as of now
18
	IN_PROCESS = 4,		//Item has been added, but content is not available for the same
18
	IN_PROCESS = 4,		//Item has been added, but content is not available for the same
19
	CONTENT_COMPLETE = 5,  //The content for this item has been completed. We can start selling the item now.
19
	CONTENT_COMPLETE = 5,  //The content for this item has been completed. We can start selling the item now.
20
	PAUSED_BY_RISK = 6    //Item's sale has been automatically paused since it was marked as risky
20
	PAUSED_BY_RISK = 6    //Item's sale has been automatically paused since it was marked as risky
21
}
21
}
22
 
22
 
23
enum WarehouseLocation{
23
enum WarehouseLocation {
24
	Mumbai = 0,
24
	Mumbai = 0,
25
	Delhi = 1,
25
	Delhi = 1,
26
	Bangalore = 2,
26
	Bangalore = 2,
27
	Kolkata = 3
27
	Kolkata = 3
28
}
28
}
29
 
29
 
30
struct Vendor{
30
struct Vendor {
31
	1:i64 id,
31
	1:i64 id,
32
	2:string name
32
	2:string name
33
}
33
}
34
 
34
 
35
enum BillingType {
35
enum BillingType {
36
	OURS = 0,
36
	OURS = 0,
37
	EXTERNAL = 1
37
	EXTERNAL = 1
38
}
38
}
39
 
39
 
-
 
40
enum WarehouseType {
-
 
41
    OURS = 0,
-
 
42
    THIRD_PARTY = 1
-
 
43
}
-
 
44
 
-
 
45
enum InventoryType {
-
 
46
    GOOD = 0,
-
 
47
    BAD = 1,
-
 
48
    VIRTUAL = 2
-
 
49
}
-
 
50
 
40
enum HolidayType {
51
enum HolidayType {
41
	WEEKLY = 0,
52
	WEEKLY = 0,
42
	MONTHLY = 1,
53
	MONTHLY = 1,
43
	SPECIFIC = 2
54
	SPECIFIC = 2
44
}
55
}
45
 
56
 
46
 
-
 
47
/* 
57
/* 
48
Warehouse fields details
58
Warehouse fields details
49
location: it is full address
59
location: it is full address
50
vendorString: some key for the warehouse
60
vendorString: some key for the warehouse
51
*/
61
*/
52
struct Warehouse{
62
struct Warehouse {
53
	1:i64 id,
63
	1:i64 id,
54
	2:string displayName,
64
	2:string displayName,
55
	3:string location,
65
	3:string location,
56
	4:status warehouseStatus,
-
 
57
	5:i64 addedOn,
66
	5:i64 addedOn,
58
	6:i64 lastCheckedOn,
67
	6:i64 lastCheckedOn,
59
	7:string tinNumber,
68
	7:string tinNumber,
60
	8:string pincode,
69
	8:string pincode,
61
	9:string vendorString,
70
	9:string vendorString,
62
	10:WarehouseLocation logisticsLocation,
71
	10:WarehouseLocation logisticsLocation,
-
 
72
	12:BillingType billingType,
-
 
73
	13:WarehouseType warehouseType,
-
 
74
	14:InventoryType inventoryType,
63
	11:string vendor,
75
	15:Vendor vendor,
-
 
76
	16:i64 shippingWarehouseId,
-
 
77
	17:i64 billingWarehouseId,
64
	12:BillingType billingType
78
	18:bool isAvailabilityMonitored,
-
 
79
	19:i64 transferDelayInHours
65
}
80
}
66
 
81
 
67
/* */
82
/* */
68
struct ItemInventory{
83
struct ItemInventory{
69
	1:i64 id,
84
	1:i64 id,
Line 77... Line 92...
77
	2:i64 warehouse_id,
92
	2:i64 warehouse_id,
78
	3:i64 timestamp,
93
	3:i64 timestamp,
79
	4:i64 availability
94
	4:i64 availability
80
}
95
}
81
 
96
 
-
 
97
enum ItemType {
-
 
98
    SERIALIZED = 1,
-
 
99
    NON_SERIALIZED = 2
-
 
100
}
-
 
101
 
82
struct Item{
102
struct Item{
83
	1:i64 id,
103
	1:i64 id,
84
	2:string productGroup
104
	2:string productGroup
85
	3:string brand,
105
	3:string brand,
86
	4:string modelNumber,
106
	4:string modelNumber,
Line 110... Line 130...
110
	28:optional i32 expectedDelay,
130
	28:optional i32 expectedDelay,
111
	29:optional i64 preferredWarehouse,
131
	29:optional i64 preferredWarehouse,
112
	30:optional i64 defaultWarehouse,
132
	30:optional i64 defaultWarehouse,
113
	31:optional bool isWarehousePreferenceSticky,
133
	31:optional bool isWarehousePreferenceSticky,
114
	32:i32 warrantyPeriod,
134
	32:i32 warrantyPeriod,
115
	33:optional i64 preferredVendor
135
	33:optional i64 preferredVendor,
-
 
136
	34:ItemType type
116
}
137
}
117
 
138
 
118
struct VendorItemPricing{
139
struct VendorItemPricing{
119
	1:i64 vendorId,
140
	1:i64 vendorId,
120
	2:i64 itemId,
141
	2:i64 itemId,
Line 195... Line 216...
195
	
216
	
196
	/**
217
	/**
197
	add a new vendor
218
	add a new vendor
198
	*/
219
	*/
199
	i64 addVendor(1:Vendor vendor) throws (1:InventoryServiceException cex),
220
	i64 addVendor(1:Vendor vendor) throws (1:InventoryServiceException cex),
200
	bool addWarehouseVendorMapping(1:i64 warehouse_id, 2:i64 vendorId),
-
 
201
	list<Vendor> getVendorsForWarehouse(1:i64 warehouse_id),
-
 
202
	list<Warehouse> getWarehousesForVendor(1:i64 vendorId),
-
 
203
	
221
	
204
	/**
222
	/**
205
	Checks if the item given to the corresponding itemId is active. If it's active,
223
	Checks if the item given to the corresponding itemId is active. If it's active,
206
	whether it's risky and if it's risky, its inventory position.
224
	whether it's risky and if it's risky, its inventory position.
207
	*/
225
	*/
Line 482... Line 500...
482
	Returns a list of count of requests for product notification against each item
500
	Returns a list of count of requests for product notification against each item
483
	*/
501
	*/
484
	list<ProductNotificationRequestCount> getProductNotificationRequestCount(1:i64 startDateTime)
502
	list<ProductNotificationRequestCount> getProductNotificationRequestCount(1:i64 startDateTime)
485
	
503
	
486
	/**
504
	/**
487
	This method creates a purchase order from an excel sheet containing Item Id and Quantity column and returns the PO Id.
-
 
488
	*/
-
 
489
	string processPurchaseOrder(1:string filename 2:i32 vendorId) throws (1:InventoryServiceException cex)
-
 
490
	
-
 
491
	/**
-
 
492
	This method adds a log to authorize table with Item Id, username who authorized the change, reason.
505
	This method adds a log to authorize table with Item Id, username who authorized the change, reason.
493
	*/
506
	*/
494
	bool addAuthorizationLog(1:i64 itemId, 2:string username, 3:string reason) throws (1:InventoryServiceException cex)
507
	bool addAuthorizationLog(1:i64 itemId, 2:string username, 3:string reason) throws (1:InventoryServiceException cex),
-
 
508
 
-
 
509
	/**
-
 
510
	 This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
-
 
511
	 getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
-
 
512
	 getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
-
 
513
     getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
-
 
514
     getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7
-
 
515
	 */
-
 
516
	list<Warehouse> getWarehouses(1:WarehouseType warehouseType, 2:InventoryType inventoryType, 3:i64 vendorId, 4:i64 billingWarehouseId, 5:i64 shippingWarehouseId);
495
 
517
 
496
    /**
518
    /**
497
     * Resets availability of an item to the quantity mentioned in a warehouse.
519
     * Resets availability of an item to the quantity mentioned in a warehouse.
498
     */
520
     */
499
    void resetAvailability(1:string itemKey, 2:i64 vendorId, 3:i64 quantity, 4:i64 warehouseId) throws (1:InventoryServiceException cex);
521
    void resetAvailability(1:string itemKey, 2:i64 vendorId, 3:i64 quantity, 4:i64 warehouseId) throws (1:InventoryServiceException cex);
Line 507... Line 529...
507
 
529
 
508
    /**
530
    /**
509
     * Marks/Deletes missed inventory updates for a given key and warehouse.
531
     * Marks/Deletes missed inventory updates for a given key and warehouse.
510
     * This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item
532
     * This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item
511
     */
533
     */
512
    void markMissedInventoryUpdatesAsProcessed(1:string itemKey, 2:i64 warehouseId);	
-
 
513
}
-
 
514
534
    void markMissedInventoryUpdatesAsProcessed(1:string itemKey, 2:i64 warehouseId);
-
 
535
 
-
 
536
    /**
-
 
537
     * Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
-
 
538
     * and the timestamp from where alert was raised.
-
 
539
     */
-
 
540
    map<string, map<i64, i64>> getIgnoredItemKeys();
-
 
541
 
-
 
542
    /**
-
 
543
    Add the BAD type inventory to existing stock.
-
 
544
    */
-
 
545
    void addBadInventory(1:i64 itemId, 2:i64 warehouseId, 3:i64 quantity) throws (1:InventoryServiceException cex);
-
 
546
}
-
 
547