:art: Change chg_sta default False

huangqimin001 3 anos atrás
pai
commit
c999d00d20

+ 18 - 0
equipment/migrations/0017_alter_isolationpointuserinfo_chg_sta.py

@@ -0,0 +1,18 @@
1
+# Generated by Django 3.2.6 on 2021-08-17 15:35
2
+
3
+from django.db import migrations, models
4
+
5
+
6
+class Migration(migrations.Migration):
7
+
8
+    dependencies = [
9
+        ('equipment', '0016_isolationpointuserinfo_chg_sta'),
10
+    ]
11
+
12
+    operations = [
13
+        migrations.AlterField(
14
+            model_name='isolationpointuserinfo',
15
+            name='chg_sta',
16
+            field=models.BooleanField(default=False, help_text='充电状态,true 充电,false 未充电', verbose_name='chg_sta'),
17
+        ),
18
+    ]

+ 2 - 2
equipment/models.py

@@ -82,7 +82,7 @@ class IsolationPointInfo(BaseModelMixin):
82 82
 class IsolationPointUserInfo(BaseModelMixin):
83 83
     HAS_NOT_UPLOAD = '未上报'
84 84
     HAS_YET_UPLOAD = '已上报'
85
-    CHG_STA_CHARGING = ' 充电中'
85
+    CHG_STA_CHARGING = '充电中'
86 86
 
87 87
     point_id = models.CharField(_('point_id'), max_length=32, blank=True, null=True, help_text='隔离点唯一标识', db_index=True)
88 88
 
@@ -93,7 +93,7 @@ class IsolationPointUserInfo(BaseModelMixin):
93 93
     observed_ymds = JSONField(_('observed_ymds'), default=[], blank=True, null=True, help_text='已测温日期')
94 94
     observed_days = models.IntegerField(_('observed_days'), default=0, help_text='已测温天数')
95 95
 
96
-    chg_sta = models.BooleanField(_(u'chg_sta'), default=True, help_text='充电状态,true 充电,false 未充电')
96
+    chg_sta = models.BooleanField(_(u'chg_sta'), default=False, help_text='充电状态,true 充电,false 未充电')
97 97
     temperature = models.FloatField(_('temperature'), default=0, help_text='用户体温')
98 98
     last_submit_at = models.DateTimeField(_('last_submit_at'), blank=True, null=True, help_text='上一次上报时间')
99 99
     leave_at = models.DateTimeField(_('leave_at'), blank=True, null=True, help_text='离开时间')