# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2019-02-25 15:03
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import everyday.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BTS',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ECP', models.CharField(max_length=20)),
                ('UCN', models.CharField(max_length=30)),
                ('adress', models.CharField(max_length=200)),
                ('dn', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ['adress'],
            },
        ),
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dn', models.CharField(default='', max_length=8, unique=True)),
                ('model', models.CharField(default='', max_length=20)),
                ('driver', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Contra',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('edrpou', models.IntegerField()),
                ('name', models.CharField(max_length=80)),
                ('address', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Dept',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('user', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Division',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('user', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DTE',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(default=everyday.models.yesterday)),
                ('nn', models.IntegerField()),
                ('rezult', models.CharField(default='\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e', max_length=10)),
                ('elapsed_time', models.CharField(max_length=5)),
                ('note', models.CharField(blank=True, max_length=200, null=True)),
                ('adress', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='everyday.BTS')),
                ('car', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='everyday.Car')),
                ('dept', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='everyday.Dept')),
                ('division', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='everyday.Division')),
            ],
        ),
        migrations.CreateModel(
            name='personel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(max_length=50)),
                ('Position', models.CharField(default='SOME STRING', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='report',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Work',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('dept', models.CharField(default='', max_length=20)),
                ('user', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='dte',
            name='executor',
            field=models.ManyToManyField(to='everyday.personel'),
        ),
        migrations.AddField(
            model_name='dte',
            name='work',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='everyday.Work'),
        ),
        migrations.AddField(
            model_name='bts',
            name='contra',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='everyday.Contra'),
        ),
    ]
