
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.
22 lines
476 B
Python
22 lines
476 B
Python
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
class TimeEntryBase(BaseModel):
|
|
chore_assignment_id: int
|
|
start_time: datetime
|
|
end_time: Optional[datetime] = None
|
|
duration_seconds: Optional[int] = None
|
|
|
|
class TimeEntryCreate(TimeEntryBase):
|
|
pass
|
|
|
|
class TimeEntryUpdate(BaseModel):
|
|
end_time: datetime
|
|
|
|
class TimeEntryPublic(TimeEntryBase):
|
|
id: int
|
|
user_id: int
|
|
|
|
class Config:
|
|
orm_mode = True |