Subversion Repositories SmartDukaan

Rev

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

Rev 378 Rev 483
Line 15... Line 15...
15
	PAUSED = 2,			//Item's sale is currently paused
15
	PAUSED = 2,			//Item's sale is currently paused
16
	ACTIVE = 3,			//Item is available for sale as of now
16
	ACTIVE = 3,			//Item is available for sale as of now
17
	IN_PROCESS = 4		//Item has been added, but content is not available for the same
17
	IN_PROCESS = 4		//Item has been added, but content is not available for the same
18
}
18
}
19
 
19
 
-
 
20
/* 
-
 
21
Warehouse fields details
-
 
22
location: it is full address
-
 
23
vendorString: some key for the warehouse
-
 
24
*/
20
struct Warehouse{
25
struct Warehouse{
21
	1:i64 id,
26
	1:i64 id,
22
	2:string location,
27
	2:string location,
23
	4:status warehouseStatus
28
	3:status warehouseStatus,
24
	5:i64 addedOn
29
	4:i64 addedOn,
-
 
30
	5:i64 lastCheckedOn,
-
 
31
	6:string tinNumber,
-
 
32
	7:string pincode,
-
 
33
	8:string vendorString
25
}
34
}
26
/* */
35
/* */
27
struct ItemInventory{
36
struct ItemInventory{
28
	1:i64 id,
37
	1:i64 id,
29
	2:map<i64,i64> availability,
38
	2:map<i64,i64> availability
30
	3:i64 lastCheckedOn
-
 
31
}
39
}
32
 
40
 
-
 
41
 
33
struct ItemInventoryHistory{
42
struct ItemInventoryHistory{
34
	1:i64 item_id,
43
	1:i64 item_id,
35
	2:i64 warehouse_id,
44
	2:i64 warehouse_id,
36
	3:i64 timestamp,
45
	3:i64 timestamp,
37
	4:i64 availability
46
	4:i64 availability
38
}
47
}
39
 
48
 
40
struct Item{
49
struct Item{
41
	1:i64 id,
50
	1:i64 id,
42
	2:i64 catalogItemId,
51
	2:string manfucturerName,
43
	3:ItemInventory itemInventory,
52
	3:string modelNumber,
44
	4:i64 addedOn,
53
	4:string modelName,
45
	5:i64 startDate,
54
	5:string category,
46
	6:status itemStatus,
55
	6:string comments,
47
	7:map<string,string> otherInfo,
56
	7:i64 catalogItemId,
48
	8:map<i64, double> price, //price on each warehouse
-
 
49
	9:double weight,
57
	8:string vendorItemId
50
	10:i64 featureId,
58
	10:i64 featureId,
51
	11:string featureDescription,
59
	11:string featureDescription,
-
 
60
	12:ItemInventory itemInventory,
-
 
61
	13:double mrp, //maxmimum retail price
-
 
62
	14:double mop, //market operative price
-
 
63
	15:double sellingPrice, //Selling price
-
 
64
	16:double weight,
-
 
65
	17:i64 addedOn,
-
 
66
	18:i64 startDate,
52
	12:i64 vendorItemId
67
	19:i64 retireDate,
-
 
68
	20:status itemStatus,
-
 
69
	21:map<string,string> otherInfo
53
}
70
}
54
 
71
 
55
exception InventoryServiceException{
72
exception InventoryServiceException{
56
	1:i64 id,
73
	1:i64 id,
57
	2:string message
74
	2:string message
Line 68... Line 85...
68
*/
85
*/
69
	//all add and update methods - added by Ashish
86
	//all add and update methods - added by Ashish
70
	i64 addItem(1:Item item) throws (1:InventoryServiceException cex),
87
	i64 addItem(1:Item item) throws (1:InventoryServiceException cex),
71
	i64 updateItem(1:Item item) throws (1:InventoryServiceException cex),
88
	i64 updateItem(1:Item item) throws (1:InventoryServiceException cex),
72
	i64 addWarehouse(1:Warehouse warehouse) throws (1:InventoryServiceException cex),
89
	i64 addWarehouse(1:Warehouse warehouse) throws (1:InventoryServiceException cex),
-
 
90
	// Commented by Rajveer:- replaced by new one below
73
	void updateInventory(1:i64 item_id, 2:i64 warehouse_id, 3: i64 quantity, 4:i64 timestamp) throws (1:InventoryServiceException cex),
91
	//void updateInventory(1:i64 item_id, 2:i64 warehouse_id, 3: i64 quantity, 4:i64 timestamp) throws (1:InventoryServiceException cex),
-
 
92
	void updateInventory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),
-
 
93
	// commented right now. write on based of requirement
74
	void updatePrice(1:i64 item_id, 2:i64 warehouse_id, 3:double price) throws (1:InventoryServiceException cex),
94
	// void updatePrice(1:i64 item_id, 2:i64 warehouse_id, 3:double price) throws (1:InventoryServiceException cex),
75
	//all delete methods
95
	//all delete methods
76
	void retireWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
96
	void retireWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),
77
	
97
	
78
	//Item management apis
98
	//Item management apis
79
	void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),
99
	void startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),