# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2017-12-09 20:38
from __future__ import unicode_literals

import ckeditor_uploader.fields
from django.db import migrations, models
import django.db.models.deletion
import partners.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('title', models.CharField(max_length=255, verbose_name='Филлиал')),
                ('info', ckeditor_uploader.fields.RichTextUploadingField(blank=True, default='', null=True, verbose_name='Информация о поставщике')),
            ],
            options={
                'verbose_name_plural': 'Филлиалы',
                'verbose_name': 'Филлиал',
            },
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('title', models.CharField(max_length=255, verbose_name='Заголовок')),
                ('file', models.FileField(upload_to=partners.models.set_file_name, verbose_name='Файл')),
            ],
            options={
                'verbose_name_plural': 'Prices',
                'verbose_name': 'Price',
            },
        ),
        migrations.CreateModel(
            name='Provider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('title', models.CharField(max_length=255, verbose_name='Поставщик')),
            ],
            options={
                'verbose_name_plural': 'Поставщики',
                'verbose_name': 'Поставщик',
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('title', models.CharField(max_length=255, verbose_name='Region')),
            ],
            options={
                'verbose_name_plural': 'Regions',
                'verbose_name': 'Region',
            },
        ),
        migrations.AddField(
            model_name='file',
            name='provider',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='partners.Provider', verbose_name='Поставщик'),
        ),
        migrations.AddField(
            model_name='branch',
            name='parent_provider',
            field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='partners.Provider', verbose_name='Поставщик'),
        ),
        migrations.AddField(
            model_name='branch',
            name='region_for_work',
            field=models.ManyToManyField(default=None, related_name='Regions', to='partners.Region', verbose_name='Область'),
        ),
    ]
