# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-10-08 22:01
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Album',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('rating', models.FloatField(default=0, editable=False)),
                ('numOfRatings', models.IntegerField(default=0, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('image', models.URLField()),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'artists',
            },
        ),
        migrations.CreateModel(
            name='Audio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('title', models.CharField(max_length=40)),
                ('audioDownload', models.URLField()),
                ('audioPlay', models.URLField()),
                ('playCount', models.IntegerField(default=0, editable=False)),
                ('downloadsCount', models.IntegerField(default=0, editable=False)),
                ('rating', models.FloatField(default=0, editable=False)),
                ('numOfRatings', models.IntegerField(default=0, editable=False)),
                ('uploadDate', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('albums', models.ManyToManyField(related_name='audios', to='sonidosLibresApp.Album')),
                ('artists', models.ManyToManyField(related_name='audios', to='sonidosLibresApp.Artist')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('image', models.URLField()),
            ],
            options={
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Commentary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('commentary', models.TextField()),
                ('date', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('audio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sonidosLibresApp.Audio')),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'commentaries',
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='audio',
            name='categories',
            field=models.ManyToManyField(related_name='audios', to='sonidosLibresApp.Category'),
        ),
        migrations.AddField(
            model_name='album',
            name='artists',
            field=models.ManyToManyField(related_name='albums', to='sonidosLibresApp.Artist'),
        ),
        migrations.AddField(
            model_name='album',
            name='categories',
            field=models.ManyToManyField(related_name='albums', to='sonidosLibresApp.Category'),
        ),
    ]
