# Generated by Django 2.2.6 on 2019-11-28 22:31

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Pet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('phone', models.CharField(max_length=11, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('active', models.BooleanField(default=True)),
                ('photo', models.ImageField(blank=True, null=True, upload_to='pet')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pets', to='core.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Vaccine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.TextField()),
            ],
            options={
                'verbose_name': 'Vaccine',
                'verbose_name_plural': 'Vaccines',
            },
        ),
        migrations.CreateModel(
            name='PetVaccine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_vaccine', models.DateTimeField(auto_now_add=True)),
                ('pet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Pet')),
                ('vaccine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Vaccine')),
            ],
            options={
                'verbose_name': 'PetVaccine',
                'verbose_name_plural': 'PetVaccines',
            },
        ),
        migrations.AddField(
            model_name='pet',
            name='vaccines',
            field=models.ManyToManyField(related_name='pets', through='core.PetVaccine', to='core.Vaccine'),
        ),
    ]
