# Generated by Django 5.1.3 on 2024-11-12 18:07 import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("contenttypes", "0002_remove_content_type_name"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name="EditSubmission", fields=[ ( "id", models.BigAutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("object_id", models.PositiveIntegerField(blank=True, null=True)), ( "submission_type", models.CharField( choices=[("EDIT", "Edit Existing"), ("CREATE", "Create New")], default="EDIT", max_length=10, ), ), ( "changes", models.JSONField( help_text="JSON representation of the changes or new object data" ), ), ( "reason", models.TextField(help_text="Why this edit/addition is needed"), ), ( "source", models.TextField( blank=True, help_text="Source of information (if applicable)" ), ), ( "status", models.CharField( choices=[ ("NEW", "New"), ("APPROVED", "Approved"), ("REJECTED", "Rejected"), ("ESCALATED", "Escalated"), ], default="NEW", max_length=20, ), ), ("created_at", models.DateTimeField(auto_now_add=True)), ("handled_at", models.DateTimeField(blank=True, null=True)), ( "notes", models.TextField( blank=True, help_text="Notes from the moderator about this submission", ), ), ( "content_type", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="contenttypes.contenttype", ), ), ( "handled_by", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="handled_submissions", to=settings.AUTH_USER_MODEL, ), ), ( "user", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="edit_submissions", to=settings.AUTH_USER_MODEL, ), ), ], options={ "ordering": ["-created_at"], "indexes": [ models.Index( fields=["content_type", "object_id"], name="moderation__content_922d2b_idx", ), models.Index( fields=["status"], name="moderation__status_e4eb2b_idx" ), ], }, ), migrations.CreateModel( name="PhotoSubmission", fields=[ ( "id", models.BigAutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("object_id", models.PositiveIntegerField()), ("photo", models.ImageField(upload_to="submissions/photos/")), ("caption", models.CharField(blank=True, max_length=255)), ("date_taken", models.DateField(blank=True, null=True)), ( "status", models.CharField( choices=[ ("NEW", "New"), ("APPROVED", "Approved"), ("REJECTED", "Rejected"), ("AUTO_APPROVED", "Auto Approved"), ], default="NEW", max_length=20, ), ), ("created_at", models.DateTimeField(auto_now_add=True)), ("handled_at", models.DateTimeField(blank=True, null=True)), ( "notes", models.TextField( blank=True, help_text="Notes from the moderator about this photo submission", ), ), ( "content_type", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="contenttypes.contenttype", ), ), ( "handled_by", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="handled_photos", to=settings.AUTH_USER_MODEL, ), ), ( "user", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="photo_submissions", to=settings.AUTH_USER_MODEL, ), ), ], options={ "ordering": ["-created_at"], "indexes": [ models.Index( fields=["content_type", "object_id"], name="moderation__content_7a7bc1_idx", ), models.Index( fields=["status"], name="moderation__status_7a1914_idx" ), ], }, ), ]