chore(quality): apply ruff autofixes and formatting (29 fixes, 41 files reformatted)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
"""Pydantic schemas for Equipment (inventory catalog)."""
|
||||
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class EquipmentCreateRequest(BaseModel):
|
||||
"""Request body for creating new equipment."""
|
||||
|
||||
name: str = Field(..., max_length=255)
|
||||
category: str | None = Field(None, max_length=100)
|
||||
brand: str | None = Field(None, max_length=255)
|
||||
@@ -26,6 +26,7 @@ class EquipmentCreateRequest(BaseModel):
|
||||
|
||||
class EquipmentUpdateRequest(BaseModel):
|
||||
"""Request body for updating existing equipment."""
|
||||
|
||||
name: str | None = Field(None, max_length=255)
|
||||
category: str | None = Field(None, max_length=100)
|
||||
brand: str | None = Field(None, max_length=255)
|
||||
@@ -46,6 +47,7 @@ class EquipmentUpdateRequest(BaseModel):
|
||||
|
||||
class LocationRef(BaseModel):
|
||||
"""Minimal stock location reference."""
|
||||
|
||||
id: str
|
||||
name: str
|
||||
|
||||
@@ -54,6 +56,7 @@ class LocationRef(BaseModel):
|
||||
|
||||
class SupplierRef(BaseModel):
|
||||
"""Minimal supplier (contact) reference."""
|
||||
|
||||
id: str
|
||||
name: str | None = None
|
||||
company_name: str | None = None
|
||||
@@ -63,6 +66,7 @@ class SupplierRef(BaseModel):
|
||||
|
||||
class EquipmentResponse(BaseModel):
|
||||
"""Public equipment representation."""
|
||||
|
||||
id: str
|
||||
account_id: str
|
||||
name: str
|
||||
@@ -89,6 +93,7 @@ class EquipmentResponse(BaseModel):
|
||||
|
||||
class EquipmentListResponse(BaseModel):
|
||||
"""Paginated list of equipment."""
|
||||
|
||||
items: list[EquipmentResponse]
|
||||
total: int
|
||||
page: int
|
||||
|
||||
Reference in New Issue
Block a user