You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, whether or not a user owns a track is calculated by the amount of plays the user has for the track.
If a user has 9 plays, they own the track. Conversely, if a user buys a track, we insert 9 plays into the database.
This is not really great for statistics and licensing stuff.
So we should add a userTrackPurchase(userId, trackId, purchasedAtDate, purchaseType) table in which we store info about the purchase. The purchaseType property could be "stream" | "purchase" to indicate whether it was bought by having streamed x times or whether it was a straight up purchase. Just some metadata.
The text was updated successfully, but these errors were encountered:
Right now, whether or not a user owns a track is calculated by the amount of plays the user has for the track.
If a user has 9 plays, they own the track. Conversely, if a user buys a track, we insert 9 plays into the database.
This is not really great for statistics and licensing stuff.
So we should add a
userTrackPurchase(userId, trackId, purchasedAtDate, purchaseType)
table in which we store info about the purchase. ThepurchaseType
property could be"stream" | "purchase"
to indicate whether it was bought by having streamed x times or whether it was a straight up purchase. Just some metadata.The text was updated successfully, but these errors were encountered: