Recently, I am doing a sharing function, which requires users to share content with everyone and various microblogs.
Because Oauth2.0 is now used for authentication, the structure of AccessToken should be the same. When making the Model, I think it should be written like this:
User: sinaAccessToken:AccessToken tencentAccessToken:AccessToken ... AccessToken: ...
However, each user should only have one AccessToken for Sina and one for Tencent.
So should the relationship between the two be one-to-one or one-to-many?
The user and toke are a one-to-many relationship
A user has multiple token.
User table puts token_idUser: AccessToken_id AccessToken: id