From c7f6abf6a6ceca26f0a6cf458c583f049f03f57e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 7 Aug 2025 10:37:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20route=E6=B7=BB=E5=8A=A0params=5Fjson?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mtm/migrations/0060_route_params_json.py | 18 ++++++++++++++++++ apps/mtm/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 apps/mtm/migrations/0060_route_params_json.py diff --git a/apps/mtm/migrations/0060_route_params_json.py b/apps/mtm/migrations/0060_route_params_json.py new file mode 100644 index 00000000..ecb34d48 --- /dev/null +++ b/apps/mtm/migrations/0060_route_params_json.py @@ -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='工艺参数'), + ), + ] diff --git a/apps/mtm/models.py b/apps/mtm/models.py index 7f7c0bc3..00339e8d 100644 --- a/apps/mtm/models.py +++ b/apps/mtm/models.py @@ -383,6 +383,7 @@ class Route(CommonADModel): materials = models.ManyToManyField(Material, verbose_name='关联辅助物料', related_name="route_materials", through="mtm.routemat", 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): x = ""