# Generated by Django 2.0.6 on 2018-06-26 03:34

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


class Migration(migrations.Migration):

    dependencies = [
        ('View', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Bom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bomName', models.CharField(max_length=128, verbose_name='Bom名')),
                ('bomVersion', models.CharField(max_length=20, verbose_name='Bom版本')),
                ('bomDiscrib', models.CharField(default='', max_length=128, verbose_name='Bom描述')),
                ('bomContext', models.TextField(verbose_name='Bom内容')),
                ('status', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='View.DataStatus', verbose_name='状态')),
            ],
            options={
                'verbose_name': 'BOM单',
            },
        ),
        migrations.CreateModel(
            name='DataBaseLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('log_user', models.CharField(max_length=128, verbose_name='用户名')),
                ('log_time', models.DateTimeField(auto_now=True, verbose_name='访问时间')),
                ('log_table', models.CharField(default='', max_length=128, verbose_name='访问表名')),
                ('log_action', models.TextField(max_length=256, verbose_name='操作')),
            ],
            options={
                'verbose_name': '访问日志',
            },
        ),
        migrations.CreateModel(
            name='DataHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('historyTime', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('history', models.TextField(max_length=256, verbose_name='操作内容')),
                ('tableName', models.CharField(max_length=32, verbose_name='表名')),
                ('recordId', models.IntegerField(verbose_name='记录ID')),
                ('user', models.CharField(max_length=128, verbose_name='状态')),
                ('historyAction', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='View.DataStatus', verbose_name='操作')),
            ],
            options={
                'verbose_name': '履历',
            },
        ),
        migrations.CreateModel(
            name='Paper',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('paperName', models.CharField(max_length=128, verbose_name='图纸名')),
                ('paperVersion', models.CharField(max_length=20, verbose_name='图纸版本')),
                ('paperDiscrib', models.CharField(default='', max_length=128, verbose_name='图纸描述')),
                ('paperAddr', models.TextField(max_length=256, verbose_name='图纸地址')),
                ('status', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='View.DataStatus', verbose_name='状态')),
            ],
            options={
                'verbose_name': '图纸',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('productName', models.CharField(max_length=128, verbose_name='产品名')),
                ('bom', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='View.Bom', verbose_name='Bom名')),
                ('status', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='View.DataStatus', verbose_name='状态')),
            ],
            options={
                'verbose_name': '产品BOM单',
            },
        ),
        migrations.AlterUniqueTogether(
            name='paper',
            unique_together={('paperName', 'paperVersion')},
        ),
        migrations.AlterUniqueTogether(
            name='bom',
            unique_together={('bomName', 'bomVersion')},
        ),
    ]
