**Feature summary**:
We need a threshold number of user requests before rejecting a suggestion.
Initially this should be 3 users, but make sure it's easily configurable.
Note that it does not matter which campaign the suggestion is rejected from. As long as 3 different users have rejected the given suggestion for a particular image, it should be marked as rejected.
**Related**:
- {T315727}
**Technical info**
When the user rejects a suggestion, the server adds a new row inWe need to add two new columns to the Suggestions table.:
Just before this happens, we need to:
1. Query the database to get **all** Suggestions with:* google_vision_submitted
- update_status = 0 (rejection)* metadata_to_concept submitted
- file_name = <file the user rejected the suggestion from>
- depict_item = <item rejected by user>Both should be Boolean values defaulting to False
2.When the user rejects a suggestion, IF there are already 2 Suggestions in the results:
commit the new Suggestion to the database with either,
- google_vision_submitted = Truethe server adds a new row in the Suggestions table.
ORJust before this happens, we need to:
**1 - Query the database to get all Suggestions with:**
- metadata_to_concept_submitted = True* update_status = 0 (rejection)
OR* file_name = <file the user rejected the suggestion from>
- Both = True* depict_item = <item rejected by user>
**2 - IF there are already 2 Suggestions in the results:**
DCommit the new Suggestion to the database with either, **google_vision_submitted = True**, **metadata_to_concept_submitted = True**, OR **Both = True** (depending on the which services are True in the Suggestion data you are currently processing.)
**ELSE:**
submitCommit the rejection to the database with both submit columns left at default value of False
NOTE: best to actually check for >1 suggestions instead of =2 to catch unexpected extra rejections
IMPORTANT: For this patch, nothing else need to happen other than store the rejection submitted status in the database. As part of {T315668}, we will need to successfully send the rejection back to the GoogleVision service (and equivalent for Metadata-to-Concept) in order to commit the suggestion with google_vision_submitted = True