REST API / DATA MODEL DESIGN - User, account, or both?

I had some thoughts about properly creating my application and providing them with a good and consistent API, but now I have some doubts about the user / account model.

This is ridiculous, but if you look at some applications, you will see that they treat you as a user, but when editing your data you are redirected to the account.

A good example of this is Twitter.

So, I would like to know your opinion on what is the best way to build such an architecture?

Do I really need an account?

Why should I use an account or user?

If I decide to implement the payment instruction for this user later, should this user store this information inside an account that stores his password and other important information?

Sorry, but I got a little lost about this, sometimes it seems that other applications use more models than necessary, so I'm not sure :(

I thought that I need to connect such models:

 User has_one :account

But I'm still not sure what information relates to the User and the Account.

Thank you in advance for your help.

Greetings

+3
source share
1 answer

. , , . , .

- . , " ", - " " .. , , , . , P.R., " ". "" " " : "". .

-, . , , : , -, .. , .

+1

Source: https://habr.com/ru/post/1723699/


All Articles