06/03 Optimize app

This commit is contained in:
2026-06-03 16:22:02 -04:00
parent ec1c0fc7c1
commit eb85e70793
16 changed files with 406 additions and 5 deletions
+15
View File
@@ -0,0 +1,15 @@
from app.extensions import db
from datetime import datetime
class AuditLog(db.Model):
__tablename__ = 'audit_logs'
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, default=datetime.utcnow, index=True)
action = db.Column(db.String(64), nullable=False, index=True)
description = db.Column(db.String(255), nullable=True)
ip_address = db.Column(db.String(45), nullable=True) # IPv4 or IPv6
def __repr__(self):
return f'<AuditLog {self.action} @ {self.timestamp}>'