# Generated by Django 5.2 on 2025-04-23 17:23

import django.db.models.deletion
import django.utils.timezone
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='Activity',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField(editable=False)),
                ('verb', models.CharField(max_length=64)),
                ('information', models.TextField(blank=True, null=True)),
                ('created_datetime', models.DateTimeField(default=django.utils.timezone.localtime)),
                ('content_type', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='activities', related_query_name='activity', to='contenttypes.contenttype')),
                ('recipient', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='actors', related_query_name='actor', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='users', related_query_name='user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Activities',
                'verbose_name_plural': 'Activities',
                'db_table': 'django_spire_history_activity',
                'ordering': ['-created_datetime'],
            },
        ),
        migrations.CreateModel(
            name='ActivitySubscriber',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(default=django.utils.timezone.localtime)),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subscribers', related_query_name='subscriber', to='django_spire_history_activity.activity')),
                ('subscriber', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='activity_subscribers', related_query_name='activity_subscriber', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Activity Subscriber',
                'verbose_name_plural': 'Activity Subscribers',
                'db_table': 'django_spire_history_activity_subscriber',
                'ordering': ['-created_datetime'],
            },
        ),
    ]
