Indexing DB
This commit is contained in:
parent
fc9419f301
commit
57364148cf
@ -8,7 +8,7 @@ class SubscriptionRequest(models.Model):
|
|||||||
pages: int = models.IntegerField()
|
pages: int = models.IntegerField()
|
||||||
pages_left: int = models.IntegerField(default=1)
|
pages_left: int = models.IntegerField(default=1)
|
||||||
doc_type: str = models.CharField(max_length=100)
|
doc_type: str = models.CharField(max_length=100)
|
||||||
request_id = models.CharField(max_length=200) # Change to request_id
|
request_id = models.CharField(max_length=200, db_index=True) # Change to request_id
|
||||||
redemption_id = models.CharField(max_length=200, null=True)
|
redemption_id = models.CharField(max_length=200, null=True)
|
||||||
process_type = models.CharField(max_length=200) # driver/id/invoice
|
process_type = models.CharField(max_length=200) # driver/id/invoice
|
||||||
provider_code = models.CharField(max_length=200, default="Guest") # Request source FWD/CTel
|
provider_code = models.CharField(max_length=200, default="Guest") # Request source FWD/CTel
|
||||||
|
@ -35,3 +35,10 @@ class SubscriptionRequestFile(models.Model):
|
|||||||
|
|
||||||
feedback_accuracy = models.JSONField(null=True)
|
feedback_accuracy = models.JSONField(null=True)
|
||||||
reviewed_accuracy = models.JSONField(null=True)
|
reviewed_accuracy = models.JSONField(null=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
indexes = [
|
||||||
|
models.Index(fields=['request', 'index_in_request', 'doc_type']), # For updating results
|
||||||
|
models.Index(fields=['request', 'file_name']), # for getting image files by AI
|
||||||
|
]
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ from fwd_api.constant.common import EntityStatus
|
|||||||
|
|
||||||
|
|
||||||
class UserProfile(models.Model):
|
class UserProfile(models.Model):
|
||||||
id = models.AutoField(primary_key=True)
|
id = models.AutoField(primary_key=True, db_index=True)
|
||||||
user_name: str = models.CharField(max_length=200, null=True)
|
user_name: str = models.CharField(max_length=200, null=True)
|
||||||
password: str = models.CharField(max_length=200, null=True)
|
password: str = models.CharField(max_length=200, null=True)
|
||||||
full_name: str = models.CharField(max_length=200, null=True)
|
full_name: str = models.CharField(max_length=200, null=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user