Commit Graph

9 Commits

Author SHA1 Message Date
417e7c34bc Fix submission list API performance: N+1 queries, missing indexes, and in-memory pagination
- Add select_related("user") in update_score() to eliminate N+1 on rating.user.role
- Return QuerySet directly from list_submissions so @paginate works at DB level
- Defer html/css/js fields in list queries to reduce data transfer
- Add db_index on flag field for filtered queries
- Add select_related("task", "user") to get_submission endpoint
- Replace manual list() serialization with resolve_* methods on SubmissionOut

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:26:32 +08:00
aa344b92e5 Add flag field to Submission model with FlagChoices enum
Adds red/blue/green/yellow flag options for marking submissions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:23:05 +08:00
6998d694bb add chat 2026-03-04 20:05:33 +08:00
c81b5b1a55 添加 rating 2025-03-19 09:15:14 +08:00
06ba298b3c fix 2025-03-18 19:33:42 +08:00
8cdc23d499 fix 2025-03-18 19:29:59 +08:00
55ef262ae8 添加提交 2025-03-18 19:16:32 +08:00
0d07daa655 add verbose name 2025-03-10 20:23:36 +08:00
c95dafe14d 重构数据 2025-03-07 00:06:56 +08:00