FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring, source collection, LLM-based change analysis, enrichment, and account security (Turnstile, escalating lockout, email verification).
18 lines
623 B
Python
18 lines
623 B
Python
"""Manual unban requests from banned visitors - one per IP per 24h, enforced
|
|
in the service layer at insert time. Purely a queue for admin review; no
|
|
automated unban happens from this table."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from sqlalchemy import String, Text
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.db.base import Base, TimestampMixin, UUIDPrimaryKeyMixin
|
|
|
|
|
|
class UnbanRequest(Base, UUIDPrimaryKeyMixin, TimestampMixin):
|
|
__tablename__ = "unban_requests"
|
|
|
|
ip_address: Mapped[str] = mapped_column(String(45), index=True)
|
|
message: Mapped[str | None] = mapped_column(Text, nullable=True)
|