Commit Graph

7 Commits

Author SHA1 Message Date
Felipe Cardoso
79f08a1208 Add quantity column to GuestGifts table and update references
Introduced a `quantity` field to track the number of reserved gifts in the many-to-many GuestGifts table. Updated all related CRUD operations, models, and imports to reflect the added column. Replaced `guest_gifts` with `GuestGifts` for consistency in naming conventions.
2025-03-19 09:56:30 +01:00
Felipe Cardoso
cd92cd9780 Remove token revocation logic and unused dependencies
Eliminated the `RevokedToken` model and associated logic for managing token revocation. Removed unused files, related tests, and outdated dependencies in authentication modules. Simplified token decoding, user validation, and dependency injection by streamlining the flow and enhancing maintainability.
2025-03-02 11:04:12 +01:00
Felipe Cardoso
8814dc931f Add token revocation mechanism and support for logout APIs
This commit introduces a system to revoke tokens by storing their `jti` in a new `RevokedToken` model. It includes APIs for logging out (revoking a current token) and logging out from all devices (revoking all tokens). Additionally, token validation now checks revocation status during the decode process.
2025-02-28 17:45:33 +01:00
Felipe Cardoso
290d91d395 Add MediaType and MediaPurpose to model exports
MediaType and MediaPurpose have been added to the `__all__` exports in the `models` module. This ensures they are properly exposed for import and use throughout the application.
2025-02-28 16:17:44 +01:00
Felipe Cardoso
632330b4ac Refactor models to improve consistency and relationships
Updated `Base` import to use centralized `app.core.database.Base` for consistency. Enhanced `TimestampMixin` and `UUIDMixin` with docstrings for clarity. Fixed metadata reference in `guest_gifts` table and added relationships in `email_template`.
2025-02-28 09:21:02 +01:00
Felipe Cardoso
c1caea44e8 ```
Rename metadata fields for clarity and fix imports.

Updated metadata-related field names across models to improve clarity and consistency (e.g., `metadata` to `media_metadata` and `notification_metadata`). Fixed an error in `guest_gifts` metadata reference and added a proper imports initialization in `__init__.py` for all models.
```
2025-02-28 08:34:49 +01:00
Felipe Cardoso
dcdfe8732c Add base and user models with essential fields and mixins
Created reusable `Base`, `UUIDMixin`, and `TimestampMixin` in `base.py`. Added a `User` model with attributes, relationships, and database configurations in `user.py` to establish a foundation for user-related features.
2025-02-27 18:14:38 +01:00