id: no-inline-pgenum-literals
language: ts
severity: error
message: Inline pgEnum array literal in schema
note: '{"severity":"high","category":"convention","resolution":"Move enum values into a defineEnum registry under src/lib/enums and import the exported values tuple."}'
files:
  - '**/src/server/db/schema/**/*.ts'
ignores:
  - '**/src/server/db/schema/affiliate.ts'
  - '**/src/server/db/schema/commerce.ts'
  - '**/src/server/db/schema/referrals.ts'
rule:
  any:
    - pattern: pgEnum($NAME, [$VALUE])
    - pattern: pgEnum($NAME, [$VALUE, $$$VALUES])
