# Generated by Django 2.0.5 on 2019-11-29 08:26

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Data',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now_add=True, verbose_name='Дата')),
                ('change_msg', models.TextField(blank=True, max_length=500, verbose_name='Действие')),
                ('action', models.TextField(blank=True, max_length=500, verbose_name='Тип действия')),
                ('result', models.TextField(blank=True, max_length=500, verbose_name='Результат')),
            ],
        ),
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=200, verbose_name='Название')),
                ('user', models.ManyToManyField(related_name='domain_user', to=settings.AUTH_USER_MODEL, verbose_name='Пользователи')),
            ],
        ),
        migrations.CreateModel(
            name='Items',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=200, verbose_name='Название')),
                ('value', models.IntegerField(blank=True, null=True, verbose_name='Значение')),
                ('source', models.CharField(blank=True, max_length=200, verbose_name='Источник')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author', to=settings.AUTH_USER_MODEL, verbose_name='Пользователи')),
                ('domain', models.ForeignKey(blank=True, help_text='Укажите область', on_delete=django.db.models.deletion.CASCADE, to='dataprocessing.Domain', verbose_name='Область знаний')),
            ],
        ),
        migrations.AddField(
            model_name='data',
            name='item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='item_list', to='dataprocessing.Items', verbose_name='Сущности'),
        ),
        migrations.AddField(
            model_name='data',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='data_user', to=settings.AUTH_USER_MODEL, verbose_name='Пользователи'),
        ),
    ]
