# Generated by Django 4.2.13 on 2024-06-08 18:14

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

import journal.models.mixins


class Migration(migrations.Migration):
    """
    This migration is a combination of all the migrations til 0.10.0
    """

    replaces = [
        ("social", "0001_initial"),
        ("social", "0002_initial"),
        ("social", "0003_alter_localactivity_template"),
        ("social", "0004_alter_localactivity_template"),
        ("social", "0005_alter_localactivity_template"),
        ("social", "0006_alter_localactivity_template"),
        ("social", "0007_alter_localactivity_owner"),
    ]

    initial = True

    dependencies = [
        ("users", "0001_initial_0_10"),
        ("journal", "0001_initial_0_10"),
    ]

    operations = [
        migrations.CreateModel(
            name="LocalActivity",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("visibility", models.PositiveSmallIntegerField(default=0)),
                (
                    "template",
                    models.CharField(
                        choices=[
                            ("mark_item", "Markitem"),
                            ("review_item", "Reviewitem"),
                            ("create_collection", "Createcollection"),
                            ("like_collection", "Likecollection"),
                            ("feature_collection", "Featurecollection"),
                            ("comment_child_item", "Commentchilditem"),
                        ],
                        max_length=50,
                    ),
                ),
                (
                    "created_time",
                    models.DateTimeField(
                        db_index=True, default=django.utils.timezone.now
                    ),
                ),
                (
                    "action_object",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="journal.piece"
                    ),
                ),
                (
                    "owner",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="users.apidentity",
                    ),
                ),
            ],
            options={
                "index_together": {("owner", "created_time")},
            },
            bases=(models.Model, journal.models.mixins.UserOwnedObjectMixin),
        ),
    ]
