CREATE TABLE IF NOT EXISTS cash_sessions (
    id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    operator_id BIGINT UNSIGNED NULL,
    opened_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
    closed_at TIMESTAMP NULL,
    initial_amount DECIMAL(18,2) NOT NULL DEFAULT 0,
    closing_amount DECIMAL(18,2) NULL,
    status VARCHAR(20) NOT NULL DEFAULT 'aberta',
    notes VARCHAR(500) NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);