# Generated by Django 3.2.13 on 2022-12-04 13:13

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('title', models.CharField(default='', max_length=200, null=True)),
                ('country', models.CharField(default='', max_length=100, null=True)),
                ('province', models.CharField(default='', max_length=50, null=True)),
                ('city', models.CharField(default='', max_length=50, null=True)),
                ('address', models.CharField(max_length=300, null=True)),
                ('postal_code', models.CharField(default='', max_length=20, null=True)),
                ('breeding_unique_id', models.CharField(max_length=50, null=True)),
                ('phone', models.CharField(default='', max_length=20, null=True)),
                ('phone_type', models.CharField(default='', max_length=20, null=True)),
                ('no', models.CharField(default='', max_length=5, null=True)),
                ('floor', models.IntegerField(default=0, null=True)),
                ('unit', models.IntegerField(default=0, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='address_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='address_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BankCard',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name_of_bank_user', models.CharField(max_length=200, null=True)),
                ('bank_name', models.CharField(max_length=30, null=True)),
                ('card', models.CharField(max_length=16, null=True)),
                ('shaba', models.CharField(max_length=100, null=True)),
                ('account', models.CharField(max_length=50, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='bankcard_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='bankcard_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=200, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='city_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='city_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PermissionLevel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=100, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='permissionlevel_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='permissionlevel_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='group_permission', to='auth.group')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=200, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='province_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='province_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SystemUserProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('token', models.CharField(max_length=36, null=True)),
                ('fullname', models.CharField(max_length=150, null=True)),
                ('first_name', models.CharField(max_length=200, null=True)),
                ('last_name', models.CharField(max_length=200, null=True)),
                ('national_code', models.CharField(max_length=20, null=True)),
                ('national_id', models.CharField(max_length=20, null=True)),
                ('mobile', models.CharField(max_length=11, null=True)),
                ('birthday', models.CharField(max_length=20, null=True)),
                ('image', models.CharField(max_length=500, null=True)),
                ('password', models.CharField(max_length=100, null=True)),
                ('state', models.JSONField(default={'birthday': '', 'city': '', 'first_name': '', 'image': '', 'last_name': '', 'mobile': '', 'national_code': '', 'national_id': '', 'province': ''})),
                ('base_order', models.BigIntegerField(null=True)),
                ('access_level', models.ManyToManyField(related_name='user_permission_level', to='authentication.PermissionLevel')),
                ('city', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_city', to='authentication.city')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='systemuserprofile_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='systemuserprofile_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('province', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_province', to='authentication.province')),
                ('role', models.ManyToManyField(related_name='user_system_roles', to='auth.Group')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='system_user_profile_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('key', models.UUIDField(default=uuid.uuid4, null=True)),
                ('token', models.CharField(default='', max_length=36)),
                ('app_token', models.CharField(max_length=36, null=True)),
                ('company', models.CharField(max_length=30, null=True)),
                ('fullname', models.CharField(default='', max_length=150, null=True)),
                ('first_name', models.CharField(default='', max_length=200, null=True)),
                ('last_name', models.CharField(default='', max_length=200, null=True)),
                ('natinal_id', models.CharField(default='', max_length=10, null=True)),
                ('mobile', models.CharField(default='', max_length=11, null=True)),
                ('birthday', models.CharField(default='', max_length=20, null=True)),
                ('image', models.CharField(max_length=500, null=True)),
                ('state', models.CharField(default='register', max_length=20)),
                ('unit_name', models.CharField(max_length=100, null=True)),
                ('password', models.CharField(max_length=100, null=True)),
                ('gis_code', models.CharField(max_length=30, null=True)),
                ('operating_licence_capacity', models.BigIntegerField(default=0)),
                ('number_of_halls', models.IntegerField(default=0)),
                ('tenant', models.BooleanField(null=True)),
                ('person_type', models.CharField(max_length=10, null=True)),
                ('economic_code', models.CharField(max_length=30, null=True)),
                ('system_code', models.CharField(max_length=20, null=True)),
                ('epidemiological_code', models.CharField(max_length=20, null=True)),
                ('breeding_unique_id', models.CharField(max_length=20, null=True)),
                ('total_capacity', models.BigIntegerField(default=0)),
                ('licence_number', models.CharField(max_length=20, null=True)),
                ('health_certificate_number', models.CharField(max_length=20, null=True)),
                ('number_of_requests', models.BigIntegerField(default=0)),
                ('hatching_date', models.DateTimeField(default=datetime.datetime(2022, 12, 4, 13, 13, 23, 181362))),
                ('last_party_date', models.DateTimeField(default=datetime.datetime(2022, 12, 4, 13, 13, 23, 181450))),
                ('number_of_incubators', models.BigIntegerField(default=0)),
                ('herd_age_by_day', models.IntegerField(default=0)),
                ('herd_age_by_week', models.IntegerField(default=0)),
                ('number_of_party', models.IntegerField(default=0)),
                ('communication_type', models.CharField(max_length=30, null=True)),
                ('cooperative', models.CharField(max_length=50, null=True)),
                ('date_of_register', models.DateTimeField(default=datetime.datetime(2022, 12, 4, 13, 13, 23, 181666))),
                ('unit_status', models.CharField(max_length=20, null=True)),
                ('samasat_user_code', models.CharField(max_length=20, null=True)),
                ('base_order', models.BigIntegerField(null=True)),
                ('incubation_date', models.DateTimeField(null=True)),
                ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_address', to='authentication.address')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='userprofile_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='userprofile_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('role', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_role', to='auth.group')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='users', to=settings.AUTH_USER_MODEL)),
                ('user_bank_info', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='bank_user', to='authentication.bankcard')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserMessageType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(choices=[('user', 'USER'), ('alluser', 'AllUSER'), ('group', 'GROUP'), ('allgroup', 'AllGROUP'), ('usergroup', 'UserGroup'), ('province_accept', 'ProvinceAccept'), ('province_rejected', 'ProvinceRejected'), ('city_operator_accept', 'CityOperatorAccept'), ('city_operator_rejected', 'CityOperatorRejected'), ('assignment_accepted', 'AssignmentAccepted'), ('assignment_rejected', 'AssignmentRejected')], default='', max_length=50, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='usermessagetype_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='usermessagetype_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserMessage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('heading', models.CharField(default='', max_length=100, null=True)),
                ('message', models.TextField(default='', max_length=500, null=True)),
                ('link_text', models.CharField(max_length=150, null=True)),
                ('link', models.CharField(max_length=100, null=True)),
                ('image', models.JSONField(default=dict, null=True)),
                ('expire', models.DateTimeField(default=datetime.datetime(2022, 12, 4, 14, 13, 23, 193330))),
                ('time', models.DateTimeField(default=datetime.datetime(2022, 12, 4, 13, 13, 23, 193389))),
                ('state', models.CharField(default='pending', max_length=20)),
                ('message_level', models.CharField(max_length=50, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='usermessage_createdby', to=settings.AUTH_USER_MODEL)),
                ('message_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='message_type', to='authentication.usermessagetype')),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='usermessage_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('roles', models.ManyToManyField(blank=True, related_name='user_roles', to='auth.Group')),
                ('sender', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='message_sender', to='authentication.systemuserprofile')),
                ('users', models.ManyToManyField(blank=True, related_name='user_message', to='authentication.SystemUserProfile')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Tenant',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('fullname', models.CharField(max_length=50, null=True)),
                ('national_code', models.CharField(max_length=20, null=True)),
                ('birthday', models.CharField(max_length=50, null=True)),
                ('rental', models.CharField(max_length=30, null=True)),
                ('tracking_code', models.CharField(max_length=30, null=True)),
                ('rent_date_from', models.CharField(max_length=30, null=True)),
                ('rent_date_to', models.CharField(max_length=30, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tenant_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tenant_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('userprofile', models.ManyToManyField(related_name='tenant_user', to='authentication.UserProfile')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SystemAddress',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('address', models.CharField(max_length=300, null=True)),
                ('postal_code', models.CharField(default='', max_length=20, null=True)),
                ('breeding_unique_id', models.CharField(max_length=50, null=True)),
                ('phone', models.CharField(default='', max_length=20, null=True)),
                ('phone_type', models.CharField(default='', max_length=20, null=True)),
                ('no', models.CharField(default='', max_length=5, null=True)),
                ('floor', models.IntegerField(default=0, null=True)),
                ('unit', models.IntegerField(default=0, null=True)),
                ('city', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='city_address', to='authentication.city')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='systemaddress_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='systemaddress_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('province', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='province_address', to='authentication.province')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SendingMessageMethod',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('level', models.CharField(max_length=50, null=True)),
                ('methods', models.CharField(max_length=150, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sendingmessagemethod_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sendingmessagemethod_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MultiRole',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='multi_role_address', to='authentication.address')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='multirole_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='multirole_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='multi_role_users', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GeoPoint',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=100, null=True)),
                ('lang', models.CharField(max_length=50, null=True)),
                ('lat', models.CharField(max_length=50, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='geopoint_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='geopoint_modifiedby', to=settings.AUTH_USER_MODEL)),
                ('userprofile', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='geo_user', to='authentication.userprofile')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CityUnit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('modify_date', models.DateTimeField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=200, null=True)),
                ('city', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='city_province', to='authentication.city')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cityunit_createdby', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cityunit_modifiedby', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='city',
            name='province',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='city_province', to='authentication.province'),
        ),
    ]
