Participants Table
Description: Stores participants involved in each ticket.
Table Definition:
CREATE TABLE Participants (
id INT PRIMARY KEY,
ticketId INT NOT NULL,
name VARCHAR(255) NULL,
type VARCHAR(50) NOT NULL,
identifier VARCHAR(255) NULL,
departmentIdentifier VARCHAR(255) NULL,
displayName VARCHAR(255) NULL,
protocolType VARCHAR(50) NULL,
subProtocolType VARCHAR(50) NULL,
isActive BOOLEAN NOT NULL DEFAULT TRUE,
isDeleted BOOLEAN NOT NULL DEFAULT FALSE,
contactId VARCHAR(255) NULL,
userName VARCHAR(255) NULL,
FOREIGN KEY (ticketId) REFERENCES Ticket(id)
);
Fields:
| Field Name | Data Type | Nullability | Constraints | Description |
|---|---|---|---|---|
| id | INT | NOT NULL | PRIMARY KEY | Unique identifier for each participant. |
| ticketId | INT | NOT NULL | FOREIGN KEY | References Ticket(id). |
| name | VARCHAR(255) | NULL | Name of the participant. | |
| type | VARCHAR(50) | NOT NULL | Type of participant (e.g., "User", "Bot"). | |
| identifier | VARCHAR(255) | NULL | Unique identifier of the participant. | |
| departmentIdentifier | VARCHAR(255) | NULL | Department identifier. | |
| displayName | VARCHAR(255) | NULL | Display name of the participant. | |
| protocolType | VARCHAR(50) | NULL | Protocol type used by the participant. | |
| subProtocolType | VARCHAR(50) | NULL | Sub-protocol type, if applicable. | |
| isActive | BOOLEAN | NOT NULL, DEFAULT TRUE | Indicates if the participant is active. | |
| isDeleted | BOOLEAN | NOT NULL, DEFAULT FALSE | Indicates if the participant is deleted. | |
| contactId | VARCHAR(255) | NULL | Contact ID associated with the participant. | |
| userName | VARCHAR(255) | NULL | Username of the participant. |