# Generated by Django 2.1.4 on 2018-12-21 09:22

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields


class Migration(migrations.Migration):

    dependencies = [
        ('pyfb_company', '0004_auto_20181210_1138'),
        ('pyfb_rating', '0003_auto_20181221_0855'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomerRcAllocation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('tech_prefix', models.CharField(default='', max_length=7, verbose_name='technical prefix')),
                ('priority', models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7')], help_text='Priority order, 1 is the higher priority and 3 the lower one. Correct values are : 1 to 7 !.', verbose_name='priority')),
                ('discount', models.DecimalField(decimal_places=2, default=0, help_text='ratecard discount. For 10% discount, enter 10 !', max_digits=3, verbose_name='discount')),
                ('allow_negative_margin', models.BooleanField(default=False, verbose_name='Allow calls with negative margin')),
                ('description', models.CharField(blank=True, max_length=30, verbose_name='Comment')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='pyfb_company.Customer', verbose_name='customer')),
            ],
            options={
                'verbose_name_plural': 'Customer ratecard Allocations',
                'db_table': 'pyfb_rating_cr_allocation',
                'verbose_name': 'Customer Ratecard Allocation',
                'ordering': ('customer', 'priority', 'ratecard'),
            },
        ),
        migrations.AlterField(
            model_name='callernumlist',
            name='destination',
            field=models.ManyToManyField(to='pyfb_direction.Destination', verbose_name='destination list'),
        ),
        migrations.AlterField(
            model_name='customerratecard',
            name='name',
            field=models.CharField(max_length=128, unique=True, verbose_name='ratecard name'),
        ),
        migrations.AlterField(
            model_name='customerratecard',
            name='rc_type',
            field=models.CharField(choices=[('pstn', 'Outbound calls'), ('did', 'DID - Inbound calls'), ('pstn2did', 'Outbound calls to internal DID'), ('emergency', 'Emergency calls')], default='pstn', help_text='Select the right ratecard regarding the type of calls. Default is PSTN', max_length=10, verbose_name='type of ratecards'),
        ),
        migrations.AlterField(
            model_name='providerratecard',
            name='name',
            field=models.CharField(max_length=128, unique=True, verbose_name='ratecard name'),
        ),
        migrations.AlterField(
            model_name='providerratecard',
            name='rc_type',
            field=models.CharField(choices=[('pstn', 'Outbound calls'), ('did', 'DID - Inbound calls'), ('pstn2did', 'Outbound calls to internal DID'), ('emergency', 'Emergency calls')], default='pstn', help_text='Select the right ratecard regarding the type of calls. Default is PSTN', max_length=10, verbose_name='type of ratecards'),
        ),
        migrations.AddField(
            model_name='customerrcallocation',
            name='ratecard',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customerratecards', to='pyfb_rating.CustomerRatecard', verbose_name='ratecard'),
        ),
    ]
