Phase 6 Complete by Claude Code
This commit is contained in:
@@ -1 +1,42 @@
|
||||
# TODO: Equipment Pydantic schemas
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
# --- Request / Response schemas ---
|
||||
|
||||
class NoteCreate(BaseModel):
|
||||
"""Create a new equipment note/log entry."""
|
||||
title: str
|
||||
content: str
|
||||
category: str = "general" # general, maintenance, installation, issue, other
|
||||
device_id: Optional[str] = None # Firestore doc ID of linked device
|
||||
user_id: Optional[str] = None # Firestore doc ID of linked user
|
||||
|
||||
|
||||
class NoteUpdate(BaseModel):
|
||||
"""Update an existing note. Only provided fields are updated."""
|
||||
title: Optional[str] = None
|
||||
content: Optional[str] = None
|
||||
category: Optional[str] = None
|
||||
device_id: Optional[str] = None
|
||||
user_id: Optional[str] = None
|
||||
|
||||
|
||||
class NoteInDB(BaseModel):
|
||||
"""Note as stored in Firestore."""
|
||||
id: str
|
||||
title: str = ""
|
||||
content: str = ""
|
||||
category: str = "general"
|
||||
device_id: str = ""
|
||||
user_id: str = ""
|
||||
device_name: str = ""
|
||||
user_name: str = ""
|
||||
created_by: str = ""
|
||||
created_at: str = ""
|
||||
updated_at: str = ""
|
||||
|
||||
|
||||
class NoteListResponse(BaseModel):
|
||||
notes: List[NoteInDB]
|
||||
total: int
|
||||
|
||||
Reference in New Issue
Block a user