# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-04 13:55
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Album',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('album_name', models.CharField(max_length=64)),
                ('year', models.DecimalField(decimal_places=0, max_digits=4)),
            ],
        ),
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='MusicEntry',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('order_in_playlist', models.PositiveSmallIntegerField()),
                ('rating', models.DecimalField(choices=[(0, '1'), (1, '2'), (2, '3'), (3, '4'), (4, '5'), (5, '6'), (6, '7'), (7, '8'), (8, '9'), (9, '10')], decimal_places=0, max_digits=1)),
            ],
        ),
        migrations.CreateModel(
            name='MusicPlaylist',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('playlist_name', models.CharField(max_length=32)),
                ('is_public', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Song',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('song_name', models.TextField()),
                ('genre', models.CharField(max_length=128)),
                ('song_length', models.PositiveIntegerField(default=0, null=True)),
                ('lyrics', models.TextField(null=True)),
                ('album', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Album')),
                ('artist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Artist')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=32)),
                ('tag', models.ManyToManyField(to='core.MusicEntry')),
            ],
        ),
        migrations.CreateModel(
            name='UserAccount',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('first_name', models.CharField(max_length=64)),
                ('last_name', models.CharField(max_length=64)),
                ('email', models.CharField(max_length=64)),
            ],
        ),
        migrations.AddField(
            model_name='musicplaylist',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.UserAccount'),
        ),
        migrations.AddField(
            model_name='musicentry',
            name='playlist',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.MusicPlaylist'),
        ),
        migrations.AddField(
            model_name='musicentry',
            name='song',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Song'),
        ),
        migrations.AddField(
            model_name='album',
            name='artist',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Artist'),
        ),
    ]
