# Generated by Django 4.2.16 on 2026-10-29 02:17

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


class Migration(migrations.Migration):

    dependencies = [
        ('articles', '0011_magazines_and_homepage_blocks'),
        ('store', '0011_delivery_address'),
        ('core', '0021_games_homepage_block'),
    ]

    operations = [
        migrations.AddField(
            model_name='sitesettings',
            name='hero_autoplay_seconds',
            field=models.PositiveSmallIntegerField(default=7, help_text="How long each homepage hero slide stays before moving on. 0 = don't move on its own.", verbose_name='Hero slider: seconds per slide'),
        ),
        migrations.CreateModel(
            name='HeroSlide',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kind', models.CharField(choices=[('article', 'Blog article'), ('magazine', 'Magazine issue'), ('product', 'Shop product'), ('custom', 'Custom (your own image, text and link)')], default='article', max_length=10)),
                ('eyebrow', models.CharField(blank=True, help_text='Small line above the title. Blank = automatic.', max_length=80)),
                ('title', models.CharField(blank=True, help_text='Blank = the article/issue/product title.', max_length=200)),
                ('text', models.TextField(blank=True, help_text='Short text under the title. Blank = automatic.', max_length=400)),
                ('button_text', models.CharField(blank=True, help_text="Blank = automatic (e.g. 'Read feature').", max_length=60)),
                ('button_url', models.CharField(blank=True, help_text='Blank = the article/issue/product page.', max_length=300)),
                ('image', models.ImageField(blank=True, help_text="Wide background picture (about 1920×1000). Blank = the article's picture, or a soft blur of the cover/product photo.", upload_to='homepage/slides/')),
                ('image_position', models.CharField(choices=[('center', 'Center'), ('top', 'Top'), ('bottom', 'Bottom'), ('left', 'Left'), ('right', 'Right')], default='center', help_text='Which part of the picture stays visible on narrow phone screens.', max_length=8, verbose_name='Focus of the picture')),
                ('order', models.PositiveSmallIntegerField(default=0, help_text='Lower numbers come first.')),
                ('is_active', models.BooleanField(default=True)),
                ('starts_at', models.DateTimeField(blank=True, help_text='Optional: show from this time.', null=True)),
                ('ends_at', models.DateTimeField(blank=True, help_text='Optional: stop showing after this time.', null=True)),
                ('article', models.ForeignKey(blank=True, help_text="For 'Blog article'.", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hero_slides', to='articles.article')),
                ('product', models.ForeignKey(blank=True, help_text="For 'Magazine issue' or 'Shop product'.", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hero_slides', to='store.product')),
            ],
            options={
                'verbose_name': 'Homepage hero slide',
                'verbose_name_plural': 'Homepage hero slides',
                'ordering': ['order', 'id'],
            },
        ),
    ]
