# Generated by Django 3.2 on 2021-04-16 18:23

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('accounts', models.ManyToManyField(to='film_base.Account')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='g_account', to='film_base.account')),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('finished_at', models.DateTimeField(auto_now=True)),
                ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='film_base.movie')),
                ('participants', models.ManyToManyField(to='film_base.Account')),
                ('referenced_account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='s_account', to='film_base.account')),
                ('referenced_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='film_base.group')),
            ],
        ),
        migrations.AddField(
            model_name='account',
            name='favorite_movies',
            field=models.ManyToManyField(to='film_base.Movie'),
        ),
        migrations.AddField(
            model_name='account',
            name='followers',
            field=models.ManyToManyField(to='film_base.Account'),
        ),
        migrations.AddField(
            model_name='account',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
