# Generated by Django 2.2 on 2020-04-20 02:58

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('basic', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='Material',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attach', models.FileField(blank=True, null=True, upload_to='attachment/%Y/%m/%d', verbose_name='附件')),
                ('check', models.BooleanField(choices=[(True, '已审核'), (False, '未审核')], default=False, verbose_name='是否审核')),
                ('create_date', models.DateTimeField(auto_now_add=True, null=True, verbose_name='创建时间')),
                ('modify_date', models.DateTimeField(auto_now=True, null=True, verbose_name='修改时间')),
                ('description', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注')),
                ('amount', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='数量')),
                ('classification', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='material_classifications', to='basic.Wordbook', verbose_name='类型')),
                ('name', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='material_names', to='basic.Wordbook', verbose_name='名称')),
                ('warehouse', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic.Warehouse', verbose_name='所在库房')),
            ],
            options={
                'verbose_name': '材料表',
                'verbose_name_plural': '材料表',
            },
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attach', models.FileField(blank=True, null=True, upload_to='attachment/%Y/%m/%d', verbose_name='附件')),
                ('check', models.BooleanField(choices=[(True, '已审核'), (False, '未审核')], default=False, verbose_name='是否审核')),
                ('create_date', models.DateTimeField(auto_now_add=True, null=True, verbose_name='创建时间')),
                ('modify_date', models.DateTimeField(auto_now=True, null=True, verbose_name='修改时间')),
                ('description', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注')),
                ('sn', models.CharField(db_index=True, max_length=100, verbose_name='设备编码')),
                ('good', models.IntegerField(choices=[(1, '故障'), (5, '良好')], default=5, verbose_name='设备状态')),
                ('value', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='价格')),
                ('asset', models.CharField(blank=True, max_length=100, null=True, verbose_name='资产编码')),
                ('sap', models.CharField(blank=True, max_length=100, null=True, verbose_name='SAP')),
                ('status', models.IntegerField(choices=[(1, '在库中'), (2, '已出库')], default=1, verbose_name='状态')),
                ('location', models.CharField(blank=True, max_length=50, null=True, verbose_name='位置')),
                ('brand', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_brands', to='basic.Wordbook', verbose_name='名称')),
                ('classification', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_classifications', to='basic.Wordbook', verbose_name='类型')),
                ('model', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='device_models', to='basic.Wordbook', verbose_name='型号')),
                ('warehouse', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic.Warehouse', verbose_name='所在库房')),
            ],
            options={
                'verbose_name': '设备表',
                'verbose_name_plural': '设备表',
            },
        ),
    ]
