# Generated by Django 5.1.7 on 2025-04-05 19:08

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('library', '0031_alter_qivipquestion_quiz_id'),
    ]

    operations = [
        migrations.AddField(
            model_name='qivipquiz',
            name='average_rating',
            field=models.FloatField(default=3.0),
        ),
        migrations.AddField(
            model_name='qivipquiz',
            name='rating_count',
            field=models.IntegerField(default=0),
        ),
        migrations.CreateModel(
            name='QuizRating',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('participant_id', models.CharField(max_length=200)),
                ('rating', models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5')])),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('quiz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ratings', to='library.qivipquiz')),
            ],
            options={
                'unique_together': {('quiz', 'participant_id')},
            },
        ),
    ]
