# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-30 18:19
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import rfnumplan.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='NumberingPlan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='e.g. rossviaz 4xx', max_length=128, verbose_name='numbering plan')),
                ('prefix', models.PositiveIntegerField(help_text='e.g. 7', verbose_name='prefix')),
                ('plan_uri', models.URLField(blank=True, verbose_name='url')),
                ('loaded', models.BooleanField(default=False, verbose_name='loaded')),
                ('last_modified', models.DateTimeField(blank=True, null=True, verbose_name='last modified')),
            ],
            options={
                'verbose_name': 'numbering plan',
                'verbose_name_plural': 'numbering plans',
                'ordering': ['name'],
            },
            bases=(rfnumplan.models.ModelDiffMixin, models.Model),
        ),
        migrations.CreateModel(
            name='NumberingPlanRange',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prefix', models.PositiveIntegerField(help_text='e.g. 495', verbose_name='prefix')),
                ('range_start', models.PositiveIntegerField(help_text='`1`-prefixed range start', verbose_name='range start')),
                ('range_end', models.PositiveIntegerField(help_text='`1`-prefixed range end', verbose_name='range end')),
                ('range_capacity', models.PositiveIntegerField(verbose_name='range capacity')),
                ('numbering_plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rfnumplan.NumberingPlan', verbose_name='numbering plan')),
            ],
            options={
                'verbose_name': 'numbering plan range',
                'verbose_name_plural': 'numbering plan ranges',
                'ordering': ['numbering_plan_id'],
            },
        ),
        migrations.CreateModel(
            name='Operator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='operator name')),
            ],
            options={
                'verbose_name': 'operator',
                'verbose_name_plural': 'operators',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='region name')),
            ],
            options={
                'verbose_name': 'region',
                'verbose_name_plural': 'regions',
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='numberingplanrange',
            name='operator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rfnumplan.Operator', verbose_name='operator'),
        ),
        migrations.AddField(
            model_name='numberingplanrange',
            name='region',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rfnumplan.Region', verbose_name='region'),
        ),
    ]
