diff --git a/README.md b/README.md index 46f9967..800dc14 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,6 @@ src/ │ ├── database.py # SQLAlchemy models and DB initialization │ ├── dependencies.py # FastAPI dependency injection (auth guards) │ └── schemas.py # Pydantic request/response schemas -├── models/ # Thin wrappers re-exporting DB models ├── routers/ │ ├── auth.py # POST /api/auth/admin, POST /api/auth/keypass │ ├── gates.py # User-facing gate list and open endpoints diff --git a/src/core/database.py b/src/core/database.py index 51871d4..f2ca88c 100644 --- a/src/core/database.py +++ b/src/core/database.py @@ -31,6 +31,7 @@ class GateDB(Base): gate_type: Mapped[str] = mapped_column(String, nullable=False) # 'car' | 'pedestrian' avconnect_macro_id: Mapped[str] = mapped_column(String, nullable=False) # AVConnect macro ID status: Mapped[str] = mapped_column(String, default="enabled") # 'enabled' | 'disabled' + group_name: Mapped[Optional[str]] = mapped_column(String, nullable=True) # display group label class ApiCredential(Base): diff --git a/src/core/schemas.py b/src/core/schemas.py index 7ca5bec..7e9d799 100644 --- a/src/core/schemas.py +++ b/src/core/schemas.py @@ -72,6 +72,7 @@ class GateResponse(BaseModel): gate_type: str avconnect_macro_id: str status: str + group_name: Optional[str] = None class GateCreate(BaseModel): @@ -79,6 +80,7 @@ class GateCreate(BaseModel): gate_type: str # 'car' | 'pedestrian' avconnect_macro_id: str status: str = "enabled" + group_name: Optional[str] = None # ── AVConnect Credentials ───────────────────────────────────────────────────── diff --git a/src/static/admin.html b/src/static/admin.html index ceb28cd..05799fd 100644 --- a/src/static/admin.html +++ b/src/static/admin.html @@ -158,6 +158,7 @@ ID Name + Group Type AVConnect Macro ID Status @@ -323,6 +324,11 @@ +
+ + + +