diff --git a/docs/sqlite_database_structure.md b/docs/sqlite_database_structure.md index 0b92673..849c652 100644 --- a/docs/sqlite_database_structure.md +++ b/docs/sqlite_database_structure.md @@ -2,78 +2,86 @@ Note: this documentation was generated automatically from the tasks.py code usin **activity table** + |Column|Description -|--|--| -|event_name|Indicates the type of event recorded. For example: 'message_sent', 'guild_joined', 'application_command_used', 'add_reaction', 'app_opened'.| -|day|The date on which the event occurred, formatted as 'YYYY-MM-DD'.| -|hour|The hour during which the event occurred, given as an integer from 0-23.| -|occurrence_count|The number of times this event occurred during this hour on the given day.| -|associated_channel_id|ID of the channel associated with the event.| -|associated_guild_id|ID of the guild associated with the event.| -|associated_user_id|ID of the user or application associated with the event. For 'application_command_used' events only.| -|extra_field_1|Additional data associated with the event. Can contain the name of the emoji for 'add_reaction' events, the operating system for 'app_opened' events, and the application ID for 'application_command_used' events.| -|extra_field_2|Additional data associated with the event. Used to indicate if an emoji is custom ('1') or not ('0') for 'add_reaction' events.| +|-|- +| event_name | The name of the activity event that occurred. Examples could include `message_sent`, `email_opened`, `app_crashed`, etc.| +| day | The specific day when the event occurred in the format `YYYY-MM-DD`. | +| hour | The specific hour when the event occurred as an integer value using a 24-hour clock format. | +| occurence_count | The number of times the event occurred during the specified hour on the specified day. | +| associated_channel_id | The ID of the channel associated with the event, if any. | +| associated_guild_id | The ID of the guild (paid version of a server) associated with the event, if any. | +| associated_user_id |The ID of the user associated with the event, if any. | +| extra_field_1 | An extra field that may hold different contents depending on the event. | +| extra_field_2 | A second extra field that may hold different contents depending on the event. | **dm_channels_data table** + |Column|Description -|--|--| -|channel_id|The unique identifier for the direct message channel.| -|dm_user_id|The unique identifier for the user involved in the direct message channel.| -|user_name|The username of the user involved in the direct message channel.| -|display_name|The display name of the user involved in the direct message channel.| -|user_avatar_url|URL of the user’s avatar.| -|total_message_count|The total number of messages exchanged in the direct message channel.| -|total_voice_channel_duration|The total duration of voice channel activity in the direct message channel.| -|sentiment_score|The sentiment score of the messages in the direct message channel.| +|-|- +| channel_id | The unique identifier for the direct message (DM) channel. | +| dm_user_id | The unique identifier associated with the user in the DM. | +| user_name | The name of the user associated with the DM. | +| display_name | The user's display name associated with the DM. | +| user_avatar_url | The URL path to the user's avatar image. | +| total_message_count | The total number of messages counted in the DM channel. | +| total_voice_channel_duration | The total duration measured of voice interaction in the DM channel. | +| sentiment_score | A score representing the sentiment of the messages in the DM channel. | **guild_channels_data table** + |Column|Description -|--|--| -|channel_id|The unique identifier for the guild channel.| -|guild_id|The unique identifier for the guild the channel belongs to.| -|channel_name|The name of the channel.| -|total_message_count|The total number of messages sent in the channel.| -|total_voice_channel_duration|The total time spent in the voice channels of the discord guild.| +|-|- +| channel_id | The unique identifier for the guild channel. | +| guild_id | The unique identifier for the guild. | +| channel_name | The name of the guild channel. | +| total_message_count | The total number of messages counted in the guild channel. | +| total_voice_channel_duration | The total duration measured of voice interaction in the guild channel. | **guilds table** + |Column|Description -|--|--| -|guild_id|The unique identifier for the guild.| -|guild_name|The name of the guild.| -|total_message_count|The total number of messages sent across all channels in the guild.| +|-|- +| guild_id | The unique identifier for the guild. | +| guild_name | The name of the guild. | +| total_message_count | The total number of messages counted in the guild. | **payments table** -|Column|Description -|--|--| -|payment_id|A unique identifier for the payment transaction.| -|payment_date|The date the payment was made.| -|payment_amount|The amount of the payment.| -|payment_currency|The currency in which the payment was made.| -|payment_description|Description of the payment transaction.| + +| Column| Description +|-|- +| payment_id | The unique identifier for the payment. | +| payment_date | The date the payment was made in format `YYYY-MM-DD`. | +| payment_amount | The amount of the payment. | +| payment_currency | The currency the payment was made in. | +| payment_description | A description of the payment. | **voice_sessions table** -|Column|Description -|--|--| -|channel_id|The unique identifier for the channel in which the voice session occurred.| -|guild_id|The unique identifier for the guild in which the voice session occurred.| -|duration_mins|The duration of the voice session, measured in minutes.| -|started_date|The starting date and time of the voice session.| -|ended_date|The ending date and time of the voice session.| + +| Column | Description +|-|- +| channel_id | The unique identifier for the channel of the voice session. | +| guild_id | The unique identifier for the guild of the voice session. | +| duration_mins | The total duration of the voice session in minutes. | +| started_date | The date the voice session started in the format `YYYY-MM-DD`.| +| ended_date | The date the voice session ended in the format `YYYY-MM-DD`.| **sessions table** -|Column|Description -|--|--| -|duration_mins|The duration of the session, in minutes.| -|started_date|The starting date and time of the session.| -|ended_date|The ending date and time of the session.| -|device_os|The operating system of the device used for the session.| + +|Column | Description +|-|- +| duration_mins | The total duration of the session in minutes. | +| started_date | The date the session started in the format `YYYY-MM-DD`.| +| ended_date | The date the session ended in the format `YYYY-MM-DD`.| +| device_os | The operating system of the device used for the session.| **package_data table** -|Column|Description -|--|--| -|package_id|The unique identifier for the data package.| -|package_version|The version of the data package.| -|package_owner_id|The unique identifier for the owner of the package.| -|package_owner_name|The username of the package owner.| -|package_owner_display_name|The display name of the package owner.| -|package_owner_avatar_url|The URL to the avatar image of the package owner.| \ No newline at end of file + +| Column | Description +|-|- +| package_id | The unique identifier for the package.| +| package_version | The version of the package.| +| package_owner_id | The id of the owner of the package.| +| package_owner_name | The name of the owner of the package.| +| package_owner_display_name | The display name of the owner of the package.| +| package_owner_avatar_url | The URL path to the owner's avatar image.| \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index b354836..37c7686 100644 --- a/requirements.txt +++ b/requirements.txt @@ -48,7 +48,7 @@ regex==2023.6.3 requests==2.31.0 rich==13.4.2 six==1.16.0 -SQLAlchemy==2.0.15 +SQLAlchemy==2.0.18 tomli==2.0.1 tqdm==4.65.0 typing_extensions==4.6.2