-
Notifications
You must be signed in to change notification settings - Fork 0
Table Definitions
ThomasJGarcia edited this page Jan 11, 2015
·
3 revisions
| Column Name | Description | Datatype | Constraint |
|---|---|---|---|
| id | The user's unique id. | int | PRIMARY KEY AUTO_INCREMENT |
| first | The user's first name. | varchar | NOT NULL |
| last | The user's last name. | varchar | NOT NULL |
| position | The ID of the user's position. | int | FOREIGN KEY REFERENCES Positions(id) |
| The user's email address. | varchar | NOT NULL | |
| room | The user's room number. | int | NOT NULL |
| Column Name | Description | Datatype | Constraint |
|---|---|---|---|
| id | The ticket's unique id. | int | PRIMARY KEY AUTO_INCREMENT |
| user | The ID of the user who added the ticket. | int | FOREIGN KEY REFERENCES Users(id) |
| consultant | The ID of the consultant assigned to the ticket. | int | FOREIGN KEY REFERENCES Users(id) |
| manager | The ID of the manager assigned to the ticket. | int | FOREIGN KEY REFERENCES Users(id) |
| description | The description of the user's problems. | text | NOT NULL |
| status | The ID of the status of the ticket. | int | FOREIGN KEY REFERENCES Statuses(id) |
| date | The date and time the ticket was created. | timestamp | DEFAULT CURRENT_TIMESTAMP |
| Column Name | Description | Datatype | Constraint |
|---|---|---|---|
| id | The unique ID of the message. | int | PRIMARY KEY AUTO_INCREMENT |
| ticket | The ID of the ticket the message is attached to. | int | FOREIGN KEY REFERENCES Tickets(id) |
| content | The content of the message. | text | NOT NULL |
| date | The date and time the message was sent. | timestamp | DEFAULT CURRENT_TIMESTAMP |
| Column Name | Description | Datatype | Constraint |
|---|---|---|---|
| id | The unique ID of the status code. | int | PRIMARY KEY AUTO_INCREMENT |
| name | The status's name (e.g. "Active"). | varchar | NOT NULL |
| Column Name | Description | Datatype | Constraint |
|---|---|---|---|
| id | The unique ID of the position. | int | PRIMARY KEY AUTO_INCREMENT |
| title | The position's name (e.g. "Consultant"). | varchar | NOT NULL |