# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-05-08 19:56
from __future__ import unicode_literals

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import lablackey.db.models
import media.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('geo', '0002_auto_20170419_1223'),
    ]

    operations = [
        migrations.CreateModel(
            name='Access',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('icon', models.CharField(help_text=b'The CSS class that styles this. Also used for sorting.', max_length=16)),
                ('order', models.IntegerField(default=999)),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='CheckIn',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('datetime', models.DateTimeField(auto_now_add=True)),
                ('object_id', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'ordering': ('-datetime',),
            },
            bases=(models.Model, lablackey.db.models.JsonMixin),
        ),
        migrations.CreateModel(
            name='CheckInPoint',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='geo.Room')),
            ],
            options={
                'ordering': ('room__name',),
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=128, null=True)),
                ('url', models.CharField(blank=True, max_length=256, null=True)),
                ('short_name', models.CharField(blank=True, help_text=b'Optional. Alternative name for the calendar.', max_length=64, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('no_conflict', models.BooleanField(default=False, help_text=b'If true, this class will not raise conflict warnings for events in the same room.')),
                ('hidden', models.BooleanField(default=False, help_text=b"Hidden events won't appear on the calendar.")),
                ('allow_rsvp', models.BooleanField(default=False)),
                ('rsvp_cutoff', models.FloatField(default=0, help_text=b'Number of days before event when RSVP is cut off (eg 0.5 means "You must rsvp 12 hours before this event")')),
                ('max_rsvp', models.IntegerField(default=128)),
                ('orientation_required', models.BooleanField(default=False, help_text=b'If true, members cannot RSVP unless they have been through the orientation.')),
                ('access', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.Access')),
                ('room', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='geo.Room')),
            ],
            bases=(media.models.PhotosMixin, models.Model),
        ),
        migrations.CreateModel(
            name='EventOccurrence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start', models.DateTimeField()),
                ('end_time', models.TimeField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('publish_dt', models.DateTimeField(default=datetime.datetime.now)),
                ('name_override', models.CharField(blank=True, max_length=128, null=True)),
                ('description_override', models.TextField(blank=True, null=True)),
                ('url_override', models.CharField(blank=True, max_length=256, null=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.Event')),
            ],
            options={
                'ordering': ('start',),
            },
            bases=(media.models.PhotosMixin, models.Model),
        ),
        migrations.CreateModel(
            name='EventOwner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.Event')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model, lablackey.db.models.JsonMixin),
        ),
        migrations.CreateModel(
            name='EventRepeat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('repeat_flavor', models.CharField(choices=[(b'start-month', b'Monthly from start of month (eg, 1st, 2nd... Friday of month)'), (b'end-month', b'Monthly from end of month (eg, second to last friday of month'), (b'weekly', b'Every Week'), (b'custom', b'Custom')], max_length=16)),
                ('first_date', models.DateField()),
                ('start_time', models.TimeField()),
                ('end_time', models.TimeField()),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.Event')),
            ],
            bases=(lablackey.db.models.JsonMixin, models.Model),
        ),
        migrations.CreateModel(
            name='RSVP',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.IntegerField()),
                ('emailed', models.DateTimeField(blank=True, null=True)),
                ('quantity', models.IntegerField(default=0)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='eventoccurrence',
            name='eventrepeat',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='event.EventRepeat'),
        ),
        migrations.AddField(
            model_name='checkin',
            name='checkinpoint',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.CheckInPoint'),
        ),
        migrations.AddField(
            model_name='checkin',
            name='content_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='checkin',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
