I have a use case where users can upvote a given post multiple times. Each time a user upvotes a post, the post is awarded is 10 points (default) or a custom amount (input by the user).
I need to store this interaction i.e. for each upvote the user and the points awarded to the post.
At a high level, it feels like lists are the most efficient way to store this info. Create a separate datatype Upvote with three fields - post-id (post data type), user (list of users) and points (list of numbers). This data won’t need to be loaded very frequently.
On the Post datatype, I will store a running total of the points awarded for each post, which can be displayed quickly.
The problem with the approach is that by default - lists in bubble only store unique items. Thus, it won’t store the user into the list, when they press the upvote button, the second time around and the default points (10) will also won’t be stored.
To store each interaction as a separate row in the DB ‘feels’ rather inefficient and bloated.
Any suggestions are greatly appreciated.