CREATE INDEX idx_users_tenant_role_status ON users (tenant_id, role, status);
CREATE INDEX idx_clients_tenant_created ON clients (tenant_id, created_at);
CREATE INDEX idx_clients_tenant_name ON clients (tenant_id, name);
CREATE INDEX idx_jobs_tenant_status_schedule ON jobs (tenant_id, status, scheduled_date, scheduled_time);
CREATE INDEX idx_jobs_tenant_schedule ON jobs (tenant_id, scheduled_date, scheduled_time);
CREATE INDEX idx_jobs_tenant_client ON jobs (tenant_id, client_id);
CREATE INDEX idx_quotes_tenant_status_created ON quotes (tenant_id, status, created_at);
CREATE INDEX idx_quotes_tenant_number ON quotes (tenant_id, quote_number);
CREATE INDEX idx_quotes_tenant_client_created ON quotes (tenant_id, client_id, created_at);
CREATE INDEX idx_quote_items_quote ON quote_items (quote_id);
CREATE INDEX idx_invoices_tenant_status_due ON invoices (tenant_id, status, due_date);
CREATE INDEX idx_invoices_tenant_created ON invoices (tenant_id, created_at);
CREATE INDEX idx_invoices_tenant_number ON invoices (tenant_id, invoice_number);
CREATE INDEX idx_invoices_tenant_client_created ON invoices (tenant_id, client_id, created_at);
CREATE INDEX idx_invoice_items_invoice ON invoice_items (invoice_id);
