"lines-code">
-
+
@property
def userdata(self):
- return {
+ return {
'macid': self.macid,
'sn': self.sn,
'temperature': self.temperature,
'created_at': tc.local_string(utc_dt=self.created_at, format='%Y-%m-%d %H:%M'),
- }
+ }
class AepThermometerMeasureLogInfo(BaseModelMixin):
@@ -352,3 +367,33 @@ class AepThermometerMeasureLogInfo(BaseModelMixin):
def __unicode__(self):
return self.pk
+
+
+class AntigenMeasureLogInfo(BaseModelMixin):
+
+ NEGATIVE = 0
+ POSITIVE = 1
+ UNKNOWN = 2
+
+ ANTIGEN_RESULT_TYPE = (
+ (NEGATIVE, '阴性'),
+ (POSITIVE, '阳性'),
+ (UNKNOWN, '未知'),
+ )
+
+ point_id = models.CharField(_('point_id'), max_length=32, blank=True, null=True, help_text='隔离点唯一标识', db_index=True)
+
+ user_id = models.CharField(_('user_id'), max_length=32, blank=True, null=True, help_text='用户唯一标识')
+
+ macid = models.CharField(_('macid'), max_length=32, blank=True, null=True, help_text='设备号')
+ phone = models.CharField(_('phone'), max_length=11, blank=True, null=True, help_text='用户手机号')
+ user_name = models.CharField(_('user_name'), max_length=255, blank=True, null=True, help_text='用户姓名')
+ result = models.IntegerField(_('result'), choices=ANTIGEN_RESULT_TYPE, default=UNKNOWN, help_text='抗原检测结果')
+ detect_at = models.DateTimeField(_('detect_at'), blank=True, null=True, help_text='检测时间')
+
+ class Meta:
+ verbose_name = _('抗原检测记录信息')
+ verbose_name_plural = _('抗原检测记录信息')
+
+ def __unicode__(self):
+ return self.pk