# Generated by Django 2.0.4 on 2018-05-21 19:50

from django.db import migrations, models
import django.utils.timezone
import telephony.services.call_event_data


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CallEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('call_id', models.PositiveIntegerField(default=telephony.services.call_event_data.get_new_call_id)),
                ('event_type', models.CharField(choices=[('end', 'End'), ('start', 'Start')], default='start', max_length=5)),
                ('source', models.CharField(blank=True, max_length=11, null=True)),
                ('destination', models.CharField(blank=True, max_length=11, null=True)),
                ('created', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'verbose_name': 'Call Event',
                'verbose_name_plural': 'Call Events',
            },
        ),
        migrations.AddIndex(
            model_name='callevent',
            index=models.Index(fields=['call_id', 'event_type'], name='telephony_c_call_id_093c3a_idx'),
        ),
        migrations.AddIndex(
            model_name='callevent',
            index=models.Index(fields=['call_id', 'event_type', 'source', 'created'], name='telephony_c_call_id_e1b874_idx'),
        ),
    ]
