admin管理员组文章数量:1401470
I'm building a Django web app to manage item stock, where authenticated users can "take" items from inventory (I'm not using djangos authentication system, is more like the user enters a code and the app checks in SQL Server if exists then saves the session info). I need to store user interactions to later analyze and visualize data such as:
- Recent items taken
- Most popular items
- User-specific activity
- Date-filtered interactions
- Total quantities taken per item
- Full interaction history, etc.
Im thinking each interaction should record:
- User who performed the action
- Items taken (multiple items per interaction)
- Quantity taken per item
- Timestamp
The current structure I have is Users and Items Users (Django's built-in User model) Items (Model with fields like name, stock_quantity, etc.)
本文标签:
版权声明:本文标题:sqlite - How to design a Django database schema for tracking user-item interactions (with quantities) to enable analytics and re 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744275310a2598383.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论