# Generated by Django 2.2.4 on 2019-09-22 06:50

import datetime
import django.core.validators
from django.db import migrations, models
from django.utils.timezone import utc
import re


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='DealerFarmerRelation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dealer_id', models.IntegerField()),
                ('farmer_id', models.IntegerField()),
                ('close_relation', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='DealerProducts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dealer_id', models.IntegerField()),
                ('product_id', models.IntegerField()),
                ('quantity', models.IntegerField()),
                ('date', models.DateField(default=datetime.datetime(2019, 9, 22, 6, 49, 33, 384458, tzinfo=utc))),
            ],
        ),
        migrations.CreateModel(
            name='Escalation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fo_id', models.IntegerField()),
                ('farmer_id', models.IntegerField()),
                ('tmo_call_required', models.BooleanField(default=True)),
                ('date', models.DateField(default=datetime.datetime(2019, 9, 22, 6, 49, 33, 382749, tzinfo=utc))),
            ],
        ),
        migrations.CreateModel(
            name='FarmerInterests',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('farmer_id', models.IntegerField()),
                ('plant_id', models.IntegerField()),
                ('product_id', models.IntegerField()),
                ('interested', models.BooleanField()),
                ('quantity', models.IntegerField()),
                ('date', models.DateField(default=datetime.datetime(2019, 9, 22, 6, 49, 33, 384111, tzinfo=utc))),
            ],
        ),
        migrations.CreateModel(
            name='FarmerPlant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('plant_id', models.IntegerField()),
                ('farmer_id', models.IntegerField()),
                ('plant_period', models.DateField()),
                ('major', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Plant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('species', models.CharField(max_length=128)),
                ('season_in', models.IntegerField()),
                ('season_end', models.IntegerField()),
                ('season', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('plant_id', models.IntegerField()),
                ('company_id', models.IntegerField()),
                ('price', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ProspectFarmer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('farmer_id', models.IntegerField()),
                ('date', models.DateField(default=datetime.datetime(2019, 9, 22, 6, 49, 33, 382428, tzinfo=utc))),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('farmer_id', models.IntegerField()),
                ('dealer_id', models.IntegerField()),
                ('plant_id', models.IntegerField()),
                ('product_id', models.IntegerField()),
                ('date', models.DateField(default=datetime.datetime(2019, 9, 22, 6, 49, 33, 383743, tzinfo=utc))),
                ('price', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Visit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer_id', models.CharField(max_length=128)),
                ('fo_id', models.CharField(max_length=128)),
                ('done_or_appointment', models.BooleanField(default=False)),
                ('date', models.DateField(default=datetime.datetime(2019, 9, 22, 6, 49, 33, 381189, tzinfo=utc))),
                ('check_in_time', models.IntegerField()),
                ('check_out_time', models.IntegerField()),
            ],
        ),
        migrations.RenameField(
            model_name='farmer',
            old_name='season',
            new_name='birth_date',
        ),
        migrations.RenameField(
            model_name='farmer',
            old_name='product',
            new_name='dependents',
        ),
        migrations.RemoveField(
            model_name='farmer',
            name='dealer',
        ),
        migrations.RemoveField(
            model_name='fieldofficer',
            name='farmers',
        ),
        migrations.AddField(
            model_name='farmer',
            name='land_size',
            field=models.IntegerField(default=1),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='farmer',
            name='leased_land',
            field=models.BooleanField(default=1),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='farmer',
            name='phone',
            field=models.IntegerField(default=1),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='farmer',
            name='previous_hs_client',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='farmer',
            name='state_id_number',
            field=models.CharField(default=1, max_length=128),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='farmer',
            name='state_id_picture',
            field=models.FilePathField(default=1),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='fieldofficer',
            name='farmer_ids',
            field=models.CharField(default=1, max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')]),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='farmer',
            name='name',
            field=models.CharField(max_length=128),
        ),
    ]
