# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-03-26 17:52
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('topics', '0008_auto_20201017_0913'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='H5P',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='topics.Resource')),
                ('url', models.CharField(max_length=250, verbose_name='URL')),
                ('data_ini', models.DateTimeField(verbose_name='Init Date')),
                ('data_end', models.DateTimeField(verbose_name='End Date')),
            ],
            options={
                'verbose_name': 'H5P',
                'verbose_name_plural': 'H5Ps',
            },
            bases=('topics.resource',),
        ),
        migrations.CreateModel(
            name='UserScores',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('max_score', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Max Score')),
                ('score', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Student Score')),
                ('interaction_date', models.DateTimeField(auto_now_add=True, verbose_name='Interaction Date')),
                ('h5p_component', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_score', to='h5p.H5P', verbose_name='H5P component')),
                ('student', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='h5p_student', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
        ),
    ]
