feat: equip增加tags字段
This commit is contained in:
parent
318a39c948
commit
61801784fc
|
@ -10,11 +10,6 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='equipment',
|
||||
name='cate',
|
||||
field=models.CharField(blank=True, default='', max_length=20, verbose_name='设备分类'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='equipment',
|
||||
name='coordinates',
|
||||
|
@ -23,11 +18,13 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='equipment',
|
||||
name='parameter_json',
|
||||
field=models.JSONField(blank=True, default=dict, verbose_name='技术参数'),
|
||||
field=models.JSONField(
|
||||
blank=True, default=dict, verbose_name='技术参数'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='equipment',
|
||||
name='type',
|
||||
field=models.PositiveSmallIntegerField(choices=[(10, '生产设备'), (20, '计量设备'), (30, '治理设备')], default=10, verbose_name='类型'),
|
||||
field=models.PositiveSmallIntegerField(
|
||||
choices=[(10, '生产设备'), (20, '计量设备'), (30, '治理设备')], default=10, verbose_name='类型'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 3.2.12 on 2024-01-19 03:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('em', '0010_auto_20240110_1232'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='equipment',
|
||||
name='tags',
|
||||
field=models.JSONField(
|
||||
default=list, null=True, verbose_name='设备标签'),
|
||||
),
|
||||
]
|
|
@ -44,13 +44,13 @@ class Equipment(CommonBModel):
|
|||
# (1, '专用'),
|
||||
# (2, '公用'),
|
||||
# )
|
||||
cate_list_10 = ['生产设备', '输送设备']
|
||||
cate_list_20 = ['雾炮', '干雾', '除尘器', '环卫车', '洗车台']
|
||||
tags_list_10 = ['生产设备', '输送设备']
|
||||
tags_list_20 = ['雾炮', '干雾', '除尘器', '环卫车', '洗车台']
|
||||
mgroup = models.ForeignKey(
|
||||
'mtm.mgroup', on_delete=models.SET_NULL, null=True, blank=True)
|
||||
type = models.PositiveSmallIntegerField(
|
||||
'类型', choices=type_choices, default=10)
|
||||
cate = models.CharField('设备分类', max_length=20, default='', blank=True)
|
||||
tags = models.JSONField('设备标签', default=list, null=True)
|
||||
name = models.CharField('设备名称', max_length=50)
|
||||
number_factory = models.CharField(
|
||||
'出厂编号', max_length=50, default='', blank=True)
|
||||
|
|
Loading…
Reference in New Issue