# Generated by Django 5.2.16 on 2026-07-30 01:33

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('links', '0049_sitesettings_telegram_bot_token_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Bookmark',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tweet_id', models.CharField(db_index=True, max_length=40, unique=True)),
                ('url', models.URLField(blank=True, max_length=500)),
                ('author_screen_name', models.CharField(blank=True, db_index=True, max_length=80)),
                ('author_name', models.CharField(blank=True, max_length=120)),
                ('author_profile_image_url', models.URLField(blank=True, max_length=500)),
                ('text', models.TextField(blank=True, help_text='Full post text, used for search')),
                ('summary', models.CharField(blank=True, help_text='Optional short human/agent-written summary', max_length=300)),
                ('tweet_created_at', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('bookmark_created_at', models.DateTimeField(blank=True, db_index=True, null=True)),
                ('view_count', models.IntegerField(default=0)),
                ('favorite_count', models.IntegerField(default=0)),
                ('retweet_count', models.IntegerField(default=0)),
                ('reply_count', models.IntegerField(default=0)),
                ('bookmark_count', models.IntegerField(default=0)),
                ('quote_count', models.IntegerField(default=0)),
                ('has_video', models.BooleanField(db_index=True, default=False)),
                ('has_photo', models.BooleanField(db_index=True, default=False)),
                ('has_card', models.BooleanField(db_index=True, default=False)),
                ('is_quote', models.BooleanField(db_index=True, default=False)),
                ('is_retweet', models.BooleanField(db_index=True, default=False)),
                ('media', models.JSONField(blank=True, default=list, help_text='List of media objects (photo/video w/ poster)')),
                ('card_data', models.JSONField(blank=True, default=dict, null=True)),
                ('quoted_data', models.JSONField(blank=True, default=dict, null=True)),
                ('data', models.JSONField(blank=True, default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-tweet_created_at', '-bookmark_created_at', '-created_at'],
                'indexes': [models.Index(fields=['has_video'], name='links_bookm_has_vid_ce96ca_idx'), models.Index(fields=['has_photo'], name='links_bookm_has_pho_870a67_idx'), models.Index(fields=['is_quote'], name='links_bookm_is_quot_7a9c4f_idx')],
            },
        ),
    ]
