CREATE TABLE IF NOT EXISTS company_settings (
    id INT AUTO_INCREMENT PRIMARY KEY,
    company_name VARCHAR(255) NOT NULL DEFAULT 'My Restaurant',
    address TEXT,
    phone VARCHAR(50),
    email VARCHAR(255),
    vat_rate DECIMAL(5, 2) DEFAULT 0.00,
    currency_symbol VARCHAR(10) DEFAULT '$',
    currency_decimals INT DEFAULT 2,
    timezone VARCHAR(100) DEFAULT 'UTC',
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

INSERT INTO company_settings (company_name, address, phone, vat_rate, currency_symbol, currency_decimals)
SELECT 'My Restaurant', '123 Food Street', '555-0199', 10.00, '$', 2
WHERE NOT EXISTS (SELECT 1 FROM company_settings);
