> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/engineering-reference/db/tables/ai_task_user_job_resolution.md).

# ai\_task\_user\_job\_resolution

{% hint style="info" %}
Generated from the staging database schema, with descriptions drafted by agents ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/db/tables/ai_task_user_job_resolution.md).
{% endhint %}

## Description

One finished (green) task, with its title, the user who finished it and how long it took, for aitask\_pyserver's assignee suggestions.

<details>

<summary><strong>Table Definition</strong></summary>

```sql
CREATE TABLE `ai_task_user_job_resolution` (
  `uuid_tJob` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `uuid_tUser` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `uuid_tBusiness` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `task_title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `resolution_ms` bigint NOT NULL,
  `job_change_ts` datetime(6) DEFAULT NULL COMMENT 'COALESCE(fModifiedTs,fCreatedTs) on tPri_Job when synced',
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`uuid_tJob`) USING BTREE,
  KEY `idx_job_res_business_user` (`uuid_tBusiness`,`uuid_tUser`) USING BTREE,
  KEY `idx_job_res_user_business` (`uuid_tUser`,`uuid_tBusiness`) USING BTREE,
  KEY `idx_job_res_business_change` (`uuid_tBusiness`,`job_change_ts`) USING BTREE,
  KEY `idx_job_res_updated_at` (`updated_at`) USING BTREE,
  KEY `idx_job_res_business_user_ts` (`uuid_tBusiness`,`uuid_tUser`,`job_change_ts`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
```

</details>

## Columns

| Name            | Type        | Default            | Nullable | Extra Definition                                | Comment                                                                                                                                                                                                                                            |
| --------------- | ----------- | ------------------ | -------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| uuid\_tJob      | varchar(64) |                    | false    |                                                 |                                                                                                                                                                                                                                                    |
| uuid\_tUser     | varchar(64) |                    | false    |                                                 |                                                                                                                                                                                                                                                    |
| uuid\_tBusiness | varchar(64) |                    | false    |                                                 |                                                                                                                                                                                                                                                    |
| task\_title     | text        |                    | false    |                                                 |                                                                                                                                                                                                                                                    |
| resolution\_ms  | bigint      |                    | false    |                                                 | Meant as milliseconds from the task's creation to the later of its green time and its last change. 229,521 of the 229,549 staging rows hold 0, because the seeder runs TIMESTAMPDIFF on millisecond integers.                                      |
| job\_change\_ts | datetime(6) |                    | true     |                                                 | Meant as the task's last change, COALESCE(fModifiedTs, fCreatedTs). It holds no usable date: 228,776 staging rows are zero dates and the other 773 are before 2000, because the seeder copies the raw millisecond value into this DATETIME column. |
| updated\_at     | datetime    | CURRENT\_TIMESTAMP | false    | DEFAULT\_GENERATED on update CURRENT\_TIMESTAMP |                                                                                                                                                                                                                                                    |

## Viewpoints

| Name                                                                           | Definition                                                                                                                                             |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [ai](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-17.md) | Snapfix AI and AI suggestions: agent sessions and messages, brand documents, task insight and title-style data, token usage, the AI job log and queue. |

## Constraints

| Name    | Type        | Definition               |
| ------- | ----------- | ------------------------ |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (uuid\_tJob) |

## Indexes

| Name                              | Definition                                                                                        |
| --------------------------------- | ------------------------------------------------------------------------------------------------- |
| idx\_job\_res\_business\_change   | KEY idx\_job\_res\_business\_change (uuid\_tBusiness, job\_change\_ts) USING BTREE                |
| idx\_job\_res\_business\_user     | KEY idx\_job\_res\_business\_user (uuid\_tBusiness, uuid\_tUser) USING BTREE                      |
| idx\_job\_res\_business\_user\_ts | KEY idx\_job\_res\_business\_user\_ts (uuid\_tBusiness, uuid\_tUser, job\_change\_ts) USING BTREE |
| idx\_job\_res\_updated\_at        | KEY idx\_job\_res\_updated\_at (updated\_at) USING BTREE                                          |
| idx\_job\_res\_user\_business     | KEY idx\_job\_res\_user\_business (uuid\_tUser, uuid\_tBusiness) USING BTREE                      |
| PRIMARY                           | PRIMARY KEY (uuid\_tJob) USING BTREE                                                              |

## Relations

```mermaid
erDiagram


"ai_task_user_job_resolution" {
  varchar_64_ uuid_tJob PK
}
```

***

> Generated by [tbls](https://github.com/k1LoW/tbls)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/engineering-reference/db/tables/ai_task_user_job_resolution.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
