feat: 保存 SQL 题时自动生成 sql_display 展示数据

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 01:15:58 -06:00
parent 90531720bb
commit 06642b8131
4 changed files with 57 additions and 3 deletions

View File

@@ -89,6 +89,9 @@ class Problem(models.Model):
# SQL 题配置: {"mode": "query"|"modify", "order_sensitive": bool},非 SQL 题为 None
sql_config = models.JSONField(null=True, blank=True, default=None)
# SQL 题展示数据保存题目时由测试点1+标准答案自动生成,见 judge/sql_runner.build_display非 SQL 题为 None
sql_display = models.JSONField(null=True, blank=True, default=None)
class Meta:
db_table = "problem"
constraints = [