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

# Groups tables

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

## Description

Groups (`tPri_Business`) and their settings: tag folders and tags, tag folder and attribute rules, and group view logs.

## Tables

| Name                                                                                                                            | Columns | Comment                                                                                                                                                                                              | Type       |
| ------------------------------------------------------------------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [tPri\_Business](https://docs.snapfix.com/engineering-reference/db/tables/tpri_business.md)                                     | 29      | A group of a site (UI: group), holding tasks and members, or an asset register; it carries the customer type and the soft-freeze settings.                                                           | BASE TABLE |
| [tPri\_BusinessJobAttributeRule](https://docs.snapfix.com/engineering-reference/db/tables/tpri_businessjobattributerule.md)     | 20      | A custom field of an asset register (UI: asset attributes), such as Asset ID or Location; each asset's value is in tPri\_JobAttribute. Almost all rows belong to asset registers.                    | BASE TABLE |
| [tPri\_BusinessTagHeaderRule](https://docs.snapfix.com/engineering-reference/db/tables/tpri_businesstagheaderrule.md)           | 14      | One group's rule for one tag folder (tPri\_TagHeader): whether the folder is excluded from the group or mandatory for its tasks.                                                                     | BASE TABLE |
| [tPri\_Log\_BusinessViewedUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_businessvieweduser.md)        | 8       | A row each time a user opens a group; the updates feed reads the newest one.                                                                                                                         | BASE TABLE |
| [tPri\_SettingsBusiness](https://docs.snapfix.com/engineering-reference/db/tables/tpri_settingsbusiness.md)                     | 38      | One group's settings, such as auto-logout, update prompts, list and tag limits, required tags, rooms and assignees, auto-archive and task approval.                                                  | BASE TABLE |
| [tPri\_Tag](https://docs.snapfix.com/engineering-reference/db/tables/tpri_tag.md)                                               | 16      | A tag in a group's tag folder (tPri\_TagHeader); tasks carry tags from this list.                                                                                                                    | BASE TABLE |
| [tPri\_TagHeader](https://docs.snapfix.com/engineering-reference/db/tables/tpri_tagheader.md)                                   | 17      | A tag folder of a group, such as Location, Equipment or Category, with name, description, icon and sort order. Its tags are rows in tPri\_Tag.                                                       | BASE TABLE |
| [tUserAddedToBusiness\_DeviceUuid](https://docs.snapfix.com/engineering-reference/db/tables/tuseraddedtobusiness_deviceuuid.md) | 5       | The device UUID recorded when a person is added to a group (uuid\_tUserBusiness), with the server time. php-apis checks for an existing row before it inserts one, and no row is newer than 2022-05. | BASE TABLE |

## Relations

```mermaid
erDiagram

"tPri_SettingsBusiness" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Tag" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"
"tPri_Tag" }o--o| "tPri_TagHeader" : "FOREIGN KEY (uuid_tTagHeader) REFERENCES tPri_TagHeader (uuid)"
"tPri_TagHeader" }o--o| "tPri_Business" : "FOREIGN KEY (uuid_tBusiness) REFERENCES tPri_Business (uuid)"

"tPri_Business" {
  varchar_255_ uuid
}
"tPri_BusinessJobAttributeRule" {
}
"tPri_BusinessTagHeaderRule" {
}
"tPri_Log_BusinessViewedUser" {
}
"tPri_SettingsBusiness" {
  varchar_255_ uuid_tBusiness
}
"tPri_Tag" {
  varchar_255_ uuid_tTagHeader
  varchar_255_ uuid_tBusiness
}
"tPri_TagHeader" {
  varchar_255_ uuid
  varchar_255_ uuid_tBusiness
}
"tUserAddedToBusiness_DeviceUuid" {
}
```

***

> 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/viewpoint-6.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.
