MerkleTreeLabs / Max-Planck

Social Bot connected to QRL and ZND Blockchains
GNU Affero General Public License v3.0
1 stars 0 forks source link

Audit trail Table #61

Closed fr1t2 closed 1 month ago

fr1t2 commented 1 month ago

Add tables to track logs of user actions such as login attempts, failed logins, and critical changes (e.g., updating 2FA settings, wallet addresses, or sensitive account information).

Example:

CREATE TABLE user_actions (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT NOT NULL,
    action VARCHAR(255),
    action_details JSON,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);