> For the complete documentation index, see [llms.txt](https://gramhal.gitbook.io/bolbhav/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gramhal.gitbook.io/bolbhav/chapter-1-database/user-contributed-data/user_sale_receipt_validations.md).

# user\_sale\_receipt\_validations

## Model

<table><thead><tr><th width="295">Field</th><th>Type</th><th data-type="checkbox">Nullable</th><th>Default value</th></tr></thead><tbody><tr><td>id</td><td>int4</td><td>false</td><td></td></tr><tr><td>user_id</td><td>int4</td><td>false</td><td></td></tr><tr><td>sale_receipt_id</td><td>int4</td><td>false</td><td></td></tr><tr><td>validated_at</td><td>timestamp</td><td>false</td><td></td></tr><tr><td>status</td><td>text</td><td>false</td><td></td></tr><tr><td>responses</td><td>json</td><td>true</td><td></td></tr><tr><td>is_correct_response</td><td>bool</td><td>false</td><td></td></tr><tr><td>created_at</td><td>timestamp</td><td>false</td><td></td></tr><tr><td>updated_at</td><td>timestamp</td><td>false</td><td></td></tr></tbody></table>

## Description of fields

### id

Unique identifier for the user validation record.

### sale\_receipt\_id

Foreign key referencing the ID of the associated sales receipt in a separate table.

### validated\_at

Timestamp of when the validation was performed.

### status

Status of the validation process.&#x20;

1. pending
2. completed
3. cancelled

### responses

The responses corresponding to the questions selected by the user are saved in this column. For reference, as shown below.

```json
[
    {"questionId": 1, "answer": "A"}, 
    {"questionId": 2, "answer": "A"}, 
    {"questionId": 3, "answer": "A"}, 
    {"questionId": 4, "answer": "A"}, 
    {"questionId": 5, "answer": "A"}, 
    {"questionId": 6, "answer": "A"}, 
    {"questionId": 7, "answer": "A"}, 
    {"questionId": 8, "answer": "A"}, 
    {"questionId": 9, "answer": "A"}
]
```

### is\_correct\_response

Boolean flag indicating whether the user validation is correct or not. (true/false)
