| Line 1... |
Line 1... |
| 1 |
namespace java in.shop2020.model.v1.catalog
|
1 |
namespace java in.shop2020.model.v1.catalog
|
| 2 |
namespace py model.v1.catalog
|
2 |
namespace py shop2020.thriftpy.model.v1.catalog
|
| 3 |
|
3 |
|
| 4 |
/**
|
4 |
/**
|
| 5 |
Objects
|
5 |
Objects
|
| 6 |
*/
|
6 |
*/
|
| 7 |
|
7 |
|
| - |
|
8 |
struct Category{
|
| - |
|
9 |
1:i64 id,
|
| - |
|
10 |
2:string name,
|
| - |
|
11 |
3:list<i64> childCategories,
|
| - |
|
12 |
4:i64 parent_id,
|
| - |
|
13 |
5:bool isTopLevel,
|
| - |
|
14 |
6:i64 addedOn
|
| - |
|
15 |
}
|
| - |
|
16 |
|
| - |
|
17 |
|
| - |
|
18 |
|
| 8 |
struct ItemAttribs{
|
19 |
struct ItemAttribs{
|
| 9 |
//This is Naveen's struct
|
20 |
//This is Naveen's struct
|
| 10 |
1:i64 id,
|
21 |
1:i64 id
|
| 11 |
}
|
22 |
}
|
| 12 |
|
23 |
|
| 13 |
struct Vendor{
|
24 |
struct Vendor{
|
| 14 |
1:i64 id,
|
25 |
1:i64 id,
|
| 15 |
2:string name
|
26 |
2:string name
|
| Line 17... |
Line 28... |
| 17 |
|
28 |
|
| 18 |
|
29 |
|
| 19 |
struct Warehouse{
|
30 |
struct Warehouse{
|
| 20 |
1:i64 id,
|
31 |
1:i64 id,
|
| 21 |
2:string location,
|
32 |
2:string location,
|
| 22 |
3:i64 vendor_id,
|
33 |
3:i64 vendor_id
|
| 23 |
}
|
34 |
}
|
| 24 |
|
35 |
|
| 25 |
struct ItemInventory{
|
36 |
struct ItemInventory{
|
| 26 |
1:i64 id,
|
37 |
1:i64 id,
|
| 27 |
2:map<i64,i64> availability,
|
38 |
2:map<i64,i64> availability,
|
| Line 41... |
Line 52... |
| 41 |
2:i64 category_id,
|
52 |
2:i64 category_id,
|
| 42 |
3:ItemAttribs itemAttribs,
|
53 |
3:ItemAttribs itemAttribs,
|
| 43 |
4:ItemInventory itemInventory
|
54 |
4:ItemInventory itemInventory
|
| 44 |
}
|
55 |
}
|
| 45 |
|
56 |
|
| 46 |
struct Category{
|
- |
|
| 47 |
1:i64 id,
|
- |
|
| 48 |
2:string name,
|
- |
|
| 49 |
3:list<Category> children,
|
- |
|
| 50 |
4:Category parent,
|
- |
|
| 51 |
5:bool isTopLevel,
|
- |
|
| 52 |
6:i64 addedOn
|
- |
|
| 53 |
}
|
- |
|
| 54 |
|
- |
|
| 55 |
exception CatalogServiceException{
|
57 |
exception CatalogServiceException{
|
| 56 |
1:i64 id,
|
58 |
1:i64 id,
|
| 57 |
2:string message
|
59 |
2:string message
|
| 58 |
}
|
60 |
}
|
| 59 |
|
61 |
|
| Line 70... |
Line 72... |
| 70 |
Availability and inventory attributes
|
72 |
Availability and inventory attributes
|
| 71 |
*/
|
73 |
*/
|
| 72 |
//all add and update methods - added by Ashish
|
74 |
//all add and update methods - added by Ashish
|
| 73 |
void addCategory(1:Category category) throws (1:CatalogServiceException cex),
|
75 |
void addCategory(1:Category category) throws (1:CatalogServiceException cex),
|
| 74 |
void addItemToCategory(1:Item item, 2:i64 category_id) throws (1:CatalogServiceException cex),
|
76 |
void addItemToCategory(1:Item item, 2:i64 category_id) throws (1:CatalogServiceException cex),
|
| 75 |
void addItemAttribsToItem(1:ItemAttribs, 2:i64 item_id) throws (1:CatalogServiceException cex),
|
77 |
void addItemAttribsToItem(1:ItemAttribs itemattribs, 2:i64 item_id) throws (1:CatalogServiceException cex),
|
| 76 |
void addItemInventoryToItem(1:ItemInventory, 2:i64 item_id) throws (1:CatalogServiceException cex),
|
78 |
void addItemInventoryToItem(1:ItemInventory iteminventory, 2:i64 item_id) throws (1:CatalogServiceException cex),
|
| 77 |
void addWarehouse(1:Warehouse warehouse) throws (1:CatalogServiceException cex),
|
79 |
void addWarehouse(1:Warehouse warehouse) throws (1:CatalogServiceException cex),
|
| 78 |
void addVendor(1:Vendor vendor) throws (1:CatalogServiceException cex),
|
80 |
void addVendor(1:Vendor vendor) throws (1:CatalogServiceException cex),
|
| 79 |
void updateInventory(1:i64 item_id, 2:i64 warehouse_id, 3: i64 quantity, 4:i64 timestamp) throws (1:CatalogServiceException cex),
|
81 |
void updateInventory(1:i64 item_id, 2:i64 warehouse_id, 3: i64 quantity, 4:i64 timestamp) throws (1:CatalogServiceException cex),
|
| 80 |
|
82 |
|
| 81 |
//Other accessor methods - added by Ashish
|
83 |
//Other accessor methods - added by Ashish
|
| 82 |
Category getCategory(1:i64id) throws (1:CatalogServiceException cex),
|
84 |
Category getCategory(1:i64 id) throws (1:CatalogServiceException cex),
|
| 83 |
list<Category> getAllCategories() throws (1:CatalogServiceException cex),
|
85 |
list<Category> getAllCategories() throws (1:CatalogServiceException cex),
|
| 84 |
Item getItem(1:i64 item_id) throws (1:CatalogServiceException cex),
|
86 |
Item getItem(1:i64 item_id) throws (1:CatalogServiceException cex),
|
| 85 |
list<Item> getAllItemsForCategory(1:i64 category_id) throws (1:CatalogServiceException cex),
|
87 |
list<Item> getAllItemsForCategory(1:i64 category_id) throws (1:CatalogServiceException cex),
|
| 86 |
ItemAttribs getItemAtttribs(1:i64 item_id) throws (1:CatalogServiceException cex),
|
88 |
ItemAttribs getItemAtttribs(1:i64 item_id) throws (1:CatalogServiceException cex),
|
| 87 |
ItemInventory getItemInventory(1:i64 item_id) throws (1:CatalogServiceException cex),
|
89 |
ItemInventory getItemInventory(1:i64 item_id) throws (1:CatalogServiceException cex),
|
| 88 |
ItemInventoryHistory getItemInventoryHistory(1:i64 id, 2:i64 item_id, 3:i64 warehousr_id, 4: i64 from, 5:i64 to ) throws (1:CatalogServiceException cex),
|
90 |
ItemInventoryHistory getItemInventoryHistory(1:i64 id, 2:i64 item_id, 3:i64 warehouse_id, 4: i64 from_date, 5:i64 to_date ) throws (1:CatalogServiceException cex),
|
| 89 |
Warehouse getWarehouse(1:i64 warehouse_id) throws (1:CatalogServiceException cex),
|
91 |
Warehouse getWarehouse(1:i64 warehouse_id) throws (1:CatalogServiceException cex),
|
| 90 |
list<Warehouse> getAllWarehousesForItem(1:i64 item_is) throws (1:CatalogServiceException cex),
|
92 |
list<Warehouse> getAllWarehousesForItem(1:i64 item_is) throws (1:CatalogServiceException cex),
|
| 91 |
i64 getExpectedDeliveryTime(1:i64 item_id) throws (1:CatalogServiceException cex),
|
93 |
i64 getExpectedDeliveryTime(1:i64 item_id) throws (1:CatalogServiceException cex),
|
| 92 |
|
94 |
|
| 93 |
|
95 |
|