# Generated by Django 2.2.10 on 2020-04-28 16:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('login_app', '0002_auto_20200426_2215'),
        ('manager_app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='carrier',
            name='address',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='carrier_address', to='manager_app.Address'),
        ),
        migrations.AddField(
            model_name='contract',
            name='carrier',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='contracts', to='manager_app.Carrier'),
        ),
        migrations.AddField(
            model_name='contract',
            name='customer',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='manager_app.Customer'),
        ),
        migrations.AddField(
            model_name='customer',
            name='address',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customer_address', to='manager_app.Address'),
        ),
        migrations.AddField(
            model_name='customer',
            name='completed_contracts',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='customer',
            name='open_contracts',
            field=models.IntegerField(default=0),
        ),
        migrations.DeleteModel(
            name='Commment',
        ),
        migrations.AddField(
            model_name='comment',
            name='carrier',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='manager_app.Carrier'),
        ),
        migrations.AddField(
            model_name='comment',
            name='contract',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='manager_app.Contract'),
        ),
        migrations.AddField(
            model_name='comment',
            name='customer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='manager_app.Customer'),
        ),
        migrations.AddField(
            model_name='comment',
            name='route',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='manager_app.Route'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='comments', to='login_app.User'),
        ),
    ]
