Forum Documentation Showcase Pricing Learn more

Data for Each User


#1

Hey guys!! I am currently building our MVP but have ran into a bit of an issue in my database,
realized it when I took my prototype live.

We are building a loan platform.
A user would get a loan amount and then everytime they make a purchase the users credit decreases, everytime they make a payment it increases etc (like a creditcard, sortof…)

The thing is that even when Im logged in with a user, the credit amount alocated is alocated in general, the “purchases” and “payments” are discounted and added to that amount.

How do I assign amounts to each user, and not in general.
In otherwords, how do I make it so that the data generated by each user only belongs to that users account?

Thanks so much!

David!


#2

Re-Design your database based on the requirements, Can you post your DB scheme


#3

Hi David,

Without knowing too much about the rest of your data structure, if you have a data type for “Transaction” then that would have a field for “User” (type User). Every time a Transaction is created, save the User = Current User.

Other data types that should be unique to a user (or an Account) should behave the same way so that you can keep things together by User.


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:


#4

Thanks for the quick response!! I’ll give ir a try now!