# Generated by Django 3.2.4 on 2021-06-26 07:19

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(max_length=64, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Gift',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=64, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('likes', models.IntegerField(default=0)),
                ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('gender', models.CharField(max_length=64, null=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gift_category', to='secretsanta.category')),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=64, null=True)),
                ('number_of_participants', models.IntegerField(default=0)),
                ('exchange_date', models.DateTimeField()),
                ('note', models.TextField(blank=True, null=True)),
                ('budget', models.DecimalField(decimal_places=2, max_digits=10)),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='organiser',
            field=models.BooleanField(default=False),
        ),
        migrations.CreateModel(
            name='WishList',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gifts', models.IntegerField(default=0)),
                ('note', models.TextField(blank=True, null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('giftee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wishlist_giftee', to=settings.AUTH_USER_MODEL)),
                ('gifter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wishlist_gifter', to=settings.AUTH_USER_MODEL)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wishlist_group', to='secretsanta.group')),
                ('interest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interest_category', to='secretsanta.category')),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.TextField(blank=True, null=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('giftee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='message_giftee', to=settings.AUTH_USER_MODEL)),
                ('gifter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='message_gifter', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gift', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gift_like', to='secretsanta.gift')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_like', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='group',
            name='organiser',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_organizer', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='user',
            name='group',
            field=models.ForeignKey(default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_group', to='secretsanta.group'),
        ),
    ]
