From bf8742fa4b1c29a28896324d667e86056e3a1ddc Mon Sep 17 00:00:00 2001 From: dx-tan Date: Tue, 23 Jan 2024 15:14:40 +0700 Subject: [PATCH] Feature: placeholder for xlsx function --- cope2n-api/fwd_api/models/Report.py | 8 +++++--- cope2n-api/fwd_api/models/SubscriptionRequestFile.py | 3 +++ cope2n-api/fwd_api/utils/file.py | 5 +++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cope2n-api/fwd_api/models/Report.py b/cope2n-api/fwd_api/models/Report.py index 11dc820..b5bfa8d 100644 --- a/cope2n-api/fwd_api/models/Report.py +++ b/cope2n-api/fwd_api/models/Report.py @@ -19,6 +19,8 @@ class Report(models.Model): number_request = models.IntegerField(default=0) number_images = models.IntegerField(default=0) number_bad_images = models.IntegerField(default=0) - average_client_time = models.JSONField(default=0) # {"0.1": 100, 0.2: 200, ...} - average_OCR_time = models.JSONField(default=0) # {"0.1": 98, 0.2: 202, ...} - accuracy = models.JSONField(null=True) + average_client_time_profile = models.JSONField(default=0) # {"0.1": 100, 0.2: 200, ...} + average_OCR_time_profile = models.JSONField(default=0) # {"0.1": 98, 0.2: 202, ...} + average_OCR_time = models.FloatField(default=0) # {"0.1": 98, 0.2: 202, ...} + average_client_time = models.FloatField(default=0) # {"0.1": 98, 0.2: 202, ...} + accuracy = models.JSONField(null=True) # {"imei": {}, "purchase_date": {}, "retailer_name": {}} \ No newline at end of file diff --git a/cope2n-api/fwd_api/models/SubscriptionRequestFile.py b/cope2n-api/fwd_api/models/SubscriptionRequestFile.py index 508553b..bcb1d36 100755 --- a/cope2n-api/fwd_api/models/SubscriptionRequestFile.py +++ b/cope2n-api/fwd_api/models/SubscriptionRequestFile.py @@ -23,3 +23,6 @@ class SubscriptionRequestFile(models.Model): is_bad_image_quality = models.BooleanField(default=False) doc_type = models.CharField(max_length=100, default="") index_in_request = models.IntegerField(default=0) + processing_time = models.IntegerField(default=-1) # in milisecond + reason = models.TextField(blank=True) + counter_measures = models.TextField(blank=True) \ No newline at end of file diff --git a/cope2n-api/fwd_api/utils/file.py b/cope2n-api/fwd_api/utils/file.py index d3ae556..92142da 100644 --- a/cope2n-api/fwd_api/utils/file.py +++ b/cope2n-api/fwd_api/utils/file.py @@ -340,7 +340,8 @@ def json2xlsx(input: json): ...: ...}] }] OR - + input (json): + : [] + Return xlsx (object) """ - # return xlsx pass \ No newline at end of file