You must track inventory at the lowest level. In other words, when you were going to select one block from a shelf, what is the most specific information you need to know in order to get the right thing.
In your example, I couldn’t just say: “Go get a bottle,” or you can return the wine instead of vodka. I also can’t say, “Go get a bottle of vodka,” because you can return the Absolute when I want the Cirque. Finally, I can’t say, “Go get a bottle of Ciroc,” because you can return a size of 1L when I need a size of 1.5L.
I could say, “Go get the third bottle on the left side in the front row of the lower 1.5L Ciroc case,” but that would be stupid because all 1.5L Ciroc bottles are the same. (Taste aside;)).
The sweet spot becomes your warehouse (SKU). Fortunately, almost every company in the world has decided this for you already. Just use the UPC number under the barcode as your SKU.
Based on this, your models will be something like ...
InventoryOnHand - id:int - product_id:int - quantity:int Product - id:int - sku:string - name:string
Then you increased and decreased the amount of InventoryOnHand as everything happened and was lost.
source share