# Entity: Book from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.orm import Session from core.database import get_db from models.book import Book from schemas.book import BookSchema, BookCreate from helpers.book_helpers import create_book router = APIRouter() @router.post("/book", status_code=201, response_model=BookSchema) async def save_book( book: BookCreate, db: Session = Depends(get_db) ): return create_book(db=db, book=book)