> 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_joblink.md).

# tPri\_JobLink

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

## Description

Links a master task to a tagged task, which may be in another group; housekeeping uses it to pair a cleaning task with its inspection task.

<details>

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

```sql
CREATE TABLE `tPri_JobLink` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `uuid_tJob_master` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL COMMENT 'normally it should be cleaning task uuid',
  `uuid_tJob_tagged` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'normally it should be inspection task uuid',
  `uuid_tBusiness_master` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `uuid_tBusiness_tagged` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `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) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `uuid_tUser_ModifiedBy` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `excludeFromApi` tinyint DEFAULT '0',
  `excludeFromApiTs` bigint DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
```

</details>

## Columns

| Name                    | Type         | Default | Nullable | Extra Definition | Comment                                             |
| ----------------------- | ------------ | ------- | -------- | ---------------- | --------------------------------------------------- |
| id                      | int          |         | false    | auto\_increment  |                                                     |
| uuid                    | varchar(255) |         | true     |                  |                                                     |
| uuid\_tJob\_master      | varchar(255) |         | true     |                  | normally it should be cleaning task uuid            |
| uuid\_tJob\_tagged      | varchar(255) |         | true     |                  | normally it should be inspection task uuid          |
| uuid\_tBusiness\_master | varchar(255) |         | true     |                  |                                                     |
| uuid\_tBusiness\_tagged | varchar(255) |         | true     |                  |                                                     |
| 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     |                  |                                                     |
| uuid\_tUser\_ModifiedBy | varchar(255) |         | true     |                  |                                                     |
| excludeFromApi          | tinyint      | 0       | true     |                  |                                                     |
| excludeFromApiTs        | bigint       |         | true     |                  |                                                     |

## 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. |
| [housekeeping](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-8.md) | Housekeeping: links from a cleaning task to its inspection, room-status task rules, room assignments and staff working hours.                                                           |

## Constraints

| Name    | Type        | Definition             |
| ------- | ----------- | ---------------------- |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (id)       |
| uuid    | UNIQUE      | UNIQUE KEY uuid (uuid) |

## Indexes

| Name    | Definition                         |
| ------- | ---------------------------------- |
| PRIMARY | PRIMARY KEY (id) USING BTREE       |
| uuid    | UNIQUE KEY uuid (uuid) USING BTREE |

## Relations

```mermaid
erDiagram


"tPri_JobLink" {
  int id 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/tpri_joblink.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.
