|
@@ -474,17 +474,17 @@ class Equipment_Sensor(models.Model):
|
|
|
|
|
|
class Equipment_Info(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
- devUid = models.CharField(null=True, blank=True, max_length=32, verbose_name=u'设备ID')
|
|
|
+ devUid = models.CharField(default='', blank=True, max_length=32, verbose_name=u'设备ID')
|
|
|
devNickName = models.CharField(blank=True, max_length=32, default='', verbose_name=u'设备昵称')
|
|
|
- Channel = models.IntegerField(null=True, blank=True, verbose_name=u'设备通道')
|
|
|
- eventType = models.IntegerField(null=True, blank=True, verbose_name=u'事件类型')
|
|
|
- viewAccont = models.CharField(blank=True, null=True, max_length=32, verbose_name=u'设备账户')
|
|
|
- viewPwd = models.CharField(blank=True, null=True, max_length=32, verbose_name=u'设备密码')
|
|
|
+ Channel = models.IntegerField(default='', blank=True, verbose_name=u'设备通道')
|
|
|
+ eventType = models.IntegerField(default='',blank=True, verbose_name=u'事件类型')
|
|
|
+ viewAccont = models.CharField(blank=True, default='', max_length=32, verbose_name=u'设备账户')
|
|
|
+ viewPwd = models.CharField(blank=True, default='', max_length=32, verbose_name=u'设备密码')
|
|
|
status = models.BooleanField(blank=True, default=False, verbose_name=u'事件状态')
|
|
|
alarm = models.CharField(blank=True, max_length=256, verbose_name=u'报警信息')
|
|
|
- eventTime = models.CharField(blank=True, null=True, max_length=16, verbose_name=u'设备报警时间')
|
|
|
- receiveTime = models.CharField(blank=True, null=True, max_length=16, verbose_name=u'接收到报警时间')
|
|
|
- userID = models.ForeignKey(Device_User, null=True, blank=True, to_field='userID',
|
|
|
+ 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 = models.ForeignKey(Device_User, default='', blank=True, to_field='userID',
|
|
|
on_delete=models.CASCADE)
|
|
|
|
|
|
def __str__(self):
|
|
@@ -501,8 +501,8 @@ class Feedback_Info(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
userID = models.CharField(blank=True, max_length=32, verbose_name=u'用户ID')
|
|
|
status = models.BooleanField(blank=True, default=False, verbose_name=u'状态:0未解决/解决')
|
|
|
- content = models.TextField(blank=True, null=True, verbose_name=u'反馈描述')
|
|
|
- add_time = models.DateTimeField(blank=True, null=True, verbose_name=u'加入时间/反馈时间', auto_now_add=True)
|
|
|
+ content = models.TextField(blank=True, default='', verbose_name=u'反馈描述')
|
|
|
+ add_time = models.DateTimeField(blank=True, default='', verbose_name=u'加入时间/反馈时间', auto_now_add=True)
|
|
|
update_time = models.DateTimeField(blank=True, verbose_name=u'更新时间', auto_now=True)
|
|
|
|
|
|
def __str__(self):
|
|
@@ -573,7 +573,7 @@ class Equipment_Version(models.Model):
|
|
|
fileMd5 = models.CharField(blank=True, max_length=32, null=True, verbose_name=u'上传文件MD5加密')
|
|
|
status = models.BooleanField(blank=True, default=True, verbose_name=u'是否开启更新状态')
|
|
|
update_time = models.DateTimeField(blank=True, verbose_name=u'更新时间', auto_now=True)
|
|
|
- lang = models.CharField(blank=True, null=True, default=0, max_length=32, verbose_name=u'ota包内置语言')
|
|
|
+ lang = models.CharField(blank=True, default='en', max_length=32, verbose_name=u'ota包内置语言')
|
|
|
|
|
|
def __str__(self):
|
|
|
return self.eid
|