start project
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""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)
|
||||
Reference in New Issue
Block a user