Add .env.example with configuration for database, Redis, security, SMTP, workers, and plugins. Add .gitignore for Python, Node.js, Next.js, Docker volumes, and IDE files. Add MIT License. Update README.md with feature overview, quick start guide, architecture description, plugin system documentation, security details, backup/restore instructions, and developer setup. Add Alembic configuration files and placeholder directories for API, web, worker, and plugin components
33 lines
588 B
Python
33 lines
588 B
Python
import uuid
|
|
from datetime import datetime
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class NotificationBase(BaseModel):
|
|
title: str
|
|
message: str | None = None
|
|
type: str = "info"
|
|
link: str | None = None
|
|
metadata: dict[str, Any] = {}
|
|
|
|
|
|
class NotificationCreate(NotificationBase):
|
|
pass
|
|
|
|
|
|
class NotificationUpdate(BaseModel):
|
|
is_read: bool
|
|
|
|
|
|
class NotificationResponse(NotificationBase):
|
|
id: uuid.UUID
|
|
user_id: uuid.UUID
|
|
is_read: bool
|
|
read_at: datetime | None
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True
|