Feat: [main] hufs-notice-crawler CI/CD까지 구현 완료
All checks were successful
hufs-notice-crawler-cicd / build_push_deploy (push) Successful in 8m35s
All checks were successful
hufs-notice-crawler-cicd / build_push_deploy (push) Successful in 8m35s
This commit is contained in:
41
app/schemas.py
Normal file
41
app/schemas.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class AttachmentOut(BaseModel):
|
||||
name: str
|
||||
url: str
|
||||
|
||||
|
||||
class PostOut(BaseModel):
|
||||
board_key: str
|
||||
board_name: str
|
||||
board_id: int
|
||||
article_id: int
|
||||
title: str
|
||||
post_url: str
|
||||
author: str | None
|
||||
published_at: datetime | None
|
||||
summary: str | None
|
||||
content_text: str | None
|
||||
attachments: list[AttachmentOut]
|
||||
|
||||
|
||||
class LatestBoardPostOut(BaseModel):
|
||||
board_key: str
|
||||
board_name: str
|
||||
board_id: int
|
||||
article_id: int
|
||||
title: str
|
||||
post_url: str
|
||||
published_at: datetime | None
|
||||
|
||||
|
||||
class CrawlResponse(BaseModel):
|
||||
checked_at: datetime
|
||||
bootstrap_mode: bool
|
||||
bootstrap_inserted_count: int
|
||||
new_posts_count: int
|
||||
new_posts: list[PostOut]
|
||||
latest_posts_by_board: list[LatestBoardPostOut]
|
||||
Reference in New Issue
Block a user