|
297
|
312
|
'created_at': tc.local_string(utc_dt=self.created_at, format='%Y-%m-%d'),
|
|
298
|
313
|
}
|
|
299
|
|
-
|
|
|
314
|
+
|
|
300
|
315
|
@property
|
|
301
|
316
|
def userdata(self):
|
|
302
|
|
- return {
|
|
|
317
|
+ return {
|
|
303
|
318
|
'macid': self.macid,
|
|
304
|
319
|
'sn': self.sn,
|
|
305
|
320
|
'temperature': self.temperature,
|
|
306
|
321
|
'created_at': tc.local_string(utc_dt=self.created_at, format='%Y-%m-%d %H:%M'),
|
|
307
|
|
- }
|
|
|
322
|
+ }
|
|
308
|
323
|
|
|
309
|
324
|
|
|
310
|
325
|
class AepThermometerMeasureLogInfo(BaseModelMixin):
|
|
|
|
@@ -352,3 +367,33 @@ class AepThermometerMeasureLogInfo(BaseModelMixin):
|
|
352
|
367
|
|
|
353
|
368
|
def __unicode__(self):
|
|
354
|
369
|
return self.pk
|
|
|
370
|
+
|
|
|
371
|
+
|
|
|
372
|
+class AntigenMeasureLogInfo(BaseModelMixin):
|
|
|
373
|
+
|
|
|
374
|
+ NEGATIVE = 0
|
|
|
375
|
+ POSITIVE = 1
|
|
|
376
|
+ UNKNOWN = 2
|
|
|
377
|
+
|
|
|
378
|
+ ANTIGEN_RESULT_TYPE = (
|
|
|
379
|
+ (NEGATIVE, '阴性'),
|
|
|
380
|
+ (POSITIVE, '阳性'),
|
|
|
381
|
+ (UNKNOWN, '未知'),
|
|
|
382
|
+ )
|
|
|
383
|
+
|
|
|
384
|
+ point_id = models.CharField(_('point_id'), max_length=32, blank=True, null=True, help_text='隔离点唯一标识', db_index=True)
|
|
|
385
|
+
|
|
|
386
|
+ user_id = models.CharField(_('user_id'), max_length=32, blank=True, null=True, help_text='用户唯一标识')
|
|
|
387
|
+
|
|
|
388
|
+ macid = models.CharField(_('macid'), max_length=32, blank=True, null=True, help_text='设备号')
|
|
|
389
|
+ phone = models.CharField(_('phone'), max_length=11, blank=True, null=True, help_text='用户手机号')
|
|
|
390
|
+ user_name = models.CharField(_('user_name'), max_length=255, blank=True, null=True, help_text='用户姓名')
|
|
|
391
|
+ result = models.IntegerField(_('result'), choices=ANTIGEN_RESULT_TYPE, default=UNKNOWN, help_text='抗原检测结果')
|
|
|
392
|
+ detect_at = models.DateTimeField(_('detect_at'), blank=True, null=True, help_text='检测时间')
|
|
|
393
|
+
|
|
|
394
|
+ class Meta:
|
|
|
395
|
+ verbose_name = _('抗原检测记录信息')
|
|
|
396
|
+ verbose_name_plural = _('抗原检测记录信息')
|
|
|
397
|
+
|
|
|
398
|
+ def __unicode__(self):
|
|
|
399
|
+ return self.pk
|