Where do you draw the line for how much logic can go in your read models? For example, we have 2 BCs: Inventory and Sales. We need to generate reports regarding inventory levels on specific dates: perfect for a Read Model.
Simple SELECT from InventoryItem and OrderLine tables based on the ProductSKU. I can then use the current state of the InventoryItem to compute what inventory would be on a date using the date when orders were placed.
However, there seems to be a lot of logic in this ReadModel class to do this. Also, what if I want to change what gets reported based on an Order status (e.g. PENDING vs SHIPPED)? Doesn't this force even more business logic into the ReadModel?
TL;DR: where do you draw the line with calculation logic on ReadModels?