# Generated by Django 5.0.2 on 2026-05-14 04:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('products', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='SubProductRelease',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('platform', models.CharField(choices=[('windows', 'Windows'), ('macos', 'macOS'), ('linux', 'Linux')], max_length=20)),
                ('release_type', models.CharField(choices=[('stable', 'Stable'), ('previous', 'Previous')], default='stable', max_length=20)),
                ('version', models.CharField(help_text='e.g. 2.1.0', max_length=50)),
                ('download_url', models.URLField()),
                ('release_notes', models.TextField(blank=True)),
                ('is_active', models.BooleanField(default=True)),
                ('order', models.PositiveIntegerField(default=0)),
                ('sub_product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='releases', to='products.subproduct')),
            ],
            options={
                'verbose_name': 'Release',
                'verbose_name_plural': 'Releases',
                'ordering': ['release_type', 'platform', 'order'],
                'unique_together': {('sub_product', 'platform', 'release_type')},
            },
        ),
    ]
