# Generated by Django 5.2b1 on 2025-03-13 04:44

import django.contrib.auth.models
import django.contrib.auth.validators
import django.db.models.deletion
import django.utils.timezone
import uuid6
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='TimeZone',
            fields=[
                ('uuid_pk_v7', models.UUIDField(default=uuid6.uuid7, editable=False, primary_key=True, serialize=False)),
                ('identifier', models.CharField(help_text='America/New_York', max_length=20, unique=True)),
                ('tz_type', models.PositiveSmallIntegerField(choices=[(1, 'canonical'), (2, 'link (alias)'), (3, 'link, previously canonical')], default=1)),
                ('src_file', models.PositiveSmallIntegerField(choices=[(1, 'factory'), (2, 'etcetera'), (3, 'backward'), (4, 'europe'), (5, 'asia'), (6, 'australasia'), (7, 'northamerica'), (8, 'southamerica'), (9, 'africa'), (10, 'antarctica')], default=7)),
                ('aliases', models.CharField(blank=True, help_text='US/Eastern, EST5EDT', max_length=30, null=True, unique=True)),
            ],
            options={
                'verbose_name': 'IANA time zone',
                'verbose_name_plural': 'IANA time zones',
                'ordering': ['identifier'],
            },
        ),
        migrations.CreateModel(
            name='TZAbbreviation',
            fields=[
                ('uuid_pk_v7', models.UUIDField(default=uuid6.uuid7, editable=False, primary_key=True, serialize=False)),
                ('identifier', models.CharField(help_text='Central European Summer Time', max_length=30, unique=True)),
                ('offset', models.CharField(help_text='+02:00', max_length=6)),
                ('abbr', models.CharField(help_text='CEST', max_length=4, unique=True)),
            ],
            options={
                'verbose_name': 'Time zone abbreviation',
                'verbose_name_plural': 'Tme zone abbreviations',
                'ordering': ['offset'],
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('uuid_pk_v7', models.UUIDField(default=uuid6.uuid7, editable=False, primary_key=True, serialize=False)),
                ('surname', models.CharField(blank=True, max_length=150)),
                ('given_names', models.CharField(blank=True, max_length=150)),
                ('surname_first', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='Staff')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='Super')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
                ('timezone', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='vto_core.timezone')),
            ],
            options={
                'ordering': ['-is_superuser', 'username'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='timezone',
            name='dst',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='rn_tz_abbr_dst', to='vto_core.tzabbreviation'),
        ),
        migrations.AddField(
            model_name='timezone',
            name='std',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='rn_tz_abbr_std', to='vto_core.tzabbreviation'),
        ),
    ]
