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

# Console 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-12.md).
{% endhint %}

## Description

Site Console and Multi-Site Console: site details and addresses, site settings, multi-sites, devices and username logins.

## Tables

| Name                                                                                                      | Columns | Comment                                                                                                                                                                                                                               | Type       |
| --------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [staff\_username](https://docs.snapfix.com/engineering-reference/db/tables/staff_username.md)             | 14      | One username login made in a site's Site Console: the user it signs in, the admin who made it and the proxy email its Cognito login uses.                                                                                             | BASE TABLE |
| [tPri\_Address](https://docs.snapfix.com/engineering-reference/db/tables/tpri_address.md)                 | 13      | A postal address of a site, linked through tPri\_ParentAddress. Each address save adds a new row.                                                                                                                                     | BASE TABLE |
| [tPri\_MultiSite](https://docs.snapfix.com/engineering-reference/db/tables/tpri_multisite.md)             | 18      | A multi-site (UI name "Multi-Site Console"), a named set of sites managed together that can share checklist templates and members. Its sites are in tPri\_MultiSiteParent.                                                            | BASE TABLE |
| [tPri\_MultiSiteParent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_multisiteparent.md) | 12      | Links a site (uuid\_tParent) to a multi-site (uuid\_tMultiSite).                                                                                                                                                                      | BASE TABLE |
| [tPri\_MultiSiteUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_multisiteuser.md)     | 15      | A user's membership of a multi-site, with admin, active and visible flags. No code reads fAdmin \[[ASK-123](https://github.com/snapfix/docs/blob/main/ASK.md#ask-123-who-may-manage-a-multi-site-and-change-its-members-site-roles)]. | BASE TABLE |
| [tPri\_Parent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parent.md)                   | 46      | 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.                                                                | BASE TABLE |
| [tPri\_ParentAddress](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentaddress.md)     | 11      | Links a site to an address (tPri\_Address) with its type. Every save adds a row, and readers take the newest row of each type.                                                                                                        | BASE TABLE |
| [tPri\_ParentDevice](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentdevice.md)       | 14      | One device's block state at one site, with notes. Login checks read only the newest row for each device, and sites blocked for the device are left out of the account's site list.                                                    | BASE TABLE |
| [tPri\_SettingsParent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_settingsparent.md)   | 19      | One site's feature switches, such as chat, the AI features (images, voice, video, documents, suggestions, agent, translation and tag rules) and the dynamic housekeeping timeline.                                                    | BASE TABLE |
| [tPub\_SettingsDefault](https://docs.snapfix.com/engineering-reference/db/tables/tpub_settingsdefault.md) | 9       | The one row of default group settings (auto-logout, update prompts, red dot alert, list and tag limits). Only php-apis's uncalled save\_new\_business copies it into a new group; the group creation in use sets its own values.      | BASE TABLE |

## Relations

```mermaid
erDiagram

"tPri_ParentAddress" }o--o| "tPri_Address" : "FOREIGN KEY (uuid_tAddress) REFERENCES tPri_Address (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_SettingsParent" |o--o| "tPri_Parent" : "FOREIGN KEY (uuid_tParent) REFERENCES tPri_Parent (uuid)"

"staff_username" {
}
"tPri_Address" {
  varchar_255_ uuid
}
"tPri_MultiSite" {
}
"tPri_MultiSiteParent" {
}
"tPri_MultiSiteUser" {
}
"tPri_Parent" {
  varchar_255_ uuid
}
"tPri_ParentAddress" {
  varchar_255_ uuid_tAddress
  varchar_255_ uuid_tParent
}
"tPri_ParentDevice" {
  varchar_255_ uuid_tParent
}
"tPri_SettingsParent" {
  varchar_255_ uuid_tParent
}
"tPub_SettingsDefault" {
}
```

***

> 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-12.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.
