mirror of
https://github.com/khoaliber/LetterFeed.git
synced 2026-03-02 21:19:13 +00:00
feat: replace counting id with unique id
This commit is contained in:
@@ -20,8 +20,8 @@ class EntryCreate(EntryBase):
|
||||
class Entry(EntryBase):
|
||||
"""Schema for retrieving an entry with its ID and newsletter ID."""
|
||||
|
||||
id: int
|
||||
newsletter_id: int
|
||||
id: str
|
||||
newsletter_id: str
|
||||
received_at: datetime.datetime
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
@@ -18,8 +18,8 @@ class SenderCreate(SenderBase):
|
||||
class Sender(SenderBase):
|
||||
"""Schema for retrieving a sender with its ID and newsletter ID."""
|
||||
|
||||
id: int
|
||||
newsletter_id: int
|
||||
id: str
|
||||
newsletter_id: str
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
@@ -47,7 +47,7 @@ class NewsletterUpdate(NewsletterBase):
|
||||
class Newsletter(NewsletterBase):
|
||||
"""Schema for retrieving a newsletter with its ID, active status, senders, and entries count."""
|
||||
|
||||
id: int
|
||||
id: str
|
||||
is_active: bool
|
||||
senders: List[Sender] = []
|
||||
entries_count: int
|
||||
|
||||
Reference in New Issue
Block a user