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

# tPri\_Business

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

## Description

A group of a site (UI: group), holding tasks and members, or an asset register; it carries the customer type and the soft-freeze settings.

<details>

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

```sql
CREATE TABLE `tPri_Business` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) DEFAULT NULL,
  `uuid_tParent` varchar(255) DEFAULT NULL,
  `enum_BusinessType` varchar(255) DEFAULT 'task',
  `fName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fAddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fImage` varchar(255) DEFAULT '',
  `fGuideJson` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `fContact` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fPhone` varchar(255) DEFAULT NULL,
  `fEmail` varchar(255) DEFAULT NULL,
  `fCustomerType` varchar(255) DEFAULT '0',
  `fWebsite` varchar(255) DEFAULT NULL,
  `sort_order` int DEFAULT '1000',
  `fOrigin` varchar(255) DEFAULT NULL,
  `fInActive` tinyint DEFAULT '0',
  `fDeleted` tinyint DEFAULT '0',
  `fSoftFreezeEnabled` tinyint DEFAULT '0',
  `fSoftFreezeThreshold_days` int DEFAULT '365' COMMENT 'Number of inactive days before a task becomes eligible for soft freeze',
  `fMinNumRed_NotSoftFrozen` int DEFAULT '30' COMMENT 'Minimum number of Red tasks to keep active before applying soft freeze',
  `fMinNumAmber_NotSoftFrozen` int DEFAULT '30' COMMENT 'Minimum number of Amber tasks to keep active before applying soft freeze',
  `fMinNumGreen_NotSoftFrozen` int DEFAULT '30' COMMENT 'Minimum number of Green tasks to keep active before applying soft freeze',
  `fCreatedTs` bigint DEFAULT NULL,
  `fModifiedTs` bigint DEFAULT NULL,
  `fServerTs` bigint DEFAULT NULL,
  `uuid_tUser_CreatedBy` varchar(255) DEFAULT NULL,
  `uuid_tUser_ModifiedBy` varchar(255) DEFAULT NULL,
  `excludeFromApi` tinyint DEFAULT '0',
  `excludeFromApiTs` bigint DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE,
  KEY `Uuid_ServerTs` (`uuid`,`fServerTs`),
  KEY `fk_tPri_Business_createdbyuser` (`uuid_tUser_CreatedBy`),
  KEY `uuid_uuid_parent2504` (`uuid`,`uuid_tParent`) USING BTREE,
  KEY `idx_business_parent_deleted` (`uuid_tParent`,`fDeleted`),
  CONSTRAINT `fk_business_parent` FOREIGN KEY (`uuid_tParent`) REFERENCES `tPri_Parent` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `fk_tPri_Business_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     |                  | [group\_invite](https://docs.snapfix.com/engineering-reference/db/tables/group_invite.md) [reg\_industry\_business\_templates](https://docs.snapfix.com/engineering-reference/db/tables/reg_industry_business_templates.md) [tPri\_Business\_Stats\_Monthly](https://docs.snapfix.com/engineering-reference/db/tables/tpri_business_stats_monthly.md) [tPri\_Job](https://docs.snapfix.com/engineering-reference/db/tables/tpri_job.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\_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\_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\_ParentOnboarding](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentonboarding.md) [tPri\_SettingsBusiness](https://docs.snapfix.com/engineering-reference/db/tables/tpri_settingsbusiness.md) [tPri\_Status](https://docs.snapfix.com/engineering-reference/db/tables/tpri_status.md) [tPri\_StatusSub](https://docs.snapfix.com/engineering-reference/db/tables/tpri_statussub.md) [tPri\_Tag](https://docs.snapfix.com/engineering-reference/db/tables/tpri_tag.md) [tPri\_TagHeader](https://docs.snapfix.com/engineering-reference/db/tables/tpri_tagheader.md) [tPri\_UserBusiness](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userbusiness.md) [wallboard\_instance](https://docs.snapfix.com/engineering-reference/db/tables/wallboard_instance.md) |                                                                                         |                                                                                                                                                                                                                                                                     |
| uuid\_tParent               | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [tPri\_Parent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parent.md) |                                                                                                                                                                                                                                                                     |
| enum\_BusinessType          | varchar(255) | task    | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | task for a group, asset for an asset register.                                                                                                                                                                                                                      |
| fName                       | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fAddress                    | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fImage                      | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fGuideJson                  | text         |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fContact                    | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fPhone                      | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fEmail                      | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fCustomerType               | varchar(255) | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | Customer type as text: 0 (not set), paying\_customer or non\_paying\_customer on staging; the CustomerType enum has no non\_paying\_customer \[[ASK-251](https://github.com/snapfix/docs/blob/main/ASK.md#ask-251-what-do-the-site-and-group-customer-types-mean)]. |
| fWebsite                    | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| sort\_order                 | int          | 1000    | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fOrigin                     | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | Where the group was created: an EnumOrigin number or a name such as web, webadmin, email or gl\_api; NULL on most rows.                                                                                                                                             |
| fInActive                   | tinyint      | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | 1 when the group is inactive; the archived filter reads it.                                                                                                                                                                                                         |
| fDeleted                    | tinyint      | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fSoftFreezeEnabled          | tinyint      | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fSoftFreezeThreshold\_days  | int          | 365     | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | Number of inactive days before a task becomes eligible for soft freeze                                                                                                                                                                                              |
| fMinNumRed\_NotSoftFrozen   | int          | 30      | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | Minimum number of Red tasks to keep active before applying soft freeze                                                                                                                                                                                              |
| fMinNumAmber\_NotSoftFrozen | int          | 30      | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | Minimum number of Amber tasks to keep active before applying soft freeze                                                                                                                                                                                            |
| fMinNumGreen\_NotSoftFrozen | int          | 30      | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         | Minimum number of Green tasks to keep active before applying soft freeze                                                                                                                                                                                            |
| fCreatedTs                  | bigint       |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fModifiedTs                 | bigint       |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| fServerTs                   | bigint       |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| uuid\_tUser\_CreatedBy      | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | [tPri\_User](https://docs.snapfix.com/engineering-reference/db/tables/tpri_user.md)     |                                                                                                                                                                                                                                                                     |
| uuid\_tUser\_ModifiedBy     | varchar(255) |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| excludeFromApi              | tinyint      | 0       | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |
| excludeFromApiTs            | bigint       |         | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                         |                                                                                                                                                                                                                                                                     |

## Viewpoints

| Name                                                                                         | Definition                                                                                                                                             |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [groups](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-6.md)            | Groups (`tPri_Business`) and their settings: tag folders and tags, tag folder and attribute rules, and group view logs.                                |
| [people-and-sites](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-20.md) | Who belongs where: organisations, sites, groups, accounts, their site and group memberships, multi-sites, addresses and the user and group type codes. |

## Constraints

| Name                              | Type        | Definition                                                        |
| --------------------------------- | ----------- | ----------------------------------------------------------------- |
| fk\_business\_parent              | FOREIGN KEY | FOREIGN KEY (uuid\_tParent) REFERENCES tPri\_Parent (uuid)        |
| fk\_tPri\_Business\_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                                                                 |
| --------------------------------- | -------------------------------------------------------------------------- |
| fk\_tPri\_Business\_createdbyuser | KEY fk\_tPri\_Business\_createdbyuser (uuid\_tUser\_CreatedBy) USING BTREE |
| idx\_business\_parent\_deleted    | KEY idx\_business\_parent\_deleted (uuid\_tParent, fDeleted) USING BTREE   |
| Uuid\_ServerTs                    | KEY Uuid\_ServerTs (uuid, fServerTs) USING BTREE                           |
| uuid\_uuid\_parent2504            | KEY uuid\_uuid\_parent2504 (uuid, uuid\_tParent) USING BTREE               |
| PRIMARY                           | PRIMARY KEY (id) USING BTREE                                               |
| uuid                              | UNIQUE KEY uuid (uuid) USING BTREE                                         |

## Relations

```mermaid
erDiagram

"group_invite" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"reg_industry_business_templates" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Business_Stats_Monthly" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Job" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobAsset" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobChat" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobNotif" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobReminder" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobTag" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobTimeCost" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobTodo" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobTodoMedia" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobUser" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_JobUserAssigned" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_ParentOnboarding" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_SettingsBusiness" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Status" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_StatusSub" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Tag" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_TagHeader" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_UserBusiness" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"wallboard_instance" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Business" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_Business" }o--o| "tPri_User" : "FOREIGN KEY (uuid_tUser_CreatedBy) REFERENCES tPri_User (uuid)"

"tPri_Business" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"group_invite" {
  int id PK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"reg_industry_business_templates" {
  int id PK
  varchar_255_ uuid_reg_industry FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Business_Stats_Monthly" {
  int id PK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Job" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_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_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_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_ParentOnboarding" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tBusiness FK
}
"tPri_SettingsBusiness" {
  int id PK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Status" {
  int id PK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_StatusSub" {
  int id PK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Tag" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tTagHeader FK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_TagHeader" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_UserBusiness" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"wallboard_instance" {
  int id PK
  varchar_255_ uuid_tBusiness FK
  varchar_255_ uuid_tUser FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Parent" {
  int id PK
  varchar_255_ uuid
  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_business.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.
