nes-num lines-num-old"> 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

pai2 - Gogs: Go Git Service

拍爱

Brightcells: b6ab791315 Change relative pk to photo_id 9 jaren geleden
..
migrations 6199c8f7ad add api lensman_origin_wanted_api/lensman_origin_photo_upload_api 9 jaren geleden
__init__.py 7a17d0fb90 add api wxpay & add redis relative 10 jaren geleden
admin.py 6199c8f7ad add api lensman_origin_wanted_api/lensman_origin_photo_upload_api 9 jaren geleden
models.py b6ab791315 Change relative pk to photo_id 9 jaren geleden
tests.py fabef63211 set line_length=200 for isort 10 jaren geleden
views.py b6ab791315 Change relative pk to photo_id 9 jaren geleden