add other device
This commit is contained in:
@@ -16,15 +16,18 @@ class MapItem(Base):
|
||||
- switch: Network switch
|
||||
- indoor_ap: Indoor access point
|
||||
- outdoor_ap: Outdoor access point
|
||||
- other_device: Other device (1 ethernet port)
|
||||
- info: Information marker
|
||||
|
||||
Geometry:
|
||||
- Point for devices (switches, APs)
|
||||
- Point for devices (switches, APs, other devices, info markers)
|
||||
- LineString for cables and wireless mesh
|
||||
|
||||
Properties (JSONB):
|
||||
- For cables: cable_type, name, notes, length_meters, start_device_id, end_device_id
|
||||
- For devices: name, notes, port_count, connections (array of {cable_id, port_number})
|
||||
- For wireless_mesh: name, notes, start_ap_id, end_ap_id
|
||||
- For info markers: name, notes, image (optional)
|
||||
"""
|
||||
|
||||
__tablename__ = "map_items"
|
||||
|
||||
@@ -6,7 +6,7 @@ from uuid import UUID
|
||||
|
||||
class MapItemBase(BaseModel):
|
||||
"""Base map item schema with common attributes."""
|
||||
type: str = Field(..., description="Item type: cable, wireless_mesh, switch, indoor_ap, outdoor_ap")
|
||||
type: str = Field(..., description="Item type: cable, wireless_mesh, switch, indoor_ap, outdoor_ap, other_device, info")
|
||||
geometry: Dict[str, Any] = Field(..., description="GeoJSON geometry (Point or LineString)")
|
||||
properties: Dict[str, Any] = Field(default_factory=dict, description="Item-specific properties")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user