feat: add feedback operations report

This commit is contained in:
Codex
2026-06-30 15:38:47 +08:00
parent 87f4cf9c4e
commit ddad2ac04d
17 changed files with 593 additions and 44 deletions

View File

@@ -0,0 +1,10 @@
create index if not exists idx_reports_tenant_created
on public.reports(tenant_id, created_at desc);
create index if not exists idx_reports_tenant_handled
on public.reports(tenant_id, handled_at desc, handled_by)
where handled_at is not null;
create index if not exists idx_score_events_tenant_feedback_reward
on public.user_score_events(tenant_id, created_at desc, source_id)
where event_type = 'feedback_reward' and source_type = 'reports';