CREATE TABLE brands (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    code VARCHAR(20),
    invoice_prefix VARCHAR(10),
    vat_enabled BOOLEAN DEFAULT 0,
    vat_rate DECIMAL(5,4) DEFAULT 0.20,
    stripe_secret_key VARCHAR(255),
    gocardless_access_token VARCHAR(255),
    bank_name VARCHAR(100),
    bank_sort_code VARCHAR(20),
    bank_account_number VARCHAR(20),
    pdf_template VARCHAR(50)
);

CREATE TABLE invoices (
    id INT AUTO_INCREMENT PRIMARY KEY,
    brand_id INT,
    invoice_number VARCHAR(50),
    customer_id INT,
    vat_enabled BOOLEAN,
    due_date DATE,
    status VARCHAR(50),
    created_at DATETIME
);
