# -*- coding: utf-8 -*-
# Generated by Django 1.9c1 on 2015-11-26 11:08
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Building',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='\u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f')),
                ('status', models.PositiveSmallIntegerField(choices=[(0, '\u041d\u0435 \u0430\u043a\u0442\u0438\u0432e\u043d'), (1, '\u0410\u043a\u0442\u0438\u0432\u0435\u043d')], default=1, verbose_name='\u0421\u0442\u0430\u0442\u0443\u0441')),
                ('name', models.CharField(max_length=255, verbose_name='\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435')),
            ],
            options={
                'verbose_name': 'Building',
                'verbose_name_plural': 'Buildings',
            },
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='\u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f')),
                ('status', models.PositiveSmallIntegerField(choices=[(0, '\u041d\u0435 \u0430\u043a\u0442\u0438\u0432e\u043d'), (1, '\u0410\u043a\u0442\u0438\u0432\u0435\u043d')], default=1, verbose_name='\u0421\u0442\u0430\u0442\u0443\u0441')),
                ('name', models.CharField(max_length=255, verbose_name='\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435')),
                ('building', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Building', verbose_name='Building')),
            ],
            options={
                'verbose_name': 'Company',
                'verbose_name_plural': 'Companies',
            },
        ),
        migrations.CreateModel(
            name='CompanyPhone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='\u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f')),
                ('phone', models.CharField(max_length=20, verbose_name='Phone')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='Company')),
            ],
            options={
                'verbose_name': 'Phone',
                'verbose_name_plural': 'Phones',
            },
        ),
        migrations.CreateModel(
            name='CompanyRubric',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='\u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='Company')),
            ],
            options={
                'verbose_name': 'Company rubric',
                'verbose_name_plural': 'Company rubrics',
            },
        ),
        migrations.CreateModel(
            name='Rubric',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='\u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f')),
                ('status', models.PositiveSmallIntegerField(choices=[(0, '\u041d\u0435 \u0430\u043a\u0442\u0438\u0432e\u043d'), (1, '\u0410\u043a\u0442\u0438\u0432\u0435\u043d')], default=1, verbose_name='\u0421\u0442\u0430\u0442\u0443\u0441')),
                ('name', models.CharField(max_length=255, verbose_name='\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435')),
                ('parent', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.Rubric')),
            ],
            options={
                'verbose_name': 'Rubric',
                'verbose_name_plural': 'Rubrics',
            },
        ),
        migrations.AddField(
            model_name='companyrubric',
            name='rubric',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Rubric', verbose_name='Rubric'),
        ),
    ]
