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

# opera\_RoomStatusMapping

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

## Description

Maps an OPERA room status to a Snapfix main and secondary room status of a building.

<details>

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

```sql
CREATE TABLE `opera_RoomStatusMapping` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) DEFAULT NULL,
  `uuid_opera_RoomStatus` varchar(255) DEFAULT NULL,
  `uuid_tBuildingRoomStatusMain` varchar(255) DEFAULT NULL,
  `uuid_tBuildingRoomStatusSecondary` varchar(255) DEFAULT NULL,
  `fInActive` tinyint DEFAULT '0',
  `fDeleted` tinyint DEFAULT '0',
  `fCreatedTs` bigint DEFAULT NULL,
  `fModifiedTs` bigint DEFAULT NULL,
  `fDeletedTs` bigint DEFAULT NULL,
  `fServerTs` bigint DEFAULT NULL,
  `uuid_tUser_CreatedBy` varchar(255) DEFAULT NULL,
  `uuid_tUser_ModifiedBy` varchar(255) DEFAULT NULL,
  `uuid_tUser_DeletedBy` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uuid` (`uuid`) USING BTREE,
  KEY `fk_opera_RoomStatusMapping_uuid_opera_RoomStatus` (`uuid_opera_RoomStatus`) USING BTREE,
  KEY `fk_opera_RoomStatusMapping_uuid_tBuildingRoomStatusMain` (`uuid_tBuildingRoomStatusMain`) USING BTREE,
  CONSTRAINT `fk_opera_RoomStatusMapping_uuid_opera_RoomStatus` FOREIGN KEY (`uuid_opera_RoomStatus`) REFERENCES `opera_RoomStatus` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `fk_opera_RoomStatusMapping_uuid_tBuildingRoomStatusMain` FOREIGN KEY (`uuid_tBuildingRoomStatusMain`) REFERENCES `tPri_BuildingRoomStatusMain` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
```

</details>

## Columns

| Name                               | Type         | Default | Nullable | Extra Definition | Parents                                                                                                                 | Comment                                                           |
| ---------------------------------- | ------------ | ------- | -------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| id                                 | int          |         | false    | auto\_increment  |                                                                                                                         |                                                                   |
| uuid                               | varchar(255) |         | true     |                  |                                                                                                                         |                                                                   |
| uuid\_opera\_RoomStatus            | varchar(255) |         | true     |                  | [opera\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/opera_roomstatus.md)                       |                                                                   |
| uuid\_tBuildingRoomStatusMain      | varchar(255) |         | true     |                  | [tPri\_BuildingRoomStatusMain](https://docs.snapfix.com/engineering-reference/db/tables/tpri_buildingroomstatusmain.md) | Points to tPri\_BuildingRoomStatusMain.uuid; no foreign key.      |
| uuid\_tBuildingRoomStatusSecondary | varchar(255) |         | true     |                  |                                                                                                                         | Points to tPri\_BuildingRoomStatusSecondary.uuid; no foreign key. |
| fInActive                          | tinyint      | 0       | true     |                  |                                                                                                                         |                                                                   |
| fDeleted                           | tinyint      | 0       | true     |                  |                                                                                                                         |                                                                   |
| fCreatedTs                         | bigint       |         | true     |                  |                                                                                                                         |                                                                   |
| fModifiedTs                        | bigint       |         | true     |                  |                                                                                                                         |                                                                   |
| fDeletedTs                         | bigint       |         | true     |                  |                                                                                                                         |                                                                   |
| fServerTs                          | bigint       |         | true     |                  |                                                                                                                         |                                                                   |
| uuid\_tUser\_CreatedBy             | varchar(255) |         | true     |                  |                                                                                                                         |                                                                   |
| uuid\_tUser\_ModifiedBy            | varchar(255) |         | true     |                  |                                                                                                                         |                                                                   |
| uuid\_tUser\_DeletedBy             | varchar(255) |         | true     |                  |                                                                                                                         |                                                                   |

## Viewpoints

| Name                                                                                     | Definition                                                                                                                                                               |
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [integrations](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-14.md) | Property management system (PMS) integrations (mappings, room statuses, inbound and outbound queues, webhooks), Deputy, and the keys of the Open API and the vendor API. |

## Constraints

| Name                                                        | Type        | Definition                                                                                 |
| ----------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------ |
| fk\_opera\_RoomStatusMapping\_uuid\_opera\_RoomStatus       | FOREIGN KEY | FOREIGN KEY (uuid\_opera\_RoomStatus) REFERENCES opera\_RoomStatus (uuid)                  |
| fk\_opera\_RoomStatusMapping\_uuid\_tBuildingRoomStatusMain | FOREIGN KEY | FOREIGN KEY (uuid\_tBuildingRoomStatusMain) REFERENCES tPri\_BuildingRoomStatusMain (uuid) |
| PRIMARY                                                     | PRIMARY KEY | PRIMARY KEY (id)                                                                           |
| uuid                                                        | UNIQUE      | UNIQUE KEY uuid (uuid)                                                                     |

## Indexes

| Name                                                        | Definition                                                                                                  |
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| fk\_opera\_RoomStatusMapping\_uuid\_opera\_RoomStatus       | KEY fk\_opera\_RoomStatusMapping\_uuid\_opera\_RoomStatus (uuid\_opera\_RoomStatus) USING BTREE             |
| fk\_opera\_RoomStatusMapping\_uuid\_tBuildingRoomStatusMain | KEY fk\_opera\_RoomStatusMapping\_uuid\_tBuildingRoomStatusMain (uuid\_tBuildingRoomStatusMain) USING BTREE |
| PRIMARY                                                     | PRIMARY KEY (id) USING BTREE                                                                                |
| uuid                                                        | UNIQUE KEY uuid (uuid) USING BTREE                                                                          |

## Relations

```mermaid
erDiagram

"opera_RoomStatusMapping" }o--o| "opera_RoomStatus" : "FOREIGN KEY (uuid_opera_RoomStatus) REFERENCES opera_RoomStatus (uuid)"
"opera_RoomStatusMapping" }o--o| "tPri_BuildingRoomStatusMain" : "FOREIGN KEY (uuid_tBuildingRoomStatusMain) REFERENCES tPri_BuildingRoomStatusMain (uuid)"

"opera_RoomStatusMapping" {
  int id PK
  varchar_255_ uuid_opera_RoomStatus FK
  varchar_255_ uuid_tBuildingRoomStatusMain FK
}
"opera_RoomStatus" {
  int id PK
  varchar_255_ uuid
}
"tPri_BuildingRoomStatusMain" {
  int id PK
  varchar_255_ uuid
  varchar_255_ uuid_tBuildingRoomSection FK
  varchar_255_ uuid_tRoomStatusIcon 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/opera_roomstatusmapping.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.
