CREATE TABLE "crm_approval_matrices" (
  "id" text PRIMARY KEY NOT NULL,
  "organization_id" text NOT NULL,
  "entity_type" text NOT NULL,
  "workflow_id" text NOT NULL,
  "branch_id" text,
  "product_type" text,
  "min_amount" double precision,
  "max_amount" double precision,
  "currency" text,
  "priority" integer DEFAULT 100 NOT NULL,
  "is_default" boolean DEFAULT false NOT NULL,
  "is_active" boolean DEFAULT true NOT NULL,
  "description" text,
  "created_at" timestamp with time zone DEFAULT now() NOT NULL,
  "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
  "deleted_at" timestamp with time zone,
  "created_by" text NOT NULL,
  "updated_by" text NOT NULL
);
