# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-29 15:50
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('assignatures', '0001_initial'),
        ('alumnes', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Nota',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nota', models.FloatField()),
                ('alumne', models.ManyToManyField(blank=True, to='alumnes.Alumne')),
            ],
        ),
        migrations.CreateModel(
            name='Prova',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom', models.CharField(max_length=120)),
                ('curs', models.PositiveIntegerField()),
                ('nota_total', models.FloatField()),
                ('pes_total', models.FloatField()),
                ('data', models.DateField(default=django.utils.timezone.now)),
                ('assignatura', models.ManyToManyField(blank=True, to='assignatures.Assignatura')),
                ('notes', models.ManyToManyField(blank=True, related_name='prova_notes', to='proves.Nota')),
            ],
        ),
        migrations.AddField(
            model_name='nota',
            name='prova',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='proves.Prova'),
        ),
    ]
