# Generated by Django 2.2 on 2019-04-18 11:52

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


class Migration(migrations.Migration):

    dependencies = [
        ('orders', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('devices', '0004_auto_20190416_0216'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='device',
            options={'verbose_name': '配件列表', 'verbose_name_plural': '配件列表'},
        ),
        migrations.AlterModelOptions(
            name='devicetype',
            options={'verbose_name': '配件类型', 'verbose_name_plural': '配件类型'},
        ),
        migrations.AlterField(
            model_name='device',
            name='create_time',
            field=models.DateTimeField(default=datetime.datetime(2019, 4, 18, 11, 52, 27, 136468), verbose_name='创建时间'),
        ),
        migrations.AlterField(
            model_name='device',
            name='name',
            field=models.CharField(max_length=254, verbose_name='配件名称'),
        ),
        migrations.AlterField(
            model_name='device',
            name='num',
            field=models.IntegerField(default=0, verbose_name='配件数量'),
        ),
        migrations.AlterField(
            model_name='devicetype',
            name='create_time',
            field=models.DateTimeField(default=datetime.datetime(2019, 4, 18, 11, 52, 27, 135833), verbose_name='创建时间'),
        ),
        migrations.AlterField(
            model_name='furnituretype',
            name='create_time',
            field=models.DateTimeField(default=datetime.datetime(2019, 4, 18, 11, 52, 27, 135151), verbose_name='创建时间'),
        ),
        migrations.CreateModel(
            name='DeviceUse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=datetime.datetime(2019, 4, 18, 11, 52, 27, 137072), verbose_name='使用日期')),
                ('create_date', models.DateField(auto_now=True, verbose_name='使用日期')),
                ('num', models.IntegerField(verbose_name='使用数量')),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='devices.Device')),
                ('order', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Order', verbose_name='关联订单')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='使用人')),
            ],
            options={
                'verbose_name': '配件使用记录',
                'verbose_name_plural': '配件使用记录',
            },
        ),
    ]
