Database models
Notification database model

channel_members_notification_preferences

1
{
2
//Primary key
3
"company_id": "uuid-v4",
4
"channel_id": "uuid-v4",
5
"user_id": "uuid-v4",
6
7
"preferences": "all" | "mentions" | "me" | "none",
8
"last_read": 16000000, //Timestamp in seconds
9
}
Copied!

channel_thread_users

1
{
2
//Primary key
3
"company_id": "uuid-v4",
4
"channel_id": "uuid-v4",
5
"thread_id": "uuid-v4",
6
7
"user_id": "uuid-v4"
8
}
Copied!

user_notifications_badges (this is not a counter like scylladb counters here, just classic table)

1
{
2
//Primary key
3
"company_id": "uuid-v4", (partition key)
4
"user_id": "uuid-v4", (clustering key)
5
"workspace_id": "uuid-v4", (clustering key)
6
"channel_id": "uuid-v4", (clustering key)
7
"thread_id": "uuid-v4", (clustering key)
8
}
Copied!

user_notifications_general_preferences

1
{
2
//Primary key
3
"company_id": "uuid-v4",
4
"user_id": "uuid-v4",
5
"workspace_id": "uuid-v4",
6
7
"preferences": PreferencesObject
8
}
Copied!
Last modified 7mo ago
Copy link