feat: show author name instead of user x

This commit was merged in pull request #7.
This commit is contained in:
2025-06-24 21:14:35 -04:00
parent 7242579c17
commit 6bda5876ba
8 changed files with 154 additions and 39 deletions
+1
View File
@@ -16,6 +16,7 @@ class Blog(Base):
id = Column(Integer, primary_key=True, index=True)
title = Column(String, index=True)
author_id = Column(Integer, nullable=False, index=True)
author_name = Column(String, nullable=False, index=True)
description = Column(String, nullable=True)
body = Column(String, nullable=False)
created_at = Column(
+2
View File
@@ -5,6 +5,7 @@ from pydantic import AwareDatetime, BaseModel, EmailStr
class BlogBase(BaseModel):
title: str
author_id: int
author_name: str
description: Optional[str] = None
body: str
created_at: AwareDatetime
@@ -30,6 +31,7 @@ class BlogUpdate(BaseModel):
title: Optional[str] = None
description: Optional[str] = None
author_name: Optional[str] = None
body: Optional[str] = None
created_at: Optional[str] = None
updated_at: Optional[str] = None