# Generated by Django 3.0.4 on 2020-07-29 07:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('event_name', models.CharField(max_length=200)),
                ('event_time', models.DateTimeField()),
                ('status', models.CharField(choices=[('CLOSED', 'Closed'), ('OPEN', 'Open'), ('PENDING', 'Pending')], default='OPEN', max_length=10)),
                ('message', models.TextField(blank=True, null=True)),
                ('photo', models.ImageField(default='no_image.png', upload_to=invitations.models.user_path)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'Event',
            },
        ),
        migrations.CreateModel(
            name='Invitation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attendance', models.CharField(choices=[('N', 'No'), ('Y', 'Yes'), ('Waiting for a response', 'Unknown')], default='Waiting for a response', max_length=25)),
                ('is_shown', models.BooleanField(default=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sendTo', to='invitations.Event')),
                ('relationship', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invitations', to='accounts.Relationship')),
            ],
            options={
                'db_table': 'Invitation',
            },
        ),
    ]
