feat: em增加字段
This commit is contained in:
parent
8a96755c22
commit
94f87c9a34
|
@ -0,0 +1,30 @@
|
|||
# Generated by Django 3.2.12 on 2023-09-06 06:31
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('em', '0004_auto_20230906_1111'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='echeckrecord',
|
||||
name='check_organization',
|
||||
field=models.CharField(default='1', max_length=10, verbose_name='校准/检定机构'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='equipment',
|
||||
name='number_factory',
|
||||
field=models.CharField(default='1', max_length=50, verbose_name='出厂编号'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='echeckrecord',
|
||||
name='check_date',
|
||||
field=models.DateField(verbose_name='校准/检定日期'),
|
||||
),
|
||||
]
|
|
@ -43,6 +43,7 @@ class Equipment(CommonBModel):
|
|||
# )
|
||||
type = models.PositiveSmallIntegerField('类型', choices=type_choices, default=10)
|
||||
name = models.CharField('设备名称', max_length=50)
|
||||
number_factory = models.CharField('出厂编号', max_length=50)
|
||||
number = models.CharField('设备编号', max_length=50, unique=True)
|
||||
model = models.CharField('规格型号', max_length=60, default='', blank=True)
|
||||
factory = models.CharField('生产厂', max_length=50, default='', blank=True)
|
||||
|
@ -86,6 +87,7 @@ class EcheckRecord(CommonADModel):
|
|||
(20, '异常')
|
||||
)
|
||||
equipment = models.ForeignKey(Equipment, verbose_name='关联设备', on_delete=models.CASCADE)
|
||||
check_date = models.DateField('校准/鉴定日期')
|
||||
check_organization = models.CharField('校准/检定机构', max_length=10)
|
||||
check_date = models.DateField('校准/检定日期')
|
||||
note = models.TextField('备注', null=True, blank=True)
|
||||
result = models.PositiveSmallIntegerField('结果', default=10, choices=CHECK_CHOICES, help_text=str(CHECK_CHOICES))
|
Loading…
Reference in New Issue