# Generated by Django 3.2.6 on 2021-08-18 11:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='FixTherapy',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TherapyType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='WithMealTherapy',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('breakfast', models.BooleanField(default=False)),
                ('lunch', models.BooleanField(default=False)),
                ('dinner', models.BooleanField(default=False)),
                ('margin_time', models.DurationField(default=0)),
                ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='therapy_withmealtherapy', to='diabetes_therapy.therapytype')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MixTherapy',
            fields=[
                ('withmealtherapy_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='diabetes_therapy.withmealtherapy')),
            ],
            options={
                'abstract': False,
            },
            bases=('diabetes_therapy.withmealtherapy',),
        ),
        migrations.CreateModel(
            name='FixTherapyTime',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.TimeField()),
                ('fix_therapy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='times', to='diabetes_therapy.fixtherapy')),
            ],
        ),
        migrations.AddField(
            model_name='fixtherapy',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='therapy_fixtherapy', to='diabetes_therapy.therapytype'),
        ),
    ]
