from datetime import datetime, date from sqlalchemy import String, Text from sqlalchemy.orm import Mapped, mapped_column from app.db.base import Base from app.models.common import TimestampMixin, uuid4_str class Notification(Base, TimestampMixin): __tablename__ = "notifications" id: Mapped[str] = mapped_column(String(36), primary_key=True, default=uuid4_str) recipient_user_id: Mapped[str] = mapped_column(String(36), nullable=False, index=True) title: Mapped[str] = mapped_column(String(255), nullable=False) body: Mapped[str | None] = mapped_column(Text, nullable=True) is_read: Mapped[bool] = mapped_column(nullable=False, default=False)