feat: 修改batchst data默认为dict

This commit is contained in:
caoqianming 2025-07-17 10:20:48 +08:00
parent e2a8da9eb4
commit 7fd47c2a97
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2025-07-17 02:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wpm', '0119_mlogb_route'),
]
operations = [
migrations.AlterField(
model_name='batchst',
name='data',
field=models.JSONField(blank=True, default=dict, verbose_name='数据'),
),
]

View File

@ -648,7 +648,7 @@ class BatchSt(BaseModel):
version = models.IntegerField("版本号", default=1, db_index=True)
first_time = models.DateTimeField("首次操作时间", null=True, blank=True)
last_time = models.DateTimeField("最后操作时间", null=True, blank=True)
data = models.JSONField("数据", default=list, blank=True)
data = models.JSONField("数据", default=dict, blank=True)
material_start = models.ForeignKey(Material, verbose_name="起始物料", on_delete=models.SET_NULL, null=True, blank=True)
mio = models.ForeignKey("inm.mio", verbose_name="由何出入库记录创建", on_delete=models.CASCADE, null=True, blank=True)
mioitem = models.ForeignKey("inm.mioitem", verbose_name="由何出入库记录明细创建", on_delete=models.CASCADE, null=True, blank=True)