Skip to content

Commit 922e153

Browse files
committed
schemas
1 parent a7a408b commit 922e153

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

app/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from fastapi import FastAPI
22
from app.api.v1.routes import user, blog
3-
from app.core.database import engine, Base
43

5-
Base.metadata.create_all(bind=engine)
64

75
app = FastAPI()
86

app/schemas/blog.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
from pydantic import BaseModel
22

3-
class BlogPost(BaseModel):
3+
class BlogBase(BaseModel):
44
title: str
55
content: str
6+
published: bool | None = None
7+
8+
9+
class BlogPost(BlogBase):
10+
pass

0 commit comments

Comments
 (0)