Rev 561 | Rev 588 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
namespace java in.shop2020.model.v1.catalognamespace py shop2020.thriftpy.model.v1.catalog/**Objects*//**Caution :- Never ever change the numbers in it. Please confirm from @ashish before any changes in enuma dn other entries in file.**/enum status{PHASED_OUT = 0, //Item is no longer sellingDELETED = 1, //Item has been deliberately deletedPAUSED = 2, //Item's sale is currently pausedACTIVE = 3, //Item is available for sale as of nowIN_PROCESS = 4 //Item has been added, but content is not available for the same}/*Warehouse fields detailslocation: it is full addressvendorString: some key for the warehouse*/struct Warehouse{1:i64 id,2:string location,3:status warehouseStatus,4:i64 addedOn,5:i64 lastCheckedOn,6:string tinNumber,7:string pincode,8:string vendorString}/* */struct ItemInventory{1:i64 id,2:map<i64,i64> availability}struct ItemInventoryHistory{1:i64 item_id,2:i64 warehouse_id,3:i64 timestamp,4:i64 availability}struct Item{1:i64 id,2:string manufacturerName,3:string modelNumber,4:string modelName,5:string category,6:string comments,7:i64 catalogItemId,8:string vendorItemId10:i64 featureId,11:string featureDescription,12:ItemInventory itemInventory,13:double mrp, //maxmimum retail price14:double mop, //market operative price15:double sellingPrice, //Selling price16:double weight,17:i64 addedOn,18:i64 startDate,19:i64 retireDate,20:status itemStatus,21:map<string,string> otherInfo}exception InventoryServiceException{1:i64 id,2:string message}service InventoryService{/**Content methods*//**Availability and inventory attributes*///all add and update methods - added by Ashishi64 addItem(1:Item item) throws (1:InventoryServiceException cex),i64 updateItem(1:Item item) throws (1:InventoryServiceException cex),i64 addWarehouse(1:Warehouse warehouse) throws (1:InventoryServiceException cex),bool isActive(1:i64 catalogItemId) throws (1:InventoryServiceException isex),// Commented by Rajveer:- replaced by new one below//void updateInventory(1:i64 item_id, 2:i64 warehouse_id, 3: i64 quantity, 4:i64 timestamp) throws (1:InventoryServiceException cex),void updateInventory(1:i64 warehouse_id, 2:string timestamp, 3:map<string, i64> availability) throws (1:InventoryServiceException cex),// commented right now. write on based of requirement// void updatePrice(1:i64 item_id, 2:i64 warehouse_id, 3:double price) throws (1:InventoryServiceException cex),//all delete methodsvoid retireWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),//Item management apisvoid startItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),void retireItemOn(1:i64 item_id, 2:i64 timestamp) throws (1:InventoryServiceException cex),void changeItemStatus(1:i64 item_id, 2:i64 timestamp, 3:status newstatus) throws (1:InventoryServiceException cex),//Other accessor methods - added by AshishItem getItem(1:i64 item_id) throws (1:InventoryServiceException cex),Item getItemByCatalogId(1:i64 catalog_item_id) throws (1:InventoryServiceException cex),list<Item> getAllItems(1:bool isActive) throws (1:InventoryServiceException cex),list<Item> getAllItemsByStatus(1:status itemStatus) throws (1:InventoryServiceException cex),ItemInventory getItemInventory(1:i64 item_id) throws (1:InventoryServiceException cex),ItemInventory getItemInventoryByCatalogId(1:i64 item_id) throws (1:InventoryServiceException cex),i64 getItemAvailibilityAtWarehouse(1:i64 warehouse_id, 2:i64 item_id) throws (1:InventoryServiceException cex),list<Warehouse> getAllWarehouses(1:bool isActive) throws (1:InventoryServiceException cex),Warehouse getWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),list<Warehouse> getAllWarehousesForItem(1:i64 item_id) throws (1:InventoryServiceException cex),list<Item> getAllItemsForWarehouse(1:i64 warehouse_id) throws (1:InventoryServiceException cex),// for home page .... best deals, best sellers and latest arrivalslist<i64> getBestSellers(1:i64 beginIndex, 2:i64 totalItems) throws (1:InventoryServiceException cex),i64 totalBestSellers() throws (1:InventoryServiceException cex),list<i64> getBestDeals(1:i64 beginIndex, 2:i64 totalItems) throws (1:InventoryServiceException cex),i64 totalBestDeals() throws (1:InventoryServiceException cex),list<i64> getLatestArrivals(1:i64 beginIndex, 2:i64 totalItems) throws (1:InventoryServiceException cex),i64 totalLatestArrivals() throws (1:InventoryServiceException cex)}