
CREATE TABLE roles (
 id INT AUTO_INCREMENT PRIMARY KEY,
 name VARCHAR(100) NOT NULL
);

CREATE TABLE users (
 id INT AUTO_INCREMENT PRIMARY KEY,
 name VARCHAR(255),
 email VARCHAR(255) UNIQUE,
 password VARCHAR(255),
 role_id INT,
 status TINYINT DEFAULT 1,
 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE settings (
 id INT AUTO_INCREMENT PRIMARY KEY,
 setting_key VARCHAR(255),
 setting_value TEXT
);

CREATE TABLE activity_logs (
 id INT AUTO_INCREMENT PRIMARY KEY,
 user_id INT,
 action TEXT,
 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE cron_tasks (
 id INT AUTO_INCREMENT PRIMARY KEY,
 name VARCHAR(255),
 schedule VARCHAR(255),
 status VARCHAR(50)
);
