Files
Kavosh/app/models/blocklist_suggestion.py
2026-08-07 21:17:17 +03:30

19 lines
707 B
Python

"""blocklist_suggestions table (Chapter 06). `id` isn't in Ch06's column
list — added because `ip` alone can't be the key (the same IP may be
re-flagged with a different reason later)."""
from __future__ import annotations
from datetime import datetime
from app.extensions import db
class BlocklistSuggestion(db.Model):
__tablename__ = "blocklist_suggestions"
id: int = db.Column(db.Integer, primary_key=True)
ip: str = db.Column(db.String(45), nullable=False, index=True)
reason: str = db.Column(db.String(255), nullable=False)
created_at = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
exported: bool = db.Column(db.Boolean, nullable=False, default=False)