-- Wave 8: Customer Categories
CREATE TABLE IF NOT EXISTS customer_categories (
  id TEXT PRIMARY KEY,
  name TEXT NOT NULL,
  name_en TEXT,
  discount_percent NUMERIC(5, 2) DEFAULT 0,
  description TEXT,
  raw JSONB NOT NULL DEFAULT '{}'::jsonb,
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS idx_customer_categories_name ON customer_categories (name);
