# Generated by Django 5.0.6 on 2024-07-13 03:17

import django.db.models.deletion
from django.conf import settings
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='Species',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('alt_name', models.CharField(blank=True, max_length=240, null=True)),
                ('common_name', models.CharField(blank=True, max_length=240, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('species_image', models.ImageField(blank=True, null=True, upload_to='images/%Y/%m/%d')),
                ('photo_credit', models.CharField(blank=True, max_length=200, null=True)),
                ('category', models.CharField(choices=[('CIC', 'Cichlids'), ('RBF', 'Rainbowfish'), ('KLF', 'Killifish'), ('CHA', 'Characins (Tetras)'), ('CAT', 'Catfish'), ('LVB', 'Livebearers'), ('CYP', 'Cyprinids (Carps, Barbs, Danios, Minnows)'), ('ANA', 'Anabatids (Gouramis, Bettas)'), ('LCH', 'Loaches'), ('OTH', 'All Others')], default='CIC', max_length=3)),
                ('global_region', models.CharField(choices=[('SAM', 'South America'), ('CAM', 'Central America'), ('NAM', 'North America'), ('AFR', 'Africa'), ('SEA', 'Southeast Asia'), ('AUS', 'Australia'), ('OTH', 'Other Region')], default='AFR', max_length=3)),
                ('local_distribution', models.CharField(blank=True, max_length=200, null=True)),
                ('cares_status', models.CharField(choices=[('NOTC', 'Not a CARES Species'), ('NEAR', 'Near Threatened'), ('VULN', 'Vulnerable'), ('ENDA', 'Endangered'), ('CEND', 'Critically Endangered'), ('EXCT', 'Extict in the Wild')], default='NOTC', max_length=4)),
                ('render_cares', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lastUpdated', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        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')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('email', models.EmailField(max_length=50, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=100)),
                ('last_name', models.CharField(blank=True, max_length=100)),
                ('username', models.CharField(max_length=100, unique=True)),
                ('state', models.CharField(blank=True, max_length=100)),
                ('country', models.CharField(blank=True, max_length=100)),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('is_private', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('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')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ImportArchive',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('import_csv_file', models.FileField(upload_to='uploads/%Y/%m/%d/')),
                ('import_results_file', models.FileField(blank=True, null=True, upload_to='uploads/%Y/%m/%d/')),
                ('import_status', models.CharField(choices=[('PEND', 'Pending'), ('PART', 'Partial Import'), ('FULL', 'Full Import'), ('FAIL', 'Import Failure')], default='PEND', max_length=4)),
                ('dateImported', models.DateTimeField(auto_now_add=True)),
                ('aquarist', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='aquarist_imports', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-dateImported'],
            },
        ),
        migrations.CreateModel(
            name='SpeciesInstance',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('unique_traits', models.CharField(blank=True, max_length=200, null=True)),
                ('instance_image', models.ImageField(blank=True, null=True, upload_to='images/%Y/%m/%d')),
                ('genetic_traits', models.CharField(choices=[('AS', 'Aquarium Strain'), ('WC', 'Wild Caught'), ('F1', 'F1 First Generation'), ('F2', 'F2 Second Generation'), ('FX', 'FX 3rd or more Generation'), ('OT', 'Other')], default='AS', max_length=2)),
                ('collection_point', models.CharField(blank=True, max_length=200, null=True)),
                ('year_acquired', models.IntegerField(blank=True, default=2024, null=True)),
                ('aquarist_notes', models.TextField(blank=True, null=True)),
                ('have_spawned', models.BooleanField(default=False)),
                ('spawning_notes', models.TextField(blank=True, null=True)),
                ('have_reared_fry', models.BooleanField(default=False)),
                ('fry_rearing_notes', models.TextField(blank=True, null=True)),
                ('young_available', models.BooleanField(default=False)),
                ('currently_keep', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lastUpdated', models.DateTimeField(auto_now=True)),
                ('species', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_instances', to='species.species')),
                ('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='species_instances', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-lastUpdated', '-created'],
            },
        ),
    ]
