# Generated by Django 2.2.6 on 2020-05-07 16:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Entity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Param',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(default='', max_length=255, verbose_name='Код')),
                ('name', models.CharField(default='', max_length=255, verbose_name='Название')),
                ('value_type', models.CharField(choices=[('number', 'Число'), ('text', 'Строка'), ('date', 'Дата'), ('boolean', 'Булево')], default='number', max_length=10, verbose_name='Формат значения')),
                ('value', models.CharField(blank=True, max_length=2000, null=True, verbose_name='Значение')),
                ('active', models.BooleanField(default=True, verbose_name='Статус активности')),
                ('entity', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='params', to='common.Entity', verbose_name='Сущность')),
            ],
            options={
                'verbose_name': 'Дополнительный параметр',
                'verbose_name_plural': 'Дополнительные параметры',
                'db_table': 'param',
            },
        ),
    ]
