35 lines
808 B
Python
35 lines
808 B
Python
# retoor <retoor@molodetz.nl>
|
|
from molodetz.schemas.base import OutModel, PublicUserOut
|
|
|
|
|
|
class PostOut(OutModel):
|
|
uid: str | None = None
|
|
slug: str | None = None
|
|
title: str | None = None
|
|
body: str | None = None
|
|
topic: str | None = None
|
|
status: str | None = None
|
|
is_placeholder: bool = False
|
|
published_at: str | None = None
|
|
created_at: str | None = None
|
|
updated_at: str | None = None
|
|
|
|
|
|
class PostListOut(OutModel):
|
|
title: str | None = None
|
|
topic: str | None = None
|
|
posts: list[PostOut] = []
|
|
next_cursor: str | None = None
|
|
|
|
|
|
class PostDetailOut(OutModel):
|
|
post: PostOut | None = None
|
|
author: PublicUserOut | None = None
|
|
|
|
|
|
class HomeOut(OutModel):
|
|
intro: str = ""
|
|
posts: list[PostOut] = []
|
|
flyer_count: int = 0
|
|
meme_count: int = 0
|