# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-23 16:45
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Call',
            fields=[
                ('sid', models.CharField(editable=False, max_length=34, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('call_request', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calls', to='call_requests.CallRequest')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calls', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Conference',
            fields=[
                ('sid', models.CharField(editable=False, max_length=34, primary_key=True, serialize=False)),
                ('friendly_name', models.CharField(max_length=50)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('call_request', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='call_requests.CallRequest')),
            ],
        ),
        migrations.CreateModel(
            name='ConferenceLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action', models.CharField(choices=[('participant-join', 'Participant Joined'), ('participant-leave', 'Participant Left'), ('conference-start', 'Conference Started'), ('conference-end', 'Conference Ended')], max_length=20)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('conference', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='conferences.Conference')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='conference_logs', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Conference Log',
                'verbose_name_plural': 'Conference Logs',
            },
        ),
    ]
