chenshibin преди 4 години
родител
ревизия
9e31c3b036
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      Model/models.py

+ 3 - 3
Model/models.py

@@ -280,7 +280,7 @@ class Access_Log(models.Model):
 
 class Equipment_Info(models.Model):
     id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
-    devUid = models.CharField(default='', blank=True, max_length=32, verbose_name=u'设备ID')
+    devUid = models.CharField(default='', db_index=True, blank=True, max_length=32, verbose_name=u'设备ID')
     devNickName = models.CharField(blank=True, max_length=32, default='', verbose_name=u'设备昵称')
     Channel = models.IntegerField(default=1, blank=True, verbose_name=u'设备通道')
     eventType = models.IntegerField(default=0, blank=True, verbose_name=u'事件类型')
@@ -288,7 +288,7 @@ class Equipment_Info(models.Model):
     alarm = models.CharField(blank=True, max_length=256, verbose_name=u'报警信息')
     eventTime = models.CharField(blank=True, default='', max_length=16, verbose_name=u'设备报警时间')
     receiveTime = models.CharField(blank=True, default='', max_length=16, verbose_name=u'接收到报警时间')
-    userID_id = models.CharField(default='', blank=True, max_length=32, verbose_name=u'用户ID')
+    userID_id = models.CharField(default='',  db_index=True,blank=True, max_length=32, verbose_name=u'用户ID')
     is_st = models.SmallIntegerField(default=0, verbose_name='是否截图')  # 0 否,1 是图,2,视频
     addTime = models.IntegerField(verbose_name='添加时间', default=0)
 
@@ -635,7 +635,7 @@ class UID_Preview(models.Model):
 # 系统发送信息新到用户
 class SysMsgModel(models.Model):
     id = models.AutoField(primary_key=True, verbose_name='自增id')
-    userID_id = models.CharField(default='', blank=True, max_length=32, verbose_name=u'用户ID')
+    userID_id = models.CharField(default='', db_index=True,blank=True, max_length=32, verbose_name=u'用户ID')
     msg = models.TextField(blank=True, default='', verbose_name=u'发送内容')
     status = models.SmallIntegerField(verbose_name='是否已读', default=0)  # 0:否,1:是
     addTime = models.IntegerField(verbose_name='添加时间', default=0)