> 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/tpri_jobuserassigned.md).

# tPri\_JobUserAssigned

{% 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/tPri_JobUserAssigned.md).
{% endhint %}

## Description

A user assigned to a task (UI: "Assigned to"), with the AI-suggestion flag; removing an assignment soft-deletes the row.

<details>

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

```sql
CREATE TABLE `tPri_JobUserAssigned` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) DEFAULT NULL,
  `uuid_tJob` varchar(255) DEFAULT NULL,
  `uuid_tUser` varchar(255) DEFAULT NULL,
  `uuid_tBusiness` varchar(255) DEFAULT NULL,
  `fUnassigned` tinyint DEFAULT '0',
  `fDeleted` tinyint DEFAULT NULL,
  `fSoftFreeze` tinyint DEFAULT '0' COMMENT 'When the tPri_Job is set to freeze then so is this',
  `fCreatedTs` bigint DEFAULT NULL,
  `fModifiedTs` bigint DEFAULT NULL,
  `fServerTs` bigint DEFAULT NULL,
  `uuid_tUser_CreatedBy` varchar(255) DEFAULT NULL,
  `uuid_tUser_ModifiedBy` varchar(255) DEFAULT NULL,
  `excludeFromApi` tinyint DEFAULT '0',
  `excludeFromApiTs` bigint DEFAULT NULL,
  `aiSuggested` tinyint DEFAULT '0' COMMENT '0-default or non-ai, 1-ai',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE,
  KEY `BusinessUuid_ServerTs` (`uuid_tBusiness`,`fServerTs`),
  KEY `fk_tPri_JobUserAssigned_job` (`uuid_tJob`),
  KEY `fk_tPri_JobUserAssigned_user` (`uuid_tUser`),
  KEY `fk_tPri_JobUserAssigned_createdbyuser` (`uuid_tUser_CreatedBy`),
  CONSTRAINT `fk_tPri_JobUserAssigned_business` FOREIGN KEY (`uuid_tBusiness`) REFERENCES `tPri_Business` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `fk_tPri_JobUserAssigned_createdbyuser` FOREIGN KEY (`uuid_tUser_CreatedBy`) REFERENCES `tPri_User` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `fk_tPri_JobUserAssigned_job` FOREIGN KEY (`uuid_tJob`) REFERENCES `tPri_Job` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `fk_tPri_JobUserAssigned_user` FOREIGN KEY (`uuid_tUser`) REFERENCES `tPri_User` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
```

</details>

## Columns

| Name                    | Type         | Default | Nullable | Extra Definition | Parents                                                                                     | Comment                                                                                                                           |
| ----------------------- | ------------ | ------- | -------- | ---------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| id                      | int          |         | false    | auto\_increment  |                                                                                             |                                                                                                                                   |
| uuid                    | varchar(255) |         | true     |                  |                                                                                             |                                                                                                                                   |
| uuid\_tJob              | varchar(255) |         | true     |                  | [tPri\_Job](https://docs.snapfix.com/engineering-reference/db/tables/tpri_job.md)           |                                                                                                                                   |
| uuid\_tUser             | varchar(255) |         | true     |                  | [tPri\_User](https://docs.snapfix.com/engineering-reference/db/tables/tpri_user.md)         |                                                                                                                                   |
| uuid\_tBusiness         | varchar(255) |         | true     |                  | [tPri\_Business](https://docs.snapfix.com/engineering-reference/db/tables/tpri_business.md) |                                                                                                                                   |
| fUnassigned             | tinyint      | 0       | true     |                  |                                                                                             | 1 when the user was unassigned and the row kept; set only on older rows (the newest from 2024-11), and still read by the readers. |
| fDeleted                | tinyint      |         | true     |                  |                                                                                             |                                                                                                                                   |
| fSoftFreeze             | tinyint      | 0       | true     |                  |                                                                                             | When the tPri\_Job is set to freeze then so is this                                                                               |
| fCreatedTs              | bigint       |         | true     |                  |                                                                                             |                                                                                                                                   |
| fModifiedTs             | bigint       |         | true     |                  |                                                                                             |                                                                                                                                   |
| fServerTs               | bigint       |         | true     |                  |                                                                                             |                                                                                                                                   |
| uuid\_tUser\_CreatedBy  | varchar(255) |         | true     |                  | [tPri\_User](https://docs.snapfix.com/engineering-reference/db/tables/tpri_user.md)         |                                                                                                                                   |
| uuid\_tUser\_ModifiedBy | varchar(255) |         | true     |                  |                                                                                             |                                                                                                                                   |
| excludeFromApi          | tinyint      | 0       | true     |                  |                                                                                             |                                                                                                                                   |
| excludeFromApiTs        | bigint       |         | true     |                  |                                                                                             |                                                                                                                                   |
| aiSuggested             | tinyint      | 0       | true     |                  |                                                                                             | 0-default or non-ai, 1-ai                                                                                                         |

## Viewpoints

| Name                                                                             | Definition                                                                                                                                                                              |
| -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [tasks](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-2.md) | Tasks (`tPri_Job`): statuses and their history, assignees and followers, tags on tasks, time and cost, task links, view logs, the shared task page, and the task type and origin codes. |

## Constraints

| Name                                     | Type        | Definition                                                        |
| ---------------------------------------- | ----------- | ----------------------------------------------------------------- |
| fk\_tPri\_JobUserAssigned\_business      | FOREIGN KEY | FOREIGN KEY (uuid\_tBusiness) REFERENCES tPri\_Business (uuid)    |
| fk\_tPri\_JobUserAssigned\_createdbyuser | FOREIGN KEY | FOREIGN KEY (uuid\_tUser\_CreatedBy) REFERENCES tPri\_User (uuid) |
| fk\_tPri\_JobUserAssigned\_job           | FOREIGN KEY | FOREIGN KEY (uuid\_tJob) REFERENCES tPri\_Job (uuid)              |
| fk\_tPri\_JobUserAssigned\_user          | FOREIGN KEY | FOREIGN KEY (uuid\_tUser) REFERENCES tPri\_User (uuid)            |
| PRIMARY                                  | PRIMARY KEY | PRIMARY KEY (id)                                                  |
| uuid                                     | UNIQUE      | UNIQUE KEY uuid (uuid)                                            |

## Indexes

| Name                                     | Definition                                                                        |
| ---------------------------------------- | --------------------------------------------------------------------------------- |
| BusinessUuid\_ServerTs                   | KEY BusinessUuid\_ServerTs (uuid\_tBusiness, fServerTs) USING BTREE               |
| fk\_tPri\_JobUserAssigned\_createdbyuser | KEY fk\_tPri\_JobUserAssigned\_createdbyuser (uuid\_tUser\_CreatedBy) USING BTREE |
| fk\_tPri\_JobUserAssigned\_job           | KEY fk\_tPri\_JobUserAssigned\_job (uuid\_tJob) USING BTREE                       |
| fk\_tPri\_JobUserAssigned\_user          | KEY fk\_tPri\_JobUserAssigned\_user (uuid\_tUser) USING BTREE                     |
| PRIMARY                                  | PRIMARY KEY (id) USING BTREE                                                      |
| uuid                                     | UNIQUE KEY uuid (uuid) USING BTREE                                                |

## Relations

```mermaid
erDiagram

"tPri_JobUserAssigned" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobUserAssigned" }o--o| "tPri_User" : "FOREIGN KEY (uuid_tUser) REFERENCES tPri_User (uuid)"
"tPri_JobUserAssigned" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobUserAssigned" }o--o| "tPri_User" : "FOREIGN KEY (uuid_tUser_CreatedBy) REFERENCES tPri_User (uuid)"

"tPri_JobUserAssigned" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUser FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Job" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_User" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Business" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
```

***

> 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/tpri_jobuserassigned.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.
