# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-02-26 00:20
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AsteriskCDR',
            fields=[
                ('calldate', models.DateTimeField(default='0000-00-00 00:00:00', primary_key=True, serialize=False)),
                ('clid', models.CharField(default='', max_length=80)),
                ('src', models.CharField(default='', max_length=80)),
                ('dst', models.CharField(default='', max_length=80)),
                ('dcontext', models.CharField(default='', max_length=80)),
                ('channel', models.CharField(default='', max_length=80)),
                ('dstchannel', models.CharField(default='', max_length=80)),
                ('lastapp', models.CharField(default='', max_length=80)),
                ('lastdata', models.CharField(default='', max_length=80)),
                ('duration', models.IntegerField(default=0)),
                ('billsec', models.IntegerField(default=0)),
                ('start', models.DateTimeField(blank=True, default=None, null=True)),
                ('answer', models.DateTimeField(blank=True, default=None, null=True)),
                ('end', models.DateTimeField(blank=True, default=None, null=True)),
                ('disposition', models.CharField(
                    choices=[('NO ANSWER', 'No answer'), ('FAILED', 'Failed'), ('BUSY', 'Busy'),
                             ('ANSWERED', 'Answered'), ('UNKNOWN', 'Unknown')], default='', max_length=45)),
                ('amaflags', models.IntegerField(default=0)),
                ('accountcode', models.CharField(default='', max_length=20)),
                ('userfield', models.CharField(default='', max_length=255)),
                ('uniqueid', models.CharField(default='', max_length=32)),
            ],
            options={
                'db_table': 'cdr',
                'ordering': ['-calldate'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='SMSModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('when', models.DateTimeField(auto_now_add=True)),
                ('who', models.CharField(max_length=32)),
                ('dev', models.CharField(max_length=20)),
                ('text', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name': 'SMS',
                'verbose_name_plural': 'SMS',
                'db_table': 'sms',
                'ordering': ['-when'],
                'permissions': (('can_view_sms', 'Can view sms'),),
            },
        ),
        migrations.CreateModel(
            name='SMSOut',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('when', models.DateTimeField(auto_now_add=True, verbose_name='When')),
                ('dst', models.CharField(max_length=16, verbose_name='Telephone')),
                ('text', models.CharField(max_length=255, verbose_name='Text')),
                ('status',
                 models.CharField(choices=[('nw', 'New'), ('st', 'Sent'), ('fd', 'Failed')], default='nw', max_length=2,
                                  verbose_name='Status')),
            ],
            options={
                'verbose_name': 'Out SMS',
                'verbose_name_plural': 'Out SMS',
                'db_table': 'out_sms',
                'permissions': (('can_view_sms', 'Can view sms'), ('can_send_sms', 'Can send sms')),
            },
        ),
    ]
