# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-14 20:05
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('aluno', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Curso',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50)),
                ('moodle_id', models.IntegerField()),
                ('descricao', models.CharField(blank=True, max_length=100)),
            ],
            options={
                'ordering': ['-id'],
                'db_table': 'curso',
            },
        ),
        migrations.CreateModel(
            name='Matricula',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nota', models.IntegerField(default=0)),
                ('aluno_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aluno.Aluno')),
                ('curso_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='curso.Curso')),
            ],
            options={
                'ordering': ['-id'],
                'db_table': 'matricula',
            },
        ),
        migrations.AddField(
            model_name='curso',
            name='matriculas',
            field=models.ManyToManyField(through='curso.Matricula', to='aluno.Aluno'),
        ),
    ]
