# Generated by Django 3.2.12 on 2023-11-03 08:20

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('qm', '0009_auto_20231102_1758'),
    ]

    operations = [
        migrations.AddField(
            model_name='testitem',
            name='number',
            field=models.CharField(blank=True, default='', max_length=20, verbose_name='编号'),
        ),
        migrations.CreateModel(
            name='Ptest',
            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='删除标记')),
                ('test_date', models.DateField(verbose_name='实验日期')),
                ('sample_number', models.CharField(max_length=20, verbose_name='样品编号')),
                ('sample_count', models.PositiveIntegerField(blank=True, null=True, verbose_name='样品数量')),
                ('sample_density', models.FloatField(blank=True, null=True, verbose_name='样品密度')),
                ('specification', models.CharField(blank=True, max_length=20, null=True, verbose_name='型号规格')),
                ('equip_state', models.CharField(choices=[('R', '正常'), ('T', '异常')], default='R', help_text=[('R', '正常'), ('T', '异常')], max_length=10, verbose_name='仪器状态')),
                ('note', models.TextField(blank=True, default='', verbose_name='备注')),
                ('val_hd', models.FloatField(blank=True, help_text='mm', null=True, verbose_name='厚度')),
                ('val_zsl', models.FloatField(blank=True, help_text='589nm', null=True, verbose_name='折射率')),
                ('val_tgl', models.FloatField(blank=True, help_text='550nm', null=True, verbose_name='透过率')),
                ('val_ts', models.FloatField(blank=True, help_text='℃', null=True, verbose_name='Ts')),
                ('val_tg', models.FloatField(blank=True, help_text='℃', null=True, verbose_name='Tg')),
                ('val_tf', models.FloatField(blank=True, help_text='℃', null=True, verbose_name='Tf')),
                ('val_xj', models.CharField(choices=[('S', '析晶'), ('R', '不析晶'), ('θ', '未化')], default='S', help_text=[('S', '析晶'), ('R', '不析晶'), ('θ', '未化')], max_length=10, verbose_name='析晶')),
                ('val_pzxs', models.FloatField(blank=True, help_text='30-300℃', null=True, verbose_name='膨胀系数')),
                ('val_zgwd', models.FloatField(blank=True, null=True, verbose_name='升至最高温度')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ptest_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('test_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='检验员')),
                ('testitem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='qm.testitem', verbose_name='测试项目')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ptest_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
