# Generated by Django 3.1.5 on 2021-02-03 14:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Breed',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=30)),
                ('description', models.CharField(blank=True, max_length=500)),
                ('image', models.ImageField(default='breeds/default.png', upload_to='breeds')),
            ],
        ),
        migrations.CreateModel(
            name='Cattery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('registrationDate', models.DateTimeField(default=django.utils.timezone.now)),
                ('membershipFee', models.IntegerField()),
                ('country', models.CharField(blank=True, max_length=20)),
                ('city', models.CharField(blank=True, max_length=30, null=True)),
                ('status', models.IntegerField(choices=[(0, 'Active'), (1, 'Verifying'), (2, 'Deleted')], default=1)),
                ('site', models.CharField(blank=True, max_length=100, null=True)),
                ('deletionDate', models.DateTimeField(blank=True, null=True)),
                ('breeds', models.ManyToManyField(blank=True, null=True, to='catteries.Breed')),
                ('leader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ownedCatteries', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserInCattery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(0, 'Active'), (1, 'Verifying'), (2, 'Deleted')], default=1)),
                ('isAdmin', models.BooleanField(default=False)),
                ('deletionDate', models.DateTimeField(blank=True, null=True)),
                ('isFeePaid', models.BooleanField(default=False)),
                ('cattery', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='catteries.cattery')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='catteries', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attachment', models.ImageField(upload_to='cattery_attachments')),
                ('cattery', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='catteries.cattery')),
            ],
        ),
        migrations.CreateModel(
            name='ApplicationToCattery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(0, 'InProgress'), (1, 'Rejected'), (2, 'Accepted')], default=0)),
                ('message', models.CharField(blank=True, max_length=500, null=True)),
                ('creationDate', models.DateTimeField(default=django.utils.timezone.now)),
                ('cattery', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='catteries.cattery')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Announcements',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo', models.ImageField(upload_to='cattery_attachments')),
                ('status', models.IntegerField(choices=[(0, 'Active'), (1, 'Deleted')], default=0)),
                ('text', models.CharField(blank=True, max_length=500, null=True)),
                ('creationDate', models.DateTimeField(default=django.utils.timezone.now)),
                ('showUntil', models.DateTimeField()),
                ('deletionDate', models.DateTimeField(blank=True, null=True)),
                ('cattery', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='announcements', to='catteries.cattery')),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='createdAnnouncements', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
