diff --git a/pretalx_musicrate/migrations/0009_score.py b/pretalx_musicrate/migrations/0009_score.py new file mode 100644 index 0000000..3bc48f5 --- /dev/null +++ b/pretalx_musicrate/migrations/0009_score.py @@ -0,0 +1,34 @@ +# Generated by Django 4.2.8 on 2024-02-14 00:36 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("submission", "0072_alter_reviewscore_label"), + ("pretalx_musicrate", "0008_assignee"), + ] + + operations = [ + migrations.CreateModel( + name="Score", + fields=[ + ( + "id", + models.AutoField( + auto_created=True, primary_key=True, serialize=False + ), + ), + ("value", models.FloatField()), + ( + "submission", + models.OneToOneField( + on_delete=django.db.models.deletion.CASCADE, + to="submission.submission", + ), + ), + ], + ), + ] diff --git a/pretalx_musicrate/models.py b/pretalx_musicrate/models.py index 1b12af1..d71d0b4 100644 --- a/pretalx_musicrate/models.py +++ b/pretalx_musicrate/models.py @@ -112,3 +112,8 @@ class Assignee(models.Model): user = models.ForeignKey( "person.User", on_delete=models.CASCADE, related_name="assigned_submissions" ) + + +class Score(models.Model): + submission = models.OneToOneField("submission.Submission", on_delete=models.CASCADE) + value = models.FloatField() diff --git a/pretalx_musicrate/templates/pretalx_musicrate/enhanced_list.html b/pretalx_musicrate/templates/pretalx_musicrate/enhanced_list.html index fe20d1f..75bb6ce 100644 --- a/pretalx_musicrate/templates/pretalx_musicrate/enhanced_list.html +++ b/pretalx_musicrate/templates/pretalx_musicrate/enhanced_list.html @@ -65,8 +65,8 @@