# Generated by Django 3.2.12 on 2023-07-04 03:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('mtm', '0004_mgroup_test_materials'),
        ('wpm', '0003_auto_20230628_0859'),
        ('enm', '0002_auto_20230630_1208'),
    ]

    operations = [
        migrations.AddField(
            model_name='mpointstat',
            name='material',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mtm.material', verbose_name='计量的物料'),
        ),
        migrations.AlterField(
            model_name='mpointstat',
            name='mpoint',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='enm.mpoint', verbose_name='关联测点'),
        ),
        migrations.CreateModel(
            name='EnStat',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('type', models.CharField(default='hour', help_text='year_s/month_s/day_s/sflog/hour', max_length=50, verbose_name='统计维度')),
                ('year_s', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='班年')),
                ('month_s', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='班月')),
                ('day_s', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='班日')),
                ('total_production', models.FloatField(blank=True, help_text='t', null=True, verbose_name='总产量')),
                ('elec_consume', models.FloatField(blank=True, help_text='kw·h', null=True, verbose_name='总电耗')),
                ('production_cost_unit', models.FloatField(blank=True, help_text='y/t', null=True, verbose_name='单位产品成本')),
                ('elec_consume_unit', models.FloatField(blank=True, help_text='kw·h/t', null=True, verbose_name='单位产品分布电耗')),
                ('celec_consume_unit', models.FloatField(blank=True, help_text='kw·h/t', null=True, verbose_name='单位产品综合电耗')),
                ('coal_consume_unit', models.FloatField(blank=True, help_text='kgce/t', null=True, verbose_name='单位产品标煤耗')),
                ('cen_consume_unit', models.FloatField(blank=True, help_text='kgce/t', null=True, verbose_name='单位产品综合能耗')),
                ('production_hour', models.FloatField(blank=True, help_text='t/h', null=True, verbose_name='台时产量')),
                ('run_hour', models.FloatField(blank=True, help_text='h', null=True, verbose_name='运转时长')),
                ('run_rate', models.FloatField(blank=True, help_text='%', null=True, verbose_name='运转率')),
                ('mgroup', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mtm.mgroup', verbose_name='关联工段')),
                ('sflog', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wpm.sflog', verbose_name='关联值班记录')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
