Port core API routes for sites and devices

This commit is contained in:
2025-10-22 23:43:16 -06:00
parent d0fa6929b2
commit 4bc529aaf4
22 changed files with 2092 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
"""Domain objects for saved device list views."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Dict, List
__all__ = ["DeviceListView"]
@dataclass(frozen=True, slots=True)
class DeviceListView:
id: int
name: str
columns: List[str]
filters: Dict[str, object]
created_at: int
updated_at: int
def to_dict(self) -> Dict[str, object]:
return {
"id": self.id,
"name": self.name,
"columns": self.columns,
"filters": self.filters,
"created_at": self.created_at,
"updated_at": self.updated_at,
}