Explorar o código

新增传感器记录表

locky %!s(int64=3) %!d(string=hai) anos
pai
achega
23564b08d7
Modificáronse 1 ficheiros con 15 adicións e 0 borrados
  1. 15 0
      Model/models.py

+ 15 - 0
Model/models.py

@@ -2579,3 +2579,18 @@ class FamilyMemberJoin(models.Model):
         db_table = 'family_member_join'
         verbose_name = '家庭成员加入'
         verbose_name_plural = verbose_name
+
+
+class SensorRecord(models.Model):
+    id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
+    gateway_sub_device_id = models.IntegerField(default=0, blank=True, verbose_name=u'网关子设备id')
+    alarm = models.CharField(default='', max_length=32, verbose_name=u'消息内容')
+    event_type = models.SmallIntegerField(default=0, verbose_name=u'消息类型')
+    created_time = models.IntegerField(default=0, verbose_name='创建时间')
+
+    class Meta:
+        db_table = 'sensor_record'
+        verbose_name = '传感器记录'
+        verbose_name_plural = verbose_name
+        app_label = 'PushModel'
+