feat: 增加input_materials 字段
This commit is contained in:
parent
1537da6bda
commit
fe117d05be
|
@ -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='直接材料'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -53,6 +53,7 @@ class Mgroup(CommonBModel):
|
||||||
name = models.CharField('名称', max_length=50)
|
name = models.CharField('名称', max_length=50)
|
||||||
cate = models.CharField('分类', max_length=50, default='section', help_text='section/other') # section是工段
|
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)
|
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:
|
class Meta:
|
||||||
verbose_name = '测点集'
|
verbose_name = '测点集'
|
||||||
|
|
Loading…
Reference in New Issue