user_meta
This is a table where all meta information of each user is stored. These are non-critical user data fields which may not need to be queried every time a user details are fetched. Hence separate table.
Model
id
int4
user_id
int4
initial_100_tokens_earned
bool
False
gupshup_opt_in
bool
False
created_at
timestamp
updated_at
timestamp
last_login_at_bolbhav_plus
timestamp
last_login_at_trader_app
timestamp
source_of_onboarding
text
is_first_validation
bool
True
profile_image_url
text
user_name
text
address
varchar(50)
consent_given
is_claim_trial
notification_permission_status
Description of fields
id
This is the primary key
user_id
The id of the user for which this meta information belongs to. This is a foreign key on person table.
initial_100_tokens_earned
We send several WhatsApp based notifications to keep our users engaged. One such notification is triggered when user earns their first 100 tokens. This field is by default set to false
and once user earns their first 100 tokens, this is set to true and a notification gets sent to the user. We require this boolean field so that the system doesn't the notification again for the same user.
gupshup_opt_in
To be added
created_at
The timestamp when a user meta row is first created.
updated_at
The timestamp at which a user meta row is last updated.
last_login_at_bolbhav_plus
The last login time of a user in the bolbhav plus app. This field is updated from the login API that the Bolbhav app (ReactNative) uses.
When we started the app, we didn’t know if a user was coming from Bolbhav app or an earlier source. Whoever was coming on the app, their entries were being recorded in wallet table since each new user would be assigned tokens for a free trial. From January 2024, we started recording when a user last logged in on the Bolbhav app.
last_login_at_trader_app
The last login time of a user in the bolbhav plus app. This field is updated from the login API that the trader app (FlutterFlow) uses. This is different from last_login_at_bolbhav_plus
field is because to make it flexible for a case when a user may login to trader app and then to bolbhav app, their app specific last login time remains unaffected.
source_of_onboarding
This field contains the app from where the user's entry was registered for the first time. Since we store all users (trader and farmers) from the two apps into a single table, this field helps to determine the source of onboarding for a specific user.
The possible values in this field are:
bolbhavplus_app - if the user was first registered from Bolbhav app
trader_app - if the user was first registered from Trader app
This field currently only holds data for certain number of rows as it was introduced at a later phase before trader app. It's safe to assume that the user meta rows with null values in source of onboarding would either be coming from bolbhav app or pre-bolbhav app duration.
is_first_validation
Default set to true. In the earlier user validation flow, we had an introduction video at the beginning that each user had to force watch for the first time. When a user would view it once, the field would be set to false and the user would not be shown the video again.
profile_image_url
The URL for profile image as uploaded by the user. This contains the S3 asset URL.
user_name
Full name of the user as entered by them in the profile page.
This field looks duplicate of the name field in person table. This needs to be discussed with the team and ideally should be removed if this turns out to be duplicate.
address
Address of the user entered by them in the profile page.
consent_given
Details to be added.
is_claim_trial
Details to be added.
notification_permission_status
Details to be added.
Last updated