Do everyone's Wechat general account membership information and Mini Program member information come from a common table or separately?

question:
now the Wechat official account application has been launched, and the member information table has the
Mini Program application ready for development, because Mini Program and the official account user openid are different
I don"t know how to identify everyone"s membership information? Are
all under the same table, or are they separated?

Dec.22,2021

then if you join Weibo, the openid is also different. Do you put another table?
suggest a table


user
|user_id|avatar|nickname|created_at|created_ip|
oauthopenid
|oauth_id|type|openid|appid|created_at|user_id|
The types of

oauth tables are unionid and openid.
if you want to check the official account, you can use appid to find the oauth record, and then connect the table
to check Mini Program is also similar

this design has great expansibility, and Wechat authorization can be used later if you join APP. Even if you add things like Weibo, you can also support authorization binding

.

A good practice is to create a new user meta-information table. Associate unnecessary content with this information through the user's primary key, which can be stored in the form of key-value pairs.

Menu