user_membership_wallet_tracker
This model contains some analytical insights on the app usage by a user for areas that require membership.
This table is incorrectly named. It does not hold any information about membership_wallet. A more valid name can be user_membership_tracker
Model
id
int4
user_id
int4
Foreign key (person table)
wallet_id
varchar
Foreign key (user wallets)
last_used_timestamp
timestamp
total_count
int4
todays_count
int4
total_unique_days_used
int4
created_at
timestamp
updated_at
timestamp
Description of fields
id
This is the primary key.
user_id
The ID of the user for which this tracker belongs to.
wallet_id
The wallet ID of the user.
This field may be redundant as we're only storing membership data here, hence all the wallet ids currently point to user's membership wallet.
last_used_timestamp
This holds the timestamp when the user's last accessed the sale receipt data. This field is updated on the API that fetches the sale receipt data for a day.
This field is also used to determine whether the user has already been debited for today for viewing the sale receipt data or not.
total_count
The total number of times the user accessed the sale receipt data.
todays_count
The total number of times the user accessed the sale receipt data today. This field auto-resets when the user fetches the data for the first time on a day.
total_unique_days_used
The total unique days when a user has accessed sale receipt data. This is incremented by 1 daily given the user access the data.
created_at
Timestamp when the row was created.
updated_at
Timestamp when the row was last updated.
Last updated