# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-14 00:02
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('address', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AnimalInventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('animal_count', models.IntegerField(null=True)),
                ('animal_name', models.CharField(max_length=1024)),
                ('animal_group_name', models.CharField(max_length=2048)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='InspectionReport',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('inspection_site_name', models.CharField(max_length=1024)),
                ('inspection_date', models.DateField(null=True)),
                ('inspection_type', models.CharField(max_length=256)),
                ('prepared_by', models.CharField(max_length=2048)),
                ('prepared_by_title', models.CharField(max_length=512)),
                ('inspector_number', models.BigIntegerField(null=True)),
                ('text', models.TextField()),
                ('img_link', models.URLField(max_length=1024)),
                ('img_file', models.ImageField(upload_to='inspection_reports/')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Licensee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('customer_id', models.BigIntegerField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='LicenseeCert',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('cert_id', models.BigIntegerField()),
                ('certificate', models.CharField(max_length=9)),
                ('certificate_status', models.NullBooleanField()),
                ('status_date', models.DateTimeField(null=True)),
                ('legal_name', models.CharField(max_length=1024)),
                ('dba', models.CharField(max_length=1024)),
                ('address', address.models.AddressField(null=True, on_delete=django.db.models.deletion.CASCADE, to='address.Address')),
                ('licensee', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cert', to='scrape.Licensee')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='NonCompliance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('cfrs_id', models.BigIntegerField(null=True)),
                ('regulation_section', models.CharField(max_length=128)),
                ('description', models.CharField(max_length=2048)),
                ('direct_non_compliance', models.NullBooleanField()),
                ('repeat_non_compliance', models.NullBooleanField()),
                ('inspection_report', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='scrape.InspectionReport')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Scrape',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('error', models.TextField()),
                ('licensee', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='scrape.Licensee')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='inspectionreport',
            name='licensee_cert',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='scrape.LicenseeCert'),
        ),
        migrations.AddField(
            model_name='animalinventory',
            name='inspection_report',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='scrape.InspectionReport'),
        ),
    ]
