feat(14-01): add sector CRUD backend with migration, model, service, and router
- Create sectors table migration (034) with RLS and devices.sector_id FK - Add Sector ORM model with site_id and tenant_id foreign keys - Add SectorCreate/Update/Response/ListResponse Pydantic schemas - Implement sector_service with CRUD and device assignment functions - Add sectors router with GET/POST/PUT/DELETE and device sector assignment - Register sectors router in main.py - Add sector_id and sector_name to Device model and DeviceResponse Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ from app.models.alert import AlertRule, NotificationChannel, AlertRuleChannel, A
|
||||
from app.models.firmware import FirmwareVersion, FirmwareUpgradeJob
|
||||
from app.models.config_template import ConfigTemplate, ConfigTemplateTag, TemplatePushJob
|
||||
from app.models.site import Site
|
||||
from app.models.sector import Sector
|
||||
from app.models.audit_log import AuditLog
|
||||
from app.models.maintenance_window import MaintenanceWindow
|
||||
from app.models.api_key import ApiKey
|
||||
@@ -32,6 +33,7 @@ __all__ = [
|
||||
"DeviceTagAssignment",
|
||||
"DeviceStatus",
|
||||
"Site",
|
||||
"Sector",
|
||||
"AlertRule",
|
||||
"NotificationChannel",
|
||||
"AlertRuleChannel",
|
||||
|
||||
Reference in New Issue
Block a user