Add models for EmailTemplate, ActivityLog, and NotificationLog

Introduced new database models to handle email templates, activity logs, and notification logs, including relevant enums and utilities. Updated ER diagram to reflect new relationships and attributes, enhancing event tracking and notification management capabilities.
This commit is contained in:
2025-02-27 19:54:26 +01:00
parent 7247190f5f
commit 9d71fc7fcd
5 changed files with 342 additions and 4 deletions

View File

@@ -1,11 +1,10 @@
# backend/models/event.py
from datetime import datetime, timezone
from sqlalchemy import (
Column, String, DateTime, Time, Boolean, Integer, ForeignKey, JSON,
UniqueConstraint
)
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import relationship
from .base import Base, TimestampMixin, UUIDMixin
@@ -59,4 +58,4 @@ class Event(Base, UUIDMixin, TimestampMixin):
)
def __repr__(self):
return f"<Event {self.title} ({self.event_date})>"
return f"<Event {self.title} ({self.event_date})>"