sqlite - How to design a Django database schema for tracking user-item interactions (with quantities) to enable analytics and re

I'm building a Django web app to manage item stock, where authenticated users can "take"

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.)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744275311a4566301.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信