# Generated by Django 5.2.1 on 2025-05-11 05:56

import django.db.models.deletion
import simple_history.models
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('account', '0089_serviceinformation_retirement'),
    ]

    operations = [
        migrations.CreateModel(
            name='HistoricalCustomUser',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('id', models.IntegerField(blank=True, db_index=True)),
                ('email', models.CharField(db_index=True, max_length=150)),
                ('army_no', models.CharField(blank=True, max_length=50, null=True)),
                ('name', models.CharField(default='Anonymous', max_length=150)),
                ('mobile_no', models.CharField(blank=True, max_length=50, null=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('sn', models.IntegerField(blank=True, null=True)),
                ('role', models.CharField(choices=[('commandant', 'Commander'), ('bm', 'BM'), ('dq', 'DQ'), ('adjutant', 'Adjutant'), ('co', 'CO'), ('battalion', 'Battalion'), ('company', 'Company Daily'), ('csm', 'CSM'), ('company_commander', 'Company Commander'), ('member', 'Member')], default='member', max_length=20)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField(db_index=True)),
                ('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)),
                ('rank', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='account.rank')),
            ],
            options={
                'verbose_name': 'historical custom user',
                'verbose_name_plural': 'historical custom users',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': ('history_date', 'history_id'),
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
    ]
