# Generated by Django 2.2.24 on 2021-11-15 18:54

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('astrobin_apps_equipment', '0033_filter_filtereditproposal'),
    ]

    operations = [
        migrations.CreateModel(
            name='Accessory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deleted', models.DateTimeField(editable=False, null=True)),
                ('reviewed_timestamp', models.DateTimeField(editable=False, null=True)),
                ('reviewer_decision', models.CharField(choices=[('APPROVED', 'Approved'), ('REJECTED', 'Rejected')], editable=False, max_length=8, null=True)),
                ('reviewer_rejection_reason', models.CharField(choices=[('TYPO', "There's a typo in the name of the item"), ('WRONG_BRAND', 'The item was assigned to the wrong brand'), ('INACCURATE_DATA', 'Some data is inaccurate'), ('INSUFFICIENT_DATA', 'Some important data is missing'), ('OTHER', 'Other')], editable=False, max_length=32, null=True)),
                ('reviewer_comment', models.TextField(editable=False, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=128)),
                ('image', models.ImageField(blank=True, null=True, upload_to=astrobin_apps_equipment.models.equipment_item.image_upload_path)),
                ('brand', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='astrobin_apps_equipment_brand_accessorys', to='astrobin_apps_equipment.EquipmentBrand')),
                ('created_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='astrobin_apps_equipment_accessorys_created', to=settings.AUTH_USER_MODEL)),
                ('reviewed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='astrobin_apps_equipment_accessorys_reviewed', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['brand__name', 'name'],
                'abstract': False,
                'unique_together': {('brand', 'name')},
            },
        ),
        migrations.CreateModel(
            name='AccessoryEditProposal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deleted', models.DateTimeField(editable=False, null=True)),
                ('reviewed_timestamp', models.DateTimeField(editable=False, null=True)),
                ('reviewer_decision', models.CharField(choices=[('APPROVED', 'Approved'), ('REJECTED', 'Rejected')], editable=False, max_length=8, null=True)),
                ('reviewer_rejection_reason', models.CharField(choices=[('TYPO', "There's a typo in the name of the item"), ('WRONG_BRAND', 'The item was assigned to the wrong brand'), ('INACCURATE_DATA', 'Some data is inaccurate'), ('INSUFFICIENT_DATA', 'Some important data is missing'), ('OTHER', 'Other')], editable=False, max_length=32, null=True)),
                ('reviewer_comment', models.TextField(editable=False, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=128)),
                ('image', models.ImageField(blank=True, null=True, upload_to=astrobin_apps_equipment.models.equipment_item.image_upload_path)),
                ('edit_proposal_original_properties', models.TextField()),
                ('edit_proposal_created', models.DateTimeField(auto_now_add=True)),
                ('edit_proposal_updated', models.DateTimeField(auto_now=True)),
                ('edit_proposal_ip', models.GenericIPAddressField(editable=False, null=True)),
                ('edit_proposal_comment', models.TextField(blank=True, null=True)),
                ('edit_proposal_review_timestamp', models.DateTimeField(editable=False, null=True)),
                ('edit_proposal_review_ip', models.GenericIPAddressField(editable=False, null=True)),
                ('edit_proposal_review_comment', models.TextField(blank=True, null=True)),
                ('edit_proposal_review_status', models.CharField(blank=True, choices=[('APPROVED', 'Approved'), ('REJECTED', 'Rejected'), ('SUPERSEDED', 'Superseded')], max_length=10, null=True)),
                ('brand', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='astrobin_apps_equipment_brand_accessoryeditproposals', to='astrobin_apps_equipment.EquipmentBrand')),
                ('created_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='astrobin_apps_equipment_accessoryeditproposals_created', to=settings.AUTH_USER_MODEL)),
                ('edit_proposal_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='astrobin_apps_equipment_accessoryeditproposal_edit_proposals', to=settings.AUTH_USER_MODEL)),
                ('edit_proposal_reviewed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='astrobin_apps_equipment_accessoryeditproposal_edit_proposals_reviewed', to=settings.AUTH_USER_MODEL)),
                ('edit_proposal_target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='edit_proposals', to='astrobin_apps_equipment.Accessory')),
                ('reviewed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='astrobin_apps_equipment_accessoryeditproposals_reviewed', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-edit_proposal_created'],
                'abstract': False,
            },
        ),
    ]
