# add Device post statistic model
This commit is contained in:
parent
683bca5688
commit
21564ec2b7
|
@ -53,4 +53,17 @@ class MosqPostStatistic(models.Model):
|
|||
verbose_name_plural = verbose_name
|
||||
|
||||
def __str__(self):
|
||||
return '{0}: {1}'.format(self.date, self.increment)
|
||||
return '{0}: {1}'.format(self.date, self.increment)
|
||||
|
||||
|
||||
class DevicePostStatistic(models.Model):
|
||||
device_id = models.CharField(max_length=100, verbose_name='设备ID')
|
||||
total = models.PositiveIntegerField(verbose_name='总数')
|
||||
date = models.DateField(auto_now_add=False, verbose_name='日期', unique=False)
|
||||
|
||||
class Meta:
|
||||
verbose_name = '设备日志统计表'
|
||||
verbose_name_plural = verbose_name
|
||||
|
||||
def __str__(self):
|
||||
return '{0}: {1}'.format(self.device_id, self.total)
|
Loading…
Reference in New Issue