# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gramhal.gitbook.io/bolbhav/chapter-1-database/user-contributed-data/user_sale_receipt_validations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
