CREATE TABLE IF NOT EXISTS appointments (
    id INT AUTO_INCREMENT PRIMARY KEY,
    fullname VARCHAR(150) NOT NULL,
    mobile VARCHAR(20) NOT NULL,
    national_id VARCHAR(20) NOT NULL,
    service VARCHAR(150) NOT NULL,
    insurance VARCHAR(150) DEFAULT NULL,
    note TEXT NULL,
    appointment_date_jalali VARCHAR(10) NOT NULL, -- 1404-09-14
    appointment_time VARCHAR(8) NOT NULL,         -- 12:30
    status ENUM('pending','confirmed','done','cancelled','no_show') NOT NULL DEFAULT 'pending',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
