# Generated by Django 5.0.3 on 2025-05-20 20:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('pxy_meta_pages', '0002_facebookpageassistant_is_subscribed'),
    ]

    operations = [
        migrations.CreateModel(
            name='EventType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(help_text="Machine-readable code for the event type (e.g. 'comment', 'share')", max_length=50, unique=True)),
                ('label', models.CharField(help_text='Human-readable label for the event type', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='FacebookEvent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sender_id', models.CharField(blank=True, help_text='ID of the user who triggered the event', max_length=100, null=True)),
                ('object_id', models.CharField(help_text='Identifier of the comment or share object', max_length=100)),
                ('message', models.TextField(blank=True, help_text='Text content (for comments) or message attached to the event', null=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('event_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='facebook_events', to='pxy_meta_pages.eventtype')),
                ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='pxy_meta_pages.facebookpageassistant')),
            ],
        ),
    ]
