# Generated by Django 3.1 on 2021-09-13 11:06

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='HistoricalFirmDetails',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('firmname', models.CharField(blank=True, db_index=True, max_length=100, null=True)),
                ('nnid', models.CharField(blank=True, db_index=True, max_length=25, null=True)),
                ('email', models.EmailField(blank=True, db_index=True, max_length=50, null=True)),
                ('website', models.CharField(blank=True, db_index=True, max_length=50, null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('city', models.CharField(blank=True, max_length=50, null=True)),
                ('country', models.CharField(blank=True, max_length=50, null=True)),
                ('zipcode', models.CharField(blank=True, max_length=10, null=True)),
                ('officephone', models.BigIntegerField(blank=True, db_index=True, null=True)),
                ('mobile', models.BigIntegerField(blank=True, db_index=True, null=True)),
                ('est_year', models.IntegerField(blank=True, null=True)),
                ('status', models.CharField(choices=[('0', 'Invitation Send'), ('1', 'Approved'), ('2', 'Pending Approval'), ('3', 'Pendind Review'), ('4', 'Rejected'), ('5', 'Terminated')], default='2', max_length=50, null=True)),
                ('register_on', models.DateTimeField(blank=True, editable=False, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical firm details',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='FirmsList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firmname', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FirmDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firmname', models.CharField(blank=True, max_length=100, null=True, unique=True)),
                ('nnid', models.CharField(blank=True, max_length=25, null=True, unique=True)),
                ('email', models.EmailField(blank=True, max_length=50, null=True, unique=True)),
                ('website', models.CharField(blank=True, max_length=50, null=True, unique=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('city', models.CharField(blank=True, max_length=50, null=True)),
                ('country', models.CharField(blank=True, max_length=50, null=True)),
                ('zipcode', models.CharField(blank=True, max_length=10, null=True)),
                ('officephone', models.BigIntegerField(blank=True, null=True, unique=True)),
                ('mobile', models.BigIntegerField(blank=True, null=True, unique=True)),
                ('est_year', models.IntegerField(blank=True, null=True)),
                ('status', models.CharField(choices=[('0', 'Invitation Send'), ('1', 'Approved'), ('2', 'Pending Approval'), ('3', 'Pendind Review'), ('4', 'Rejected'), ('5', 'Terminated')], default='2', max_length=50, null=True)),
                ('register_on', models.DateTimeField(auto_now_add=True, null=True)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Firm Details',
            },
        ),
    ]
