
- Set up project structure with FastAPI and SQLite - Create models for users, questions, and quizzes - Implement Alembic migrations with seed data - Add user authentication with JWT - Implement question management endpoints - Implement quiz creation and management - Add quiz-taking and scoring functionality - Set up API documentation and health check endpoint - Update README with comprehensive documentation
34 lines
522 B
Python
34 lines
522 B
Python
from enum import Enum
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Testament(str, Enum):
|
|
old = "Old"
|
|
new = "New"
|
|
|
|
|
|
class BibleBookBase(BaseModel):
|
|
name: str
|
|
testament: Testament
|
|
|
|
|
|
class BibleBookCreate(BibleBookBase):
|
|
pass
|
|
|
|
|
|
class BibleBookUpdate(BibleBookBase):
|
|
name: Optional[str] = None
|
|
testament: Optional[Testament] = None
|
|
|
|
|
|
class BibleBookInDBBase(BibleBookBase):
|
|
id: int
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
|
|
class BibleBook(BibleBookInDBBase):
|
|
pass |