This commit is contained in:
+26
-1
@@ -13,9 +13,34 @@ class Customer(Base):
|
||||
username: Mapped[str] = mapped_column(String(64), nullable=False)
|
||||
mac_address: Mapped[str] = mapped_column(String(17), nullable=False)
|
||||
status: Mapped[str] = mapped_column(String(10), nullable=False, default="new")
|
||||
created_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime, nullable=True, server_default=func.current_timestamp()
|
||||
)
|
||||
|
||||
|
||||
class RadadminClient(Base):
|
||||
"""Human-only client metadata (name/phone/alias), keyed by MAC. RADIUS ignores this."""
|
||||
|
||||
__tablename__ = "radadmin_clients"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
mac_address: Mapped[str] = mapped_column(String(17), nullable=False, unique=True)
|
||||
name: Mapped[str | None] = mapped_column(String(128), nullable=True)
|
||||
phone: Mapped[str | None] = mapped_column(String(32), nullable=True)
|
||||
device_alias: Mapped[str | None] = mapped_column(String(64), nullable=True)
|
||||
alias: Mapped[str | None] = mapped_column(String(64), nullable=True)
|
||||
created_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime, nullable=True, server_default=func.current_timestamp()
|
||||
)
|
||||
|
||||
|
||||
class RadadminDevice(Base):
|
||||
"""Human alias for a NAS/AP box, keyed by its AP MAC. RADIUS never reads this."""
|
||||
|
||||
__tablename__ = "radadmin_devices"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
mac_address: Mapped[str] = mapped_column(String(17), nullable=False, unique=True)
|
||||
alias: Mapped[str | None] = mapped_column(String(64), nullable=True)
|
||||
created_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime, nullable=True, server_default=func.current_timestamp()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user