# Generated by Django 3.0.2 on 2020-01-24 20:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Playlist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('cover_url', models.URLField(blank=True)),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified_date', models.DateTimeField(auto_now=True, verbose_name='modified at')),
            ],
        ),
        migrations.CreateModel(
            name='Radio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('cover_url', models.URLField(blank=True)),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified_date', models.DateTimeField(auto_now=True, verbose_name='modified at')),
            ],
        ),
        migrations.CreateModel(
            name='Song',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified_date', models.DateTimeField(auto_now=True, verbose_name='modified at')),
            ],
        ),
        migrations.CreateModel(
            name='RadioVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('radio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='backend.Radio')),
                ('song', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Song')),
            ],
            options={
                'unique_together': {('radio', 'song', 'owner')},
            },
        ),
        migrations.AddField(
            model_name='radio',
            name='songs',
            field=models.ManyToManyField(through='backend.RadioVote', to='backend.Song'),
        ),
        migrations.CreateModel(
            name='PlaylistEntry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('playlist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Playlist')),
                ('song', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Song')),
            ],
        ),
        migrations.AddField(
            model_name='playlist',
            name='songs',
            field=models.ManyToManyField(through='backend.PlaylistEntry', to='backend.Song'),
        ),
    ]

# Generated by Django 3.0.2 on 2020-01-24 20:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Playlist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('cover_url', models.URLField(blank=True)),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified_date', models.DateTimeField(auto_now=True, verbose_name='modified at')),
            ],
        ),
        migrations.CreateModel(
            name='Radio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('cover_url', models.URLField(blank=True)),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified_date', models.DateTimeField(auto_now=True, verbose_name='modified at')),
            ],
        ),
        migrations.CreateModel(
            name='Song',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('modified_date', models.DateTimeField(auto_now=True, verbose_name='modified at')),
            ],
        ),
        migrations.CreateModel(
            name='RadioVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('radio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='backend.Radio')),
                ('song', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Song')),
            ],
            options={
                'unique_together': {('radio', 'song', 'owner')},
            },
        ),
        migrations.AddField(
            model_name='radio',
            name='songs',
            field=models.ManyToManyField(through='backend.RadioVote', to='backend.Song'),
        ),
        migrations.CreateModel(
            name='PlaylistEntry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('playlist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Playlist')),
                ('song', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Song')),
            ],
        ),
        migrations.AddField(
            model_name='playlist',
            name='songs',
            field=models.ManyToManyField(through='backend.PlaylistEntry', to='backend.Song'),
        ),
    ]

# Generated by Django 3.0.2 on 2020-01-24 20:14