Skip to content

Commit c8226e3

Browse files
committedAug 30, 2023
Update sqlite_database_structure.md
1 parent 04871b0 commit c8226e3

File tree

1 file changed

+74
-33
lines changed

1 file changed

+74
-33
lines changed
 

‎docs/sqlite_database_structure.md

+74-33
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,86 @@ Note: this documentation was generated automatically from the tasks.py code usin
33

44
**activity table**
55

6-
| Column | Description |
7-
| --- | --- |
8-
| event_name | Indicates the category or type of event that took place, such as a message sent, an application command used, premium_upsell_viewed, etc. These event names help identify the specific action performed. |
9-
| day | Represents the date the respective event took place, it is in 'YYYY-MM-DD' format. |
10-
| hour | Indicates the hour (in 24-hr format) when the event occurred. |
11-
| occurrence_count | Tracks the number of times a particular event occurred. |
12-
| associated_channel_id | Refers to the ID of the related channel, if applicable. It links this event to a specific channel. |
13-
| associated_guild_id | Contains the ID of the associated guild, if applicable. It ties the event to a specific guild. |
14-
| associated_user_id | Specifies the ID of the user connected with the event, if applicable. It relates the event with a specific user. |
15-
| extra_field_1 | An extra field to accommodate varying attributes based on the event_type. Could be utilized for instance in storing names of emojis for an add_reaction event. |
16-
| extra_field_2 | Another extra field to accommodate varying attributes based on the event_type. Could be for instance used in storing custom emoji information in add_reaction events. |
6+
|Column|Description|
7+
|---|---|
8+
|event_name|Identification of activity event. This may include 'message_sent', 'guild_joined', 'application_command_used', etc. |
9+
|day|The day the described event occurred, format is 'YYYY-MM-DD'. |
10+
|hour|The hour the event occurred, expressed in a 24-hour format.|
11+
|occurence_count|How many times the event has occurred.|
12+
|associated_channel_id|The unique ID of the channel associated with the event.|
13+
|associated_guild_id|The Unique ID of the guild (server) associated with the event.|
14+
|associated_user_id|The unique user ID associated with the event.|
15+
|extra_field_1|Additional details about the event. The values vary depending on the given event.|
16+
|extra_field_2|Additional details about the event. The values vary depending on the given event.|
1717

1818
**dm_channels_data table**
1919

20-
| Column | Description |
21-
| --- | --- |
22-
| channel_id | Contains Discord ID of the Direct Message (DM) channel. |
23-
| dm_user_id | Stores the Discord ID of the user involved in the DM. |
24-
| user_name | Stores the username of the user engaged in the DM. |
25-
| display_name | Stores the display name of the user involved in the DM. |
26-
| user_avatar_url | Contains the URL that points to the user's avatar. |
27-
| total_message_count | Reflects the total number of messages exchanged in the DM. |
28-
| total_voice_channel_duration | Represents the total duration the user was involved in voice channels while in the DM. |
29-
| sentiment_score | Indicates the overall sentiment score derived from the message contents in the DM. |
20+
|Column|Description|
21+
|---|---|
22+
|channel_id|Unique ID of the channel where direct message happened.|
23+
|dm_user_id|Unique ID of the user involved in the direct message.|
24+
|user_name|Username of the user involved in the direct message.|
25+
|display_name|Display name of the user involved in the direct message.|
26+
|user_avatar_url|URL of the user's avatar.|
27+
|total_message_count|Total count of messages in the direct message.|
28+
|total_voice_channel_duration|Total duration of voice channel usage in minutes.|
29+
|sentiment_score|Sentiment score of messages in the direct message (ranges from -1 to 1, from negative to positive sentiment).|
3030

3131
**guild_channels_data table**
3232

33-
| Column | Description |
34-
| --- | --- |
35-
| channel_id | Indicates the Discord ID of the guild channel. |
36-
| guild_id | Contains the Discord ID of the guild associated with the channel. |
37-
| channel_name | Stores the name of the guild channel. |
38-
| total_message_count | Captures the total number of messages exchanged in the guild channel. |
39-
| total_voice_channel_duration | Contains the total duration users were involved in voice channels while in the guild. |
33+
|Column|Description|
34+
|---|---|
35+
|channel_id|Unique ID of the guild channel.|
36+
|guild_id|Unique ID of the guild (server).|
37+
|channel_name|Name of the guild channel.|
38+
|total_message_count|Total count of messages in the guild channel.|
39+
|total_voice_channel_duration|Total duration of voice channel usage in the guild channel in minutes.|
4040

4141
**guilds table**
4242

43-
| Column | Description |
44-
| --- | --- |
45-
| guild_id | Shows the Discord ID of the guild. |
46-
| guild_name | Stores the name of the guild. |
47-
| total_message_count | Reflects the total number of messages exchanged in the guild. |
43+
|Column|Description|
44+
|---|---|
45+
|guild_id|Unique ID of the guild.|
46+
|guild_name|Name of the guild.|
47+
|total_message_count|Total count of messages in the guild.|
48+
49+
**payments table**
50+
51+
|Column|Description|
52+
|---|---|
53+
|payment_id|Unique ID of the payment transaction.|
54+
|payment_date|Date of the payment done, format is 'YYYY-MM-DD'.|
55+
|payment_amount|Amount of payment done.|
56+
|payment_currency|Currency of the payment done.|
57+
|payment_description|Description of the payment done.|
58+
59+
**voice_sessions table**
60+
61+
|Column|Description|
62+
|---|---|
63+
|channel_id|Unique ID of the channel where voice session was held.|
64+
|guild_id|Unique ID of the guild (server), of which channel the voice session was held.|
65+
|duration_mins|Duration of the voice session in minutes.|
66+
|started_date|Start date and time of the voice session.|
67+
|ended_date|End date and time of the voice session.|
68+
69+
**sessions table**
70+
71+
|Column|Description|
72+
|---|---|
73+
|duration_mins|Total duration of the user's active session in minutes.|
74+
|started_date|Start date and time of the user's session.|
75+
|ended_date|End date and time of the user's session.|
76+
|device_os|Operating system of the device from which session was active.|
77+
78+
**package_data table**
79+
80+
|Column|Description|
81+
|---|---|
82+
|package_id|Unique ID of the data package.|
83+
|package_version|Version of the data package.|
84+
|package_owner_id|Unique ID of the owner of the data package.|
85+
|package_owner_name|Username of the owner of the data package.|
86+
|package_owner_display_name|Display Name of the owner of the data package.|
87+
|package_owner_avatar_url|URL of the owner's avatar.|
88+
|package_is_partial|Indicates whether the package is partial (1 - Yes, 0 - No).|

0 commit comments

Comments
 (0)
Please sign in to comment.