# Generated by Django 2.2.4 on 2021-06-24 21:17

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Beat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('price', models.IntegerField()),
                ('category', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('uploaded_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='beats', to='login_project_app.Usuario')),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('beat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='likes', to='sell_ya_beat_app.Beat')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='likes', to='login_project_app.Usuario')),
            ],
        ),
        migrations.AddField(
            model_name='beat',
            name='users_who_liked',
            field=models.ManyToManyField(through='sell_ya_beat_app.Like', to='login_project_app.Usuario'),
        ),
    ]
