feat: route添加params_json字段

This commit is contained in:
caoqianming 2025-08-07 10:37:59 +08:00
parent a42d48775c
commit c7f6abf6a6
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2025-08-07 02:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mtm', '0059_material_bin_number_main'),
]
operations = [
migrations.AddField(
model_name='route',
name='params_json',
field=models.JSONField(blank=True, default=dict, verbose_name='工艺参数'),
),
]

View File

@ -383,6 +383,7 @@ class Route(CommonADModel):
materials = models.ManyToManyField(Material, verbose_name='关联辅助物料', related_name="route_materials", materials = models.ManyToManyField(Material, verbose_name='关联辅助物料', related_name="route_materials",
through="mtm.routemat", blank=True) through="mtm.routemat", blank=True)
parent = models.ForeignKey('self', verbose_name='上级路线', on_delete=models.CASCADE, null=True, blank=True) parent = models.ForeignKey('self', verbose_name='上级路线', on_delete=models.CASCADE, null=True, blank=True)
params_json = models.JSONField('工艺参数', default=dict, blank=True)
def __str__(self): def __str__(self):
x = "" x = ""