1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
Commit graph

9 commits

Author SHA1 Message Date
kzndotsh
0495b70a88 refactor(schema.prisma): remove commented out SQLite datasource to clean up code
refactor(constants.py): rename CHANNELS to LOG_CHANNELS for better clarity
feat(constants.py): add LOG to EMBED_STATE_COLORS and EMBED_STATE_ICONS for log embeds
feat(constants.py): add EMBED_SPECIAL_CHARS for special character usage in embeds
feat(embeds.py): add set_image method to EmbedCreator for image support in embeds
feat(embeds.py): add create_log_embed method to EmbedCreator for creating log embeds
feat(functions.py): add compare_changes, extract_guild_attrs, extract_member_attrs functions for better data handling
2024-04-09 07:25:57 +00:00
kzndotsh
22cd22c795 refactor(schema.prisma): rename 'author' and 'author_id' to 'user' and 'user_id' in Reminders model for better clarity and consistency with other models
feat(database/controllers.py): add CRUD operations for users in UsersController
feat(database/controllers.py): add CRUD operations for infractions in InfractionsController
feat(database/controllers.py): add CRUD operations for notes in NotesController
feat(database/controllers.py): add CRUD operations for snippets in SnippetsController
docs(database/controllers.py): add docstrings to all methods in UsersController, InfractionsController, NotesController, and SnippetsController
refactor(database/controllers.py): add type hints to all methods in UsersController, InfractionsController, NotesController, and SnippetsController
feat(database/controllers.py): import Reminders model from prisma.models
feat(database/controllers.py): import datetime module for handling date and time data

docs(database/controllers.py): add docstrings to SnippetsController and RemindersController methods for better code understanding
feat(database/controllers.py): add RemindersController class to handle database operations related to reminders
refactor(database/controllers.py): add RemindersController to DatabaseController for centralized database operations management

style(embeds.py): add line breaks for better code readability and maintainability
2024-04-07 01:53:58 +00:00
kzndotsh
e5af901ff3 docs(README.md): update command instruction to include server id for clarity
refactor(schema.prisma): add autoincrement() to id fields in Infractions, Notes, Reminders models for automatic id generation
feat(controllers.py): add toggle_afk method in UsersController to enable/disable afk status
refactor(controllers.py): remove infraction_id from create_infraction method in InfractionsController as id is autoincremented
feat(controllers.py): add create_note, delete_note, update_note methods in NotesController for note management
2024-04-06 13:41:11 +00:00
kzndotsh
2ffe01954e chore: remove opencommit.yml workflow as it's no longer needed
refactor(schema.prisma): change InfractionType from enum to string for flexibility
refactor(schema.prisma): make created_at fields nullable and default to now() for better data consistency
refactor(database/controllers.py): rename find_users and find_user to get_all_users and get_user_by_id for better readability
feat(database/controllers.py): add InfractionsController and SnippetsController to handle infractions and snippets related operations
refactor(database/controllers.py): move InfractionType enum to controllers.py for better organization
2024-04-05 23:29:51 +00:00
kzndotsh
89d8fd788e [DB] Add example controller 2024-04-05 18:46:28 -04:00
kzndotsh
030d0647b9 fix(schema.prisma): refactor schema to improve readability and remove unused models
feat(schema.prisma): add new models for Settings, Notes, and Reminders to support new features
fix(main.py): move database connection after starting coroutines to ensure they are started before connecting to the database
feat(main.py): add log message for closing database connection to improve debugging
2024-04-05 21:22:12 +00:00
kzndotsh
8a4fd58f20 feat(schema.prisma): switch database provider from sqlite to postgresql for better scalability and performance
chore(schema.prisma): comment out old postgresql datasource configuration for future reference

refactor(schema.prisma): update database schema to better represent Discord data

- Replace 'roles' model with 'Users' and 'Roles' models to separate user and role data
- Add 'UserRoles' model to represent many-to-many relationship between users and roles
- Replace 'notes' model with 'Infractions' and 'Snippets' models to separate infraction and snippet data
- Remove 'moderators', 'settings', 'logs', 'guilds', and 'messages' models as they are not needed in the new schema
- Add 'InfractionType' enum to represent different types of infractions
- Update comments to better explain the purpose of each model and field

These changes were made to better align the database schema with the data provided by Discord and to simplify the data model.

feat: add new models for logs, user_roles, notes, snippets, guilds, infractions to extend database schema

WHY: To support new features such as logging, user roles, moderator notes, text snippets, guilds, and user infractions.
2024-04-05 18:41:20 +00:00
kzndotsh
6a2dbd7003 [Refactor] More major changes, replaced supabase client with prisma, added error handler concept 2024-03-28 01:20:05 -04:00
kzndotsh
772eae6a2d [Refactor] Major changes to dir structure, temp removal of permissions, added loguru, added some async libs, improve types, clean pyproject config 2024-03-27 16:16:33 -04:00