Files
simple-mensa/api/models/common.py
T
Matteo Benedetto d592e0f32b feat: Refactor API structure and implement core functionalities
- Updated requirements to include asyncpg, pyyaml, aiofiles, and httpx.
- Modified schema.sql to add 'tipo_pasto' column in 'pasti' table.
- Created .gitignore file to exclude unnecessary files and directories.
- Added README.md for API implementation details and directory structure.
- Introduced config.yaml for centralized configuration management.
- Implemented core modules for database management, authentication, and exception handling.
- Developed models for 'pietanze', 'pasti', and 'prenotazioni' with validation.
- Created routes for CRUD operations on 'pietanze' with pagination and filtering.
- Established logging and error handling mechanisms throughout the application.
- Set up FastAPI application with CORS and health check endpoint.
2025-06-05 18:31:36 +02:00

15 lines
298 B
Python

from pydantic import BaseModel
from typing import List, Optional, Any
class ErrorResponse(BaseModel):
error: str
detail: Optional[str] = None
code: Optional[str] = None
class PaginatedResponse(BaseModel):
items: List[Any]
total: int
page: int
size: int
pages: int