This commit is contained in:
Leon
2025-07-15 22:54:35 +02:00
commit f7eda17284
89 changed files with 18535 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import datetime
from pydantic import BaseModel, ConfigDict
class EntryBase(BaseModel):
"""Base schema for an entry."""
subject: str
body: str
class EntryCreate(EntryBase):
"""Schema for creating a new entry."""
pass
class Entry(EntryBase):
"""Schema for retrieving an entry with its ID and newsletter ID."""
id: int
newsletter_id: int
received_at: datetime.datetime
model_config = ConfigDict(from_attributes=True)