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

# tPri\_Parent

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

## Description

One site, the customer account that holds groups, buildings, users and tasks, with its address, customer type, payment package, billing dates, time zone and settings.

<details>

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

```sql
CREATE TABLE `tPri_Parent` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) DEFAULT NULL,
  `uuid_tOrg` varchar(255) DEFAULT NULL,
  `fName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fImage` varchar(255) DEFAULT NULL,
  `fCustomerType` varchar(255) DEFAULT '0',
  `fCustomerTypeTs` bigint DEFAULT '0',
  `fTaskDashboardEnabled` tinyint DEFAULT '0',
  `fPaymentPackage` varchar(255) DEFAULT NULL,
  `fIndustryName` varchar(255) DEFAULT NULL,
  `fFirstInvoiceDateTs` bigint DEFAULT NULL,
  `fNextRenewalDateTs` bigint DEFAULT NULL,
  `fRiskScore` int DEFAULT NULL,
  `fRiskScoreTs` bigint DEFAULT NULL,
  `fSubYearly` tinyint DEFAULT NULL,
  `fInvoiceName` varchar(255) DEFAULT NULL COMMENT 'prob the Xero name',
  `fSalesName` varchar(255) DEFAULT NULL COMMENT 'prob the Hubspot name',
  `fAddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fPostalCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fCity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fCountry` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `origin` varchar(255) DEFAULT NULL,
  `email_key` varchar(255) DEFAULT NULL,
  `email_user_admin_uuid` varchar(255) DEFAULT NULL,
  `stripe_customer_id` varchar(255) DEFAULT NULL,
  `stripe_vat_id` varchar(255) DEFAULT NULL,
  `display_user_contact_data` tinyint DEFAULT '0',
  `default_currency` char(3) DEFAULT NULL,
  `std_countries` varchar(1000) DEFAULT NULL,
  `std_naics_codes` varchar(1000) DEFAULT NULL,
  `std_usecases` varchar(1000) DEFAULT NULL,
  `timezone_name` varchar(255) DEFAULT 'Europe/Dublin',
  `fPrivacyWarning` tinyint DEFAULT '0',
  `reg_notes` json DEFAULT NULL,
  `reg_contact_snapfix` tinyint DEFAULT '0',
  `reg_task_view_preference` varchar(255) DEFAULT NULL,
  `reg_secondary_fName` varchar(255) DEFAULT NULL,
  `fDeleted` tinyint DEFAULT '0',
  `fDeletedTs` bigint DEFAULT NULL,
  `fCreatedTs` bigint DEFAULT '0',
  `fModifiedTs` bigint DEFAULT '0',
  `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,
  UNIQUE KEY `email_key` (`email_key`) USING BTREE,
  KEY `fk_tPri_Parent_createdbyuser` (`uuid_tUser_CreatedBy`),
  CONSTRAINT `fk_tPri_Parent_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     |                  | [assetParentCatKey](https://docs.snapfix.com/engineering-reference/db/tables/assetparentcatkey.md) [assetReg](https://docs.snapfix.com/engineering-reference/db/tables/assetreg.md) [comply\_Contractor](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractor.md) [comply\_DocumentType](https://docs.snapfix.com/engineering-reference/db/tables/comply_documenttype.md) [comply\_SystemType](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemtype.md) [tPri\_Building](https://docs.snapfix.com/engineering-reference/db/tables/tpri_building.md) [tPri\_Business](https://docs.snapfix.com/engineering-reference/db/tables/tpri_business.md) [tPri\_ParentAddress](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentaddress.md) [tPri\_ParentDevice](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentdevice.md) [tPri\_ParentJobAttributeRule](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentjobattributerule.md) [tPri\_ParentOnboarding](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentonboarding.md) [tPri\_ParentRoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentroomstatus.md) [tPri\_SettingsParent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_settingsparent.md) [tPri\_UserParent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userparent.md) [tPri\_UserParent\_copy1](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userparent_copy1.md) [tPri\_UserPaywall](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userpaywall.md) |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| uuid\_tOrg                   | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fName                        | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fImage                       | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fCustomerType                | varchar(255)  | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     | Customer type label. The code lists 0 (the default), paying\_customer, sales\_trial, churn, test and investor\_probono; staging also has hacker, deleted, mkt-email and webapp\_created \[[ASK-251](https://github.com/snapfix/docs/blob/main/ASK.md#ask-251-what-do-the-site-and-group-customer-types-mean)]. |
| fCustomerTypeTs              | bigint        | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fTaskDashboardEnabled        | tinyint       | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fPaymentPackage              | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fIndustryName                | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fFirstInvoiceDateTs          | bigint        |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fNextRenewalDateTs           | bigint        |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fRiskScore                   | int           |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fRiskScoreTs                 | bigint        |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fSubYearly                   | tinyint       |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fInvoiceName                 | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     | prob the Xero name                                                                                                                                                                                                                                                                                             |
| fSalesName                   | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     | prob the Hubspot name                                                                                                                                                                                                                                                                                          |
| fAddress                     | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fPostalCode                  | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fCity                        | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fCountry                     | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| origin                       | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     | Where the site was created, for example web.                                                                                                                                                                                                                                                                   |
| email\_key                   | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     | A short text key of the site, unique across sites, for example riverside.                                                                                                                                                                                                                                      |
| email\_user\_admin\_uuid     | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| stripe\_customer\_id         | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| stripe\_vat\_id              | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| display\_user\_contact\_data | tinyint       | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| default\_currency            | char(3)       |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| std\_countries               | varchar(1000) |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| std\_naics\_codes            | varchar(1000) |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| std\_usecases                | varchar(1000) |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| timezone\_name               | varchar(255)  | Europe/Dublin | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     | IANA time zone name of the site, not an offset; the default is Europe/Dublin.                                                                                                                                                                                                                                  |
| fPrivacyWarning              | tinyint       | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| reg\_notes                   | json          |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| reg\_contact\_snapfix        | tinyint       | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| reg\_task\_view\_preference  | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| reg\_secondary\_fName        | varchar(255)  |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fDeleted                     | tinyint       | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fDeletedTs                   | bigint        |               | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fCreatedTs                   | bigint        | 0             | true     |                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                     |                                                                                                                                                                                                                                                                                                                |
| fModifiedTs                  | bigint        | 0             | 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                                                                                                                                             |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [console](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-12.md)          | Site Console and Multi-Site Console: site details and addresses, site settings, multi-sites, devices and username logins.                              |
| [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                                                        |
| ------------------------------- | ----------- | ----------------------------------------------------------------- |
| email\_key                      | UNIQUE      | UNIQUE KEY email\_key (email\_key)                                |
| fk\_tPri\_Parent\_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\_Parent\_createdbyuser | KEY fk\_tPri\_Parent\_createdbyuser (uuid\_tUser\_CreatedBy) USING BTREE |
| PRIMARY                         | PRIMARY KEY (id) USING BTREE                                             |
| email\_key                      | UNIQUE KEY email\_key (email\_key) USING BTREE                           |
| uuid                            | UNIQUE KEY uuid (uuid) USING BTREE                                       |

## Relations

```mermaid
erDiagram

"assetParentCatKey" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"assetReg" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"comply_Contractor" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"comply_DocumentType" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"comply_SystemType" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_Building" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_Business" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_ParentAddress" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_ParentDevice" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_ParentJobAttributeRule" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_ParentOnboarding" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_ParentRoomStatus" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_SettingsParent" |o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_UserParent" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_UserParent_copy1" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_UserPaywall" }o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"
"tPri_Parent" }o--o| "tPri_User" : "FOREIGN KEY (uuid_tUser_CreatedBy) REFERENCES tPri_User (uuid)"

"tPri_Parent" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tUser_CreatedBy FK
}
"assetParentCatKey" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"assetReg" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"comply_Contractor" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_enumFrequency FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"comply_DocumentType" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"comply_SystemType" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Building" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_Business" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_ParentAddress" {
  int id PK
  varchar_255_ uuid_tAddress FK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_ParentDevice" {
  int id PK
  varchar_255_ uuid_tParent FK
}
"tPri_ParentJobAttributeRule" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_ParentOnboarding" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tBusiness FK
}
"tPri_ParentRoomStatus" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_SettingsParent" {
  int id PK
  varchar_255_ uuid_tParent FK
}
"tPri_UserParent" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_UserParent_copy1" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_UserPaywall" {
  int id PK
  varchar_255_ uuid_tParent FK
  varchar_255_ uuid_tUser FK
  varchar_255_ uuid_tUser_CreatedBy FK
}
"tPri_User" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tUser_CreatedBy FK
}
```

***

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


---

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

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

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

```
GET https://docs.snapfix.com/engineering-reference/db/tables/tpri_parent.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.
