# Generated by Django 5.0.6 on 2024-06-13 09:03

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


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0001_squashed_0014_historicalanime_historicalepisode_historicalgame_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomList',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True, default='')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['name'],
                'unique_together': {('name', 'user')},
            },
        ),
        migrations.CreateModel(
            name='ListItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('media_id', models.PositiveIntegerField()),
                ('media_type', models.CharField(max_length=12)),
                ('title', models.CharField(max_length=255)),
                ('image', models.URLField()),
                ('season_number', models.PositiveIntegerField(null=True)),
                ('episode_number', models.PositiveIntegerField(null=True)),
                ('custom_lists', models.ManyToManyField(related_name='items', to='app.customlist')),
            ],
            options={
                'ordering': ['media_id'],
                'unique_together': {('media_id', 'media_type', 'season_number', 'episode_number')},
            },
        ),
    ]
