CREATE DATABASE ruiru_gym;

USE ruiru_gym;

CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    full_name VARCHAR(100) NOT NULL,
    email VARCHAR(100) UNIQUE NOT NULL,
    phone VARCHAR(20),
    password VARCHAR(255) NOT NULL,
    role ENUM('admin', 'staff') NOT NULL,
    status ENUM('active', 'inactive') DEFAULT 'active',
    remember_token VARCHAR(255) NULL,
    remember_expiry DATETIME NULL,
    reset_token VARCHAR(255) NULL,
    reset_expiry DATETIME NULL,
    last_login DATETIME NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);