How to design the inventory table of the purchase, sale and storage system?

problem description

  • Design a purchase, sale and inventory system for a medium-sized multi-store seller; in order to improve sales opportunities and reduce the production of expired goods, items will be transferred back and forth among multiple stores;
  • goods have purchase prices and production batches; the purchase prices of different batches are different; there are N quantities for each batch of goods; even the purchase prices are different for different purchase channels of the same batch.

the environmental background of the problems and what methods you have tried

excuse me, how to design the inventory table? To achieve the following functions:

  1. Store profit statistics (sales-purchasing cost)
  2. shops transfer goods to each other
  3. retrieve inventory in real time
Menu