# 7 Data Structures

{% hint style="success" %}
This section provides information on the core data structures/data models that are used by a Building Block. These data structures describe information that is exchanged between building blocks - they do not dictate internal data structures for a particular implementation. These data structures should also describe the *minimum* set of information that should be passed in an API call. The data structures can be extended for particular use cases.

Data Structures should consist of two sections. The first section should provide an overall resource model that shows the various data structures that are used by the Building Block and how these structures are inter-related.

The second section provides a more detailed breakdown of each data model. For each data model, the following information should be provided:

* Name
* Description
* Fields - the various fields in this data structure. Each field definition should contain the following:
  * Name
  * Type (string, Boolean, number, date, etc)
  * Description
  * You can also reference any standards that must be adhered to (ie. UTC standard for date/times)
  * Comments (any notes about this field)

Note that complete data structure definitions will be provided by the services APIs.
{% endhint %}

*\<Example Data Elements>*

## 7.1 Resource Model

*Note: Recommend using* [*https://app.diagrams.net/*](https://app.diagrams.net/) *to create the resource model and store in BuildingBlock repository*

*\<Example Resource Model>*

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdXe8NbIMZIv5sydPBf6%2Fuploads%2Fgit-blob-736cd906cff209af7113b298653cb11a8b5935b6%2Fdata-structures.png?alt=media" alt=""><figcaption></figcaption></figure>

## 7.2 Data Structures: <a href="#worklist-data-structure" id="worklist-data-structure"></a>

*Note: any relevant standards that are applicable to the fields of the data structures can be defined here.*

### 7.2.1 Worklist

**Description:** The WorkList data structure is used to track a list of subscribers to a particular session or event.

**Fields:**

<table data-header-hidden><thead><tr><th width="115"></th><th width="115"></th><th width="242"></th><th></th><th data-hidden></th><th data-hidden></th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td><td><strong>Notes</strong></td><td><strong>Foreign Key</strong></td><td><strong>Constraints</strong></td><td><strong>Required</strong></td></tr><tr><td>id</td><td>int</td><td>Unique identifier for this WorkList</td><td>Generated by building block on creation</td><td></td><td>PK</td><td>Y</td></tr><tr><td>name</td><td>string</td><td>Name for this WorkList</td><td></td><td></td><td>Uniq</td><td>Y</td></tr><tr><td>status</td><td>enum</td><td>Status of the WorkList</td><td>enum that is defined with the following fields: ACTIVE, SUSPENDED, CANCELED</td><td></td><td></td><td>Y</td></tr><tr><td>start_time</td><td>date</td><td>Start date/time for the WorkList</td><td></td><td></td><td></td><td>Y</td></tr><tr><td>end_time</td><td>date</td><td>End date/time for the WorkList</td><td></td><td></td><td></td><td>Y</td></tr><tr><td>alerts</td><td>integer array</td><td>Array of assigned alerts for this WorkList</td><td></td><td>Alert</td><td>FK</td><td>N</td></tr></tbody></table>

##


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://specs.govstack.global/content-management-system/7-data-structures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
