-- Create invoice_templates table
CREATE TABLE IF NOT EXISTS invoice_templates (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    file_path TEXT NOT NULL,
    tenant_id INTEGER DEFAULT NULL,
    isDeleted BOOLEAN DEFAULT FALSE,
    updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Seed default templates
INSERT INTO invoice_templates (name, file_path, tenant_id)
VALUES
  ('Basic', 'templates/invoices/basic.php', NULL),
  ('Detailed', 'templates/invoices/detailed.php', NULL),
  ('Modern', 'templates/invoices/modern.php', NULL),
  ('Notice of Certain Workplaces', 'templates/invoices/workplace_notice.php', NULL);
