# Generated by Django 5.1.6 on 2025-04-18 14:00

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


class Migration(migrations.Migration):

    dependencies = [
        ('species', '0003_rename_is_private_user_is_private_email_and_more'),
    ]

    operations = [
        migrations.AddField(
            model_name='speciesinstance',
            name='acquired_from',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='shared_species_instances', to='species.species'),
        ),
        migrations.AddField(
            model_name='speciesinstance',
            name='enable_species_log',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='speciesinstance',
            name='log_is_private',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='species',
            name='created_by',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_created_species', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='species',
            name='last_edited_by',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_last_edited_species', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='speciescomment',
            name='species',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_comments', to='species.species'),
        ),
        migrations.AlterField(
            model_name='speciescomment',
            name='user',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='user_species_comments', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='speciesinstance',
            name='user',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='user_species_instances', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='speciesinstance',
            name='year_acquired',
            field=models.IntegerField(blank=True, default=2025, null=True),
        ),
        migrations.AlterField(
            model_name='speciesinstancecomment',
            name='speciesInstance',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_species_instance_comments', to='species.speciesinstance'),
        ),
        migrations.AlterField(
            model_name='speciesinstancecomment',
            name='user',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='user_species_instance_comments', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='useremail',
            name='send_from',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_emails_from', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='useremail',
            name='send_to',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_emails_to', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='AquaristClub',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('logo_image', models.ImageField(blank=True, null=True, upload_to='images/%Y/%m/%d')),
                ('website', models.URLField()),
                ('city', models.CharField(blank=True, max_length=100)),
                ('state', models.CharField(blank=True, max_length=100)),
                ('country', models.CharField(blank=True, max_length=100)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lastUpdated', models.DateTimeField(auto_now=True)),
                ('club_admins', models.ManyToManyField(related_name='user_aquarist_clubs', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='AquaristClubMember',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('membership_requested', models.BooleanField(default=True)),
                ('membership_approved', models.BooleanField(default=False)),
                ('membership_admin', models.BooleanField(default=False)),
                ('date_requested', models.DateTimeField(auto_now_add=True)),
                ('last_updated', models.DateTimeField(auto_now=True)),
                ('club', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='member_clubs', to='species.aquaristclub')),
                ('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='user_club_members', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='SpeciesInstanceLogEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('log_entry_image', models.ImageField(blank=True, null=True, upload_to='images/%Y/%m/%d')),
                ('log_entry_notes', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lastUpdated', models.DateTimeField(auto_now=True)),
                ('speciesInstance', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_instance_log_entries', to='species.speciesinstance')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='SpeciesMaintenanceLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('description', models.TextField(blank=True, null=True)),
                ('log_is_private', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lastUpdated', models.DateTimeField(auto_now=True)),
                ('collaborators', models.ManyToManyField(related_name='user_maintenance_logs', to=settings.AUTH_USER_MODEL)),
                ('species', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_maintenance_logs', to='species.species')),
                ('speciesInstances', models.ManyToManyField(related_name='species_instance_maintenance_logs', to='species.speciesinstance')),
            ],
        ),
        migrations.CreateModel(
            name='SpeciesMaintenanceLogEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('log_entry_image', models.ImageField(blank=True, null=True, upload_to='images/%Y/%m/%d')),
                ('log_entry_notes', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lastUpdated', models.DateTimeField(auto_now=True)),
                ('speciesMaintenanceLog', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_maintenence_log_entries', to='species.speciesmaintenancelog')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='SpeciesReferenceLink',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('reference_url', models.URLField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('species', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_links', to='species.species')),
                ('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='user_species_links', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
    ]
