
Some checks failed
Deploy to Production, build images and push to Gitea Registry / build_and_push (pull_request) Failing after 1m24s
This commit adds new guidelines for FastAPI and Vue.js development, emphasizing best practices for component structure, API performance, and data handling. It also introduces caching mechanisms using Redis for improved performance and updates the API structure to streamline authentication and user management. Additionally, new endpoints for categories and time entries are implemented, enhancing the overall functionality of the application.
32 lines
854 B
Python
32 lines
854 B
Python
from pydantic import BaseModel, ConfigDict
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
from decimal import Decimal
|
|
|
|
class ItemPublic(BaseModel):
|
|
id: int
|
|
list_id: int
|
|
name: str
|
|
quantity: Optional[str] = None
|
|
is_complete: bool
|
|
price: Optional[Decimal] = None
|
|
added_by_id: int
|
|
completed_by_id: Optional[int] = None
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
version: int
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
class ItemCreate(BaseModel):
|
|
name: str
|
|
quantity: Optional[str] = None
|
|
category_id: Optional[int] = None
|
|
|
|
class ItemUpdate(BaseModel):
|
|
name: Optional[str] = None
|
|
quantity: Optional[str] = None
|
|
is_complete: Optional[bool] = None
|
|
price: Optional[Decimal] = None
|
|
position: Optional[int] = None
|
|
category_id: Optional[int] = None
|
|
version: int |