feat: 增加input_materials 字段

This commit is contained in:
caoqianming 2023-07-04 10:07:55 +08:00
parent 1537da6bda
commit fe117d05be
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2023-07-04 01:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mtm', '0002_auto_20230626_1559'),
]
operations = [
migrations.AddField(
model_name='mgroup',
name='input_materials',
field=models.JSONField(blank=True, default=list, help_text='material的ID列表', verbose_name='直接材料'),
),
]

View File

@ -53,6 +53,7 @@ class Mgroup(CommonBModel):
name = models.CharField('名称', max_length=50)
cate = models.CharField('分类', max_length=50, default='section', help_text='section/other') # section是工段
product = models.ForeignKey(Material, verbose_name='主要产品', on_delete=models.SET_NULL, null=True, blank=True)
input_materials = models.JSONField('直接材料', default=list, blank=True, help_text='material的ID列表')
class Meta:
verbose_name = '测点集'