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

# package\_client

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

## Description

php-apis's copy of a server package (same uuid, without the Stripe and start-date columns), made the first time a site that has the package reads its packages.

<details>

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

```sql
CREATE TABLE `package_client` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(1024) DEFAULT NULL,
  `active` tinyint DEFAULT '1',
  `fStartTs` bigint DEFAULT NULL,
  `fEndTs` bigint DEFAULT NULL,
  `package` json DEFAULT NULL,
  `fDeleted` tinyint DEFAULT '0',
  `fCreatedTs` bigint DEFAULT '0',
  `fModifiedTs` bigint DEFAULT '0',
  `fServerTs` bigint DEFAULT '0',
  `uuid_tUser_CreatedBy` varchar(255) DEFAULT NULL,
  `uuid_tUser_ModifiedBy` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE,
  KEY `fk_package_client_createdbyuser` (`uuid_tUser_CreatedBy`),
  CONSTRAINT `fk_package_client_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 | Parents                                                                             | Comment                                                        |
| ----------------------- | ------------- | ------- | -------- | ---------------- | ----------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| id                      | int           |         | false    | auto\_increment  |                                                                                     |                                                                |
| uuid                    | varchar(255)  |         | true     |                  |                                                                                     |                                                                |
| type                    | varchar(255)  |         | true     |                  |                                                                                     | core on every staging row.                                     |
| name                    | varchar(255)  |         | true     |                  |                                                                                     |                                                                |
| description             | varchar(1024) |         | true     |                  |                                                                                     |                                                                |
| active                  | tinyint       | 1       | true     |                  |                                                                                     |                                                                |
| fStartTs                | bigint        |         | true     |                  |                                                                                     |                                                                |
| fEndTs                  | bigint        |         | true     |                  |                                                                                     |                                                                |
| package                 | json          |         | true     |                  |                                                                                     | JSON package definition, read by the package permission model. |
| fDeleted                | tinyint       | 0       | true     |                  |                                                                                     |                                                                |
| fCreatedTs              | bigint        | 0       | true     |                  |                                                                                     |                                                                |
| fModifiedTs             | bigint        | 0       | true     |                  |                                                                                     |                                                                |
| fServerTs               | bigint        | 0       | true     |                  |                                                                                     |                                                                |
| uuid\_tUser\_CreatedBy  | varchar(255)  |         | true     |                  | [tPri\_User](https://docs.snapfix.com/engineering-reference/db/tables/tpri_user.md) |                                                                |
| uuid\_tUser\_ModifiedBy | varchar(255)  |         | true     |                  |                                                                                     |                                                                |

## Viewpoints

| Name                                                                                | Definition                                                                                                                                                                           |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [billing](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-13.md) | Plans and packages, the billing organisation (`tPri_Org`) with its Stripe, GoCardless, Xero and HubSpot deal records, in-app purchases, the paywall, support minutes and currencies. |

## Constraints

| Name                               | Type        | Definition                                                        |
| ---------------------------------- | ----------- | ----------------------------------------------------------------- |
| fk\_package\_client\_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\_package\_client\_createdbyuser | KEY fk\_package\_client\_createdbyuser (uuid\_tUser\_CreatedBy) USING BTREE |
| PRIMARY                            | PRIMARY KEY (id) USING BTREE                                                |
| uuid                               | UNIQUE KEY uuid (uuid) USING BTREE                                          |

## Relations

```mermaid
erDiagram

"package_client" }o--o| "tPri_User" : "FOREIGN KEY (uuid_tUser_CreatedBy) REFERENCES tPri_User (uuid)"

"package_client" {
  int id PK
  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/package_client.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.
