API and database models refactoring

This commit is contained in:
2025-09-20 20:17:16 +02:00
parent 91a0a13daa
commit c494c5b5c6
65 changed files with 931 additions and 487 deletions

16
models/api/base.py Normal file
View File

@@ -0,0 +1,16 @@
from typing import List, TypeVar, Generic
from pydantic import BaseModel
T = TypeVar('T')
class ListResponse(BaseModel, Generic[T]):
"""Generic list response model"""
items: List[T]
total: int
skip: int
limit: int
class StatusResponse(BaseModel):
"""Generic status response"""
success: bool
message: str