# Generated by Django 2.2.9 on 2020-02-17 20:44

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('kinect', '0005_auto_20191017_1024'),
    ]

    operations = [
        migrations.CreateModel(
            name='Atleta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100)),
                ('telefone', models.CharField(max_length=20)),
                ('cpf', models.CharField(max_length=20)),
                ('dt_nascimento', models.DateField()),
                ('historico', models.TextField()),
                ('genero', models.CharField(default='M', max_length=1)),
                ('user', models.OneToOneField(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='atleta', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Treinador',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(default='', max_length=100)),
                ('descricao', models.CharField(max_length=30)),
                ('telefone', models.CharField(max_length=20)),
                ('dt_nascimento', models.DateField()),
                ('user', models.OneToOneField(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='treinador', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Treino',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('treino_descricao', models.TextField()),
                ('avaliacao', models.TextField()),
                ('atleta', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='treinos', to='kinect.Atleta')),
                ('treinador', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='treinos', to='kinect.Treinador')),
            ],
        ),
        migrations.RemoveField(
            model_name='fisioterapeuta',
            name='user',
        ),
        migrations.RemoveField(
            model_name='paciente',
            name='user',
        ),
        migrations.RemoveField(
            model_name='tratamento',
            name='fisioterapeuta',
        ),
        migrations.RemoveField(
            model_name='tratamento',
            name='paciente',
        ),
        migrations.RemoveField(
            model_name='sessao',
            name='exercicio',
        ),
        migrations.RemoveField(
            model_name='sessao',
            name='tratamento',
        ),
        migrations.DeleteModel(
            name='Exercicio',
        ),
        migrations.DeleteModel(
            name='Fisioterapeuta',
        ),
        migrations.DeleteModel(
            name='Paciente',
        ),
        migrations.DeleteModel(
            name='Tratamento',
        ),
        migrations.AddField(
            model_name='sessao',
            name='atleta',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.DO_NOTHING, related_name='sessoes', to='kinect.Atleta'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='sessao',
            name='treino',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.DO_NOTHING, related_name='sessoes', to='kinect.Treino'),
            preserve_default=False,
        ),
    ]
