# Generated by Django 5.0.6 on 2024-08-10 08:57

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


class Migration(migrations.Migration):

    dependencies = [
        ('species', '0002_alter_user_is_private'),
    ]

    operations = [
        migrations.RenameField(
            model_name='user',
            old_name='is_private',
            new_name='is_private_email',
        ),
        migrations.AddField(
            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_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            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_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='user',
            name='is_private_location',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='user',
            name='is_private_name',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='speciesinstance',
            name='user',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='species_instance_users', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='SpeciesComment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('comment', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('species', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_comment_species', to='species.species')),
                ('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='species_comment_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='SpeciesInstanceComment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('comment', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('speciesInstance', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='species_instance_comment_instance', to='species.speciesinstance')),
                ('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='species_instance_comment_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='UserEmail',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=240)),
                ('email_subject', models.TextField()),
                ('email_text', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('send_from', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_email_from', to=settings.AUTH_USER_MODEL)),
                ('send_to', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_email_to', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
    ]
