# Generated by Django 4.2.11 on 2024-12-25 08:53

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Gender',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gender_name', models.CharField(max_length=255)),
                ('initials', models.CharField(blank=True, max_length=255, null=True, unique=True)),
                ('code_name', models.CharField(max_length=255, unique=True)),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('en_module_name', models.CharField(max_length=255)),
                ('code_name', models.CharField(max_length=255)),
                ('route_name', models.CharField(max_length=255)),
                ('is_a_sub_module', models.BooleanField(default=False)),
                ('has_children', models.BooleanField(default=False)),
                ('main_module_id', models.IntegerField(blank=True, null=True)),
                ('sort_value', models.IntegerField()),
                ('depth', models.IntegerField()),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('en_permission_name', models.CharField(max_length=255)),
                ('code_name', models.CharField(max_length=255)),
                ('is_module_permission', models.BooleanField(default=False)),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('has_been_modified', models.BooleanField(default=False)),
                ('last_modified', models.DateTimeField()),
                ('module', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.module')),
            ],
        ),
        migrations.CreateModel(
            name='PermissionGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('group_name', models.CharField(max_length=255)),
                ('code_name', models.CharField(max_length=255)),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='SecurityGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('en_group_name', models.CharField(max_length=500)),
                ('code_name', models.CharField(max_length=300)),
                ('is_disabled', models.BooleanField(default=False)),
                ('is_default', models.BooleanField(default=False)),
                ('is_editable', models.BooleanField(default=True)),
                ('is_deletable', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserRole',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role_name', models.CharField(max_length=255)),
                ('initials', models.CharField(blank=True, max_length=255, null=True, unique=True)),
                ('code_name', models.CharField(max_length=255, unique=True)),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phoneno', models.CharField(blank=True, max_length=255, null=True)),
                ('address', models.CharField(blank=True, max_length=30, null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('photo', models.FileField(blank=True, default='images/photos/default.png', null=True, upload_to='images/photos/')),
                ('is_editable', models.BooleanField(default=True)),
                ('is_deletable', models.BooleanField(default=True)),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('gender', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.gender')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserPermission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('has_permission', models.BooleanField(default=True)),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.permission')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('has_been_modified', models.BooleanField(default=False)),
                ('last_modified', models.DateTimeField()),
                ('security_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.securitygroup')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SideMenu',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_value', models.IntegerField()),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('has_been_modified', models.BooleanField(default=False)),
                ('last_modified', models.DateTimeField()),
                ('module', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.module')),
            ],
        ),
        migrations.CreateModel(
            name='ReceivedDocument',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('memo', models.TextField()),
                ('officeFrom', models.CharField(max_length=100)),
                ('dateReceived', models.DateField()),
                ('contactName', models.CharField(blank=True, max_length=100, null=True)),
                ('contactNumber', models.CharField(max_length=15)),
                ('is_disabled', models.BooleanField(default=False)),
                ('submitted_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='GroupedPermission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.permissiongroup')),
                ('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.permission')),
            ],
        ),
        migrations.CreateModel(
            name='FCMUserDeviceNotificationToken',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_token', models.CharField(max_length=8000)),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DefaultPermission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.permission')),
                ('security_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.securitygroup')),
            ],
        ),
        migrations.CreateModel(
            name='DashboardMenu',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_value', models.IntegerField()),
                ('is_disabled', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('has_been_modified', models.BooleanField(default=False)),
                ('last_modified', models.DateTimeField()),
                ('module', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.module')),
            ],
        ),
    ]
