Pipelinen parannuksia building blockeilla

This commit is contained in:
Jaakko Vanhala
2026-04-12 18:48:14 +03:00
parent c1a5f8aff5
commit b2ee8b9031
175 changed files with 13311 additions and 237 deletions

View File

@@ -0,0 +1,35 @@
from pydantic import BaseModel
from datetime import date
class UserCreate(BaseModel):
username: str
email: str
password_hash: str
class UserResponse(UserCreate):
id: int
class Config:
from_attributes = True
class ArticleCreate(BaseModel):
title: str
content: str
author_id: int
class ArticleResponse(ArticleCreate):
id: int
class Config:
from_attributes = True
class CommentCreate(BaseModel):
content: str
article_id: int
author_id: int
class CommentResponse(CommentCreate):
id: int
class Config:
from_attributes = True