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

# tPri\_Job

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

## Description

One task (UI: task) in a group, with its title, status colour, people, rooms, dates, priority and approval state; most task tables point to it. An asset is a task in an asset register.

<details>

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

```sql
CREATE TABLE `tPri_Job` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) DEFAULT NULL,
  `uuid_tBusiness` varchar(255) DEFAULT NULL,
  `uuid_tUserBusiness` varchar(255) DEFAULT NULL,
  `uuid_tStatus` varchar(255) DEFAULT NULL,
  `uuid_tStatusSub` varchar(255) DEFAULT NULL,
  `color` varchar(255) DEFAULT '',
  `fRedTs` bigint DEFAULT '0',
  `fAmberTs` bigint DEFAULT '0',
  `fGreenTs` bigint DEFAULT '0',
  `uuid_tUser_Red` varchar(255) DEFAULT '',
  `uuid_tUser_Amber` varchar(255) DEFAULT '',
  `uuid_tUser_Green` varchar(255) DEFAULT '',
  `search_text` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `search_text_jobchat` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `search_text_jobtag` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fTitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fLargeTextTitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fShortTitle` varchar(100) DEFAULT NULL COMMENT 'short title for housekeeping tasks like OD, VD and so on',
  `fDescription` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `fImage` varchar(255) DEFAULT NULL,
  `fImageByte` int DEFAULT NULL,
  `fVideoHeader` tinyint DEFAULT '0',
  `uuid_schedule_origin` varchar(255) DEFAULT NULL,
  `uuid_schedule_planned` varchar(255) DEFAULT NULL,
  `fPlannedJob` int DEFAULT '0',
  `enum_JobType` int DEFAULT '0',
  `enum_Origin` int DEFAULT '0',
  `image_gen_ai` tinyint DEFAULT '0',
  `title_gen_ai` tinyint DEFAULT '0',
  `transcript_value_ai` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `fLat` double DEFAULT NULL,
  `fLng` double DEFAULT NULL,
  `job_chat_count` int DEFAULT '0',
  `fTodoName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `fTodoSignatureRequired` tinyint DEFAULT '0',
  `fUserBusinessName` varchar(255) DEFAULT NULL,
  `fEnableTaskReminder` tinyint DEFAULT '0',
  `uuid_tUserEnableTaskReminder` varchar(255) DEFAULT NULL,
  `timerange_startAfterMidnightMs` bigint DEFAULT NULL,
  `timerange_durationMs` bigint DEFAULT NULL,
  `timerange_plannedDurationMs` bigint DEFAULT NULL,
  `fArchived` tinyint DEFAULT '0',
  `fVisible` tinyint DEFAULT '1',
  `fLocked` tinyint DEFAULT '0',
  `fJobTs` bigint DEFAULT NULL,
  `fJobReference` varchar(255) DEFAULT '0',
  `fPriority` tinyint DEFAULT '0',
  `fPriorityLevel` int DEFAULT '0',
  `fSoftFreeze` tinyint DEFAULT '0',
  `fSoftFreezeTs` bigint DEFAULT NULL,
  `fDueDateTs` bigint DEFAULT NULL,
  `uuid_tUser_DueDate` varchar(255) DEFAULT NULL,
  `fDueDateDailyReminder` tinyint DEFAULT NULL,
  `fDeleted` tinyint DEFAULT '0',
  `fPriorityNumber` bigint DEFAULT '1000',
  `fJobChatModifiedTs` bigint DEFAULT '0',
  `fCreatedTs` bigint DEFAULT '0',
  `fModifiedTs` bigint DEFAULT '0',
  `fArchivedTs` bigint DEFAULT '0',
  `fDeletedTs` bigint DEFAULT '0',
  `fServerTs` bigint DEFAULT '0',
  `uuid_tUser_CreatedBy` varchar(255) DEFAULT '',
  `uuid_tUser_ModifiedBy` varchar(255) DEFAULT '',
  `excludeFromApi` tinyint DEFAULT '0',
  `excludeFromApiTs` bigint DEFAULT NULL,
  `uuid_tUser_ArchivedBy` varchar(255) DEFAULT '',
  `uuid_tUser_DeletedBy` varchar(255) DEFAULT '',
  `fApprovalRequired` tinyint DEFAULT '-1' COMMENT 'default : -1, manually switched off : 0, manually switched on : 1',
  `uuid_tUser_ApprovalRequired_ModifiedBy` varchar(255) DEFAULT NULL,
  `fApprovalStatus` int DEFAULT '-1' COMMENT 'default : -1, Approved : 1, Rejected : 0, Submitted for approval : 2',
  `fApprovedTs` bigint DEFAULT NULL,
  `uuid_tUser_ApprovedBy` varchar(255) DEFAULT NULL,
  `fBacklog` tinyint DEFAULT '0',
  `fBacklogTs` bigint DEFAULT NULL,
  `uuid_tUser_BacklogChangedBy` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `fSnoozed` tinyint DEFAULT '0',
  `fSnoozedReason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'DND,DNS or free text',
  `fSnoozedNotes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'free text',
  `fSnoozedTs` bigint DEFAULT NULL,
  `uuid_tUser_SnoozedBy` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `fLockedNotes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `assignmentType` int DEFAULT '0' COMMENT '0-default, 1-ai assigned, 2-manually assigned',
  `business_aiSuggested` tinyint DEFAULT '0' COMMENT '0-default or non-ai, 1-ai',
  `title_aiSuggested` tinyint DEFAULT '0' COMMENT '0-default or non-ai, 1-ai',
  `fCleaningType` varchar(255) DEFAULT NULL COMMENT 'departure, stayover, manual(standard)',
  `fCorrectionClean` tinyint NOT NULL DEFAULT '0',
  `fCleaningSubType` varchar(255) DEFAULT NULL,
  `uuid_RoomStatus_TaskRules` varchar(50) DEFAULT NULL,
  `uuid_tRoomGuestStatus` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE,
  KEY `BusinessUuid_ServerTs_Deleted` (`uuid_tBusiness`,`fServerTs`,`fDeleted`),
  KEY `fk_tPri_Job_createdbyuser` (`uuid_tUser_CreatedBy`),
  KEY `uuid_uuid_bus_2504` (`uuid`,`uuid_tBusiness`) USING BTREE,
  KEY `idx_job_business_deleted_archived_created` (`uuid_tBusiness`,`fDeleted`,`fArchived`,`fCreatedTs`),
  KEY `idx_job_business_deleted_archived_color` (`uuid_tBusiness`,`fDeleted`,`fArchived`,`color`),
  KEY `idx_job_status_deleted_archived_greents` (`uuid_tStatus`,`fDeleted`,`fArchived`,`fGreenTs`),
  KEY `idx_job_business_softfreeze_deleted_archived` (`uuid_tBusiness`,`fSoftFreeze`,`fDeleted`,`fArchived`,`color`),
  KEY `idx_job_schedule_planned_trigger` (`uuid_schedule_planned`,`fCreatedTs`,`fDeleted`),
  CONSTRAINT `fk_job_business` FOREIGN KEY (`uuid_tBusiness`) REFERENCES `tPri_Business` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `fk_tPri_Job_createdbyuser` FOREIGN KEY (`uuid_tUser_CreatedBy`) REFERENCES `tPri_User` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
```

</details>

## Columns

| Name                                      | Type          | Default | Nullable | Extra Definition | Children                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Parents                                                                                     | Comment                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------------------- | ------------- | ------- | -------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                                        | int           |         | false    | auto\_increment  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid                                      | varchar(255)  |         | true     |                  | [comply\_ContractorAsset](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractorasset.md) [comply\_SystemAsset](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemasset.md) [tPri\_JobArea](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobarea.md) [tPri\_JobAsset](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobasset.md) [tPri\_JobChat](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobchat.md) [tPri\_JobComplySystem](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobcomplysystem.md) [tPri\_JobNotif](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobnotif.md) [tPri\_JobReminder](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobreminder.md) [tPri\_JobRoom](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobroom.md) [tPri\_JobTag](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtag.md) [tPri\_JobTimeCost](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtimecost.md) [tPri\_JobTodo](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtodo.md) [tPri\_JobTodoMedia](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtodomedia.md) [tPri\_JobUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobuser.md) [tPri\_JobUserAssigned](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobuserassigned.md) [tPri\_Log\_Job](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_job.md) [tPri\_Log\_Job\_SoftFreeze](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_job_softfreeze.md) [url\_job\_token](https://docs.snapfix.com/engineering-reference/db/tables/url_job_token.md) |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tBusiness                           | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | [tPri\_Business](https://docs.snapfix.com/engineering-reference/db/tables/tpri_business.md) |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUserBusiness                       | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tStatus                             | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tStatusSub                          | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| color                                     | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Status colour: red, amber or green; the web shows amber as "Yellow".                                                                                                                                                                                                                                                                                                                                                                                 |
| fRedTs                                    | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | When the task was set to red, in epoch milliseconds; 0 when not set.                                                                                                                                                                                                                                                                                                                                                                                 |
| fAmberTs                                  | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | When the task was set to amber, in epoch milliseconds; 0 when not set.                                                                                                                                                                                                                                                                                                                                                                               |
| fGreenTs                                  | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | When the task was set to green, in epoch milliseconds; 0 when not set.                                                                                                                                                                                                                                                                                                                                                                               |
| uuid\_tUser\_Red                          | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_Amber                        | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_Green                        | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| search\_text                              | varchar(5000) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| search\_text\_jobchat                     | mediumtext    |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| search\_text\_jobtag                      | varchar(5000) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fTitle                                    | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fLargeTextTitle                           | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fShortTitle                               | varchar(100)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | short title for housekeeping tasks like OD, VD and so on                                                                                                                                                                                                                                                                                                                                                                                             |
| fDescription                              | text          |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fImage                                    | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fImageByte                                | int           |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fVideoHeader                              | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_schedule\_origin                    | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_schedule\_planned                   | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fPlannedJob                               | int           | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| enum\_JobType                             | int           | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Task type from the JobType enum in api\_php\_live\_v2, such as 5 normal, 31 QR code, 41 voice task, 45 cleaning and 46 inspection; asset rows use 43. php-apis writes 1 for planned tasks and filters normal tasks on 0, values the enum does not list. The enum\_JobType lookup table has no rows for 45 and 46 \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)]. |
| enum\_Origin                              | int           | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | EnumOrigin code: 0 unknown, 1 Android, 2 iOS, 3 web, 4 web admin, 5 email, 6 QR, 7 public API, 8 Guestline, 9 schedule, 10 auto housekeeping, 11 vendor API. The enum\_Origin lookup table has no row for 11.                                                                                                                                                                                                                                        |
| image\_gen\_ai                            | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| title\_gen\_ai                            | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| transcript\_value\_ai                     | text          |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fLat                                      | double        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fLng                                      | double        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| job\_chat\_count                          | int           | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fTodoName                                 | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fTodoSignatureRequired                    | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fUserBusinessName                         | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fEnableTaskReminder                       | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUserEnableTaskReminder             | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| timerange\_startAfterMidnightMs           | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Start of the task's time window as an epoch time in milliseconds (the task's date and planned start time in the site's zone), despite the name.                                                                                                                                                                                                                                                                                                      |
| timerange\_durationMs                     | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Length of the time window, in milliseconds.                                                                                                                                                                                                                                                                                                                                                                                                          |
| timerange\_plannedDurationMs              | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fArchived                                 | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fVisible                                  | tinyint       | 1       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fLocked                                   | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fJobTs                                    | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fJobReference                             | varchar(255)  | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fPriority                                 | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fPriorityLevel                            | int           | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | PriorityLevels code: 0 none, 5 low, 10 medium, 20 high, 30 emergency.                                                                                                                                                                                                                                                                                                                                                                                |
| fSoftFreeze                               | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fSoftFreezeTs                             | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fDueDateTs                                | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_DueDate                      | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fDueDateDailyReminder                     | tinyint       |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fDeleted                                  | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fPriorityNumber                           | bigint        | 1000    | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fJobChatModifiedTs                        | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fCreatedTs                                | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fModifiedTs                               | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fArchivedTs                               | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fDeletedTs                                | bigint        | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fServerTs                                 | bigint        | 0       | 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     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_ArchivedBy                   | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_DeletedBy                    | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fApprovalRequired                         | tinyint       | -1      | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | default : -1, manually switched off : 0, manually switched on : 1                                                                                                                                                                                                                                                                                                                                                                                    |
| uuid\_tUser\_ApprovalRequired\_ModifiedBy | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fApprovalStatus                           | int           | -1      | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Approval state: -1 default, 0 rejected, 1 approved, 2 pending (ApprovalStatus enum).                                                                                                                                                                                                                                                                                                                                                                 |
| fApprovedTs                               | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_ApprovedBy                   | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fBacklog                                  | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fBacklogTs                                | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_BacklogChangedBy             | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fSnoozed                                  | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fSnoozedReason                            | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Snooze reason as the label shown, such as "DND - Do Not Disturb", "NSR - No Service Required" or "Other"; some rows hold translated labels.                                                                                                                                                                                                                                                                                                          |
| fSnoozedNotes                             | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | free text                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| fSnoozedTs                                | bigint        |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tUser\_SnoozedBy                    | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fLockedNotes                              | text          |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| assignmentType                            | int           | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | How the task was assigned: 0 default, 1 AI assigned, 2 manually assigned (AssignmentType enum).                                                                                                                                                                                                                                                                                                                                                      |
| business\_aiSuggested                     | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | 0-default or non-ai, 1-ai                                                                                                                                                                                                                                                                                                                                                                                                                            |
| title\_aiSuggested                        | tinyint       | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | 0-default or non-ai, 1-ai                                                                                                                                                                                                                                                                                                                                                                                                                            |
| fCleaningType                             | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Kind of housekeeping clean: departure, stayover, standard or correction.                                                                                                                                                                                                                                                                                                                                                                             |
| fCorrectionClean                          | tinyint       | 0       | false    |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| fCleaningSubType                          | varchar(255)  |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             | Sub-kind of a standard clean, such as deep\_clean or touch\_up\_5\_min.                                                                                                                                                                                                                                                                                                                                                                              |
| uuid\_RoomStatus\_TaskRules               | varchar(50)   |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| uuid\_tRoomGuestStatus                    | varchar(50)   |         | 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. |

## Constraints

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

## Indexes

| Name                                              | Definition                                                                                                                   |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| BusinessUuid\_ServerTs\_Deleted                   | KEY BusinessUuid\_ServerTs\_Deleted (uuid\_tBusiness, fServerTs, fDeleted) USING BTREE                                       |
| fk\_tPri\_Job\_createdbyuser                      | KEY fk\_tPri\_Job\_createdbyuser (uuid\_tUser\_CreatedBy) USING BTREE                                                        |
| idx\_job\_business\_deleted\_archived\_color      | KEY idx\_job\_business\_deleted\_archived\_color (uuid\_tBusiness, fDeleted, fArchived, color) USING BTREE                   |
| idx\_job\_business\_deleted\_archived\_created    | KEY idx\_job\_business\_deleted\_archived\_created (uuid\_tBusiness, fDeleted, fArchived, fCreatedTs) USING BTREE            |
| idx\_job\_business\_softfreeze\_deleted\_archived | KEY idx\_job\_business\_softfreeze\_deleted\_archived (uuid\_tBusiness, fSoftFreeze, fDeleted, fArchived, color) USING BTREE |
| idx\_job\_schedule\_planned\_trigger              | KEY idx\_job\_schedule\_planned\_trigger (uuid\_schedule\_planned, fCreatedTs, fDeleted) USING BTREE                         |
| idx\_job\_status\_deleted\_archived\_greents      | KEY idx\_job\_status\_deleted\_archived\_greents (uuid\_tStatus, fDeleted, fArchived, fGreenTs) USING BTREE                  |
| uuid\_uuid\_bus\_2504                             | KEY uuid\_uuid\_bus\_2504 (uuid, uuid\_tBusiness) USING BTREE                                                                |
| PRIMARY                                           | PRIMARY KEY (id) USING BTREE                                                                                                 |
| uuid                                              | UNIQUE KEY uuid (uuid) USING BTREE                                                                                           |

## Relations

```mermaid
erDiagram

"comply_ContractorAsset" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"comply_SystemAsset" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobArea" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobAsset" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobChat" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobComplySystem" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobNotif" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobReminder" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobRoom" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobTag" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobTimeCost" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobTodo" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobTodoMedia" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobUser" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_JobUserAssigned" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_Log_Job" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_Log_Job_SoftFreeze" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"url_job_token" }o--o| "tPri_Job" : "FOREIGN KEY (uuid_tJob) REFERENCES tPri_Job (uuid)"
"tPri_Job" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Job" }o--o| "tPri_User" : "FOREIGN KEY (uuid_tUser_CreatedBy) REFERENCES tPri_User (uuid)"

"tPri_Job" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"comply_ContractorAsset" {
  int id PK
  varchar_255_ uuid_Contractor FK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"comply_SystemAsset" {
  int id PK
  varchar_255_ uuid_System FK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobArea" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobAsset" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_assetMain FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobChat" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobComplySystem" {
  int id PK
  varchar_255_ uuid_System FK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobNotif" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobReminder" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobRoom" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobTag" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tTag FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobTimeCost" {
  int id PK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUser FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobTodo" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobTodoMedia" {
  int id PK
  varchar_255_ uuid_tJobTodo FK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_JobUser" {
  int id PK
  varchar_255_ uuid_tJob FK
  varchar_255_ uuid_tUserBusiness FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"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_Log_Job" {
  int id PK
  varchar_255_ uuid_tJob FK
}
"tPri_Log_Job_SoftFreeze" {
  int id PK
  varchar_255_ uuid_tJob FK
}
"url_job_token" {
  int id PK
  varchar_255_ uuid_tJob FK
  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
}
"tPri_User" {
  int id PK
  varchar_255_ uuid
  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_job.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.
