Automated Action 6f0470e475 Implement Bible Quiz App API with FastAPI and SQLite
- Setup project structure with FastAPI app
- Create SQLAlchemy models for categories, questions, quizzes, and results
- Implement API endpoints for all CRUD operations
- Set up Alembic migrations for database schema management
- Add comprehensive documentation in README.md
2025-06-05 10:31:02 +00:00

18 lines
428 B
Python

from pydantic import BaseModel, Field
from typing import Optional
class CategoryBase(BaseModel):
name: str = Field(..., min_length=1, max_length=100, description="Name of the category")
description: Optional[str] = Field(None, description="Description of the category")
class CategoryCreate(CategoryBase):
pass
class CategoryResponse(CategoryBase):
id: int
class Config:
from_attributes = True