Ticket Statuses from DB

This commit is contained in:
Marcus Hill
2024-03-29 11:22:32 +00:00
parent 63f35d5760
commit 667a93210c
14 changed files with 263 additions and 164 deletions

81
db.sql
View File

@@ -848,7 +848,10 @@ CREATE TABLE `networks` (
`network_description` text DEFAULT NULL,
`network_vlan` int(11) DEFAULT NULL,
`network` varchar(200) NOT NULL,
`network_subnet` varchar(200) DEFAULT NULL,
`network_gateway` varchar(200) NOT NULL,
`network_primary_dns` varchar(200) DEFAULT NULL,
`network_secondary_dns` varchar(200) DEFAULT NULL,
`network_dhcp_range` varchar(200) DEFAULT NULL,
`network_notes` text DEFAULT NULL,
`network_created_at` datetime NOT NULL DEFAULT current_timestamp(),
@@ -928,6 +931,24 @@ CREATE TABLE `products` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `project_templates`
--
DROP TABLE IF EXISTS `project_templates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_templates` (
`project_template_id` int(11) NOT NULL AUTO_INCREMENT,
`project_template_name` varchar(200) NOT NULL,
`project_template_description` text DEFAULT NULL,
`project_template_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`project_template_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`project_template_archived_at` datetime DEFAULT NULL,
PRIMARY KEY (`project_template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `projects`
--
@@ -937,11 +958,11 @@ DROP TABLE IF EXISTS `projects`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects` (
`project_id` int(11) NOT NULL AUTO_INCREMENT,
`project_template` tinyint(1) NOT NULL DEFAULT 0,
`project_name` varchar(255) NOT NULL,
`project_description` text DEFAULT NULL,
`project_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`project_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`project_completed_at` datetime DEFAULT NULL,
`project_archived_at` datetime DEFAULT NULL,
`project_client_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`project_id`)
@@ -1483,6 +1504,25 @@ CREATE TABLE `tags` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `task_templates`
--
DROP TABLE IF EXISTS `task_templates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `task_templates` (
`task_template_id` int(11) NOT NULL AUTO_INCREMENT,
`task_template_name` varchar(200) NOT NULL,
`task_template_description` text DEFAULT NULL,
`task_template_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`task_template_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`task_template_archived_at` datetime DEFAULT NULL,
`task_template_ticket_template_id` int(11) NOT NULL,
PRIMARY KEY (`task_template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tasks`
--
@@ -1492,17 +1532,14 @@ DROP TABLE IF EXISTS `tasks`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tasks` (
`task_id` int(11) NOT NULL AUTO_INCREMENT,
`task_template` tinyint(1) NOT NULL DEFAULT 0,
`task_name` varchar(255) NOT NULL,
`task_description` text DEFAULT NULL,
`task_finish_date` date DEFAULT NULL,
`task_status` varchar(255) DEFAULT NULL,
`task_completed_at` datetime DEFAULT NULL,
`task_completed_by` int(11) DEFAULT NULL,
`task_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`task_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`task_ticket_id` int(11) DEFAULT NULL,
`task_project_id` int(11) DEFAULT NULL,
PRIMARY KEY (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -1564,17 +1601,38 @@ CREATE TABLE `ticket_replies` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ticket_templates`
--
DROP TABLE IF EXISTS `ticket_templates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticket_templates` (
`ticket_template_id` int(11) NOT NULL AUTO_INCREMENT,
`ticket_template_name` varchar(200) NOT NULL,
`ticket_template_description` text DEFAULT NULL,
`ticket_template_subject` varchar(200) DEFAULT NULL,
`ticket_template_details` longtext DEFAULT NULL,
`ticket_template_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`ticket_template_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`ticket_template_archived_at` datetime DEFAULT NULL,
`ticket_template_project_template_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`ticket_template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ticket_statuses`
--
DROP TABLE IF EXISTS `ticket_statuses`;
CREATE TABLE IF NOT EXISTS `ticket_statuses` (
`ticket_status_id` int(11) NOT NULL AUTO_INCREMENT,
`ticket_status_name` varchar(200) NOT NULL,
`ticket_status_color` varchar(200) NOT NULL,
`ticket_status_active` TINYINT(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`ticket_status_id`)
`ticket_status_id` int(11) NOT NULL AUTO_INCREMENT,
`ticket_status_name` varchar(200) NOT NULL,
`ticket_status_color` varchar(200) NOT NULL,
`ticket_status_active` TINYINT(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`ticket_status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
@@ -1620,7 +1678,7 @@ CREATE TABLE `tickets` (
`ticket_id` int(11) NOT NULL AUTO_INCREMENT,
`ticket_prefix` varchar(200) DEFAULT NULL,
`ticket_number` int(11) NOT NULL,
`ticket_source` varchar(255) DEFAULT NULL,
`ticket_source` varchar(255) DEFAULT NULL COMMENT 'Where the Ticket Came from\r\nEmail, Client Portal, In-App, Project Template',
`ticket_category` varchar(200) DEFAULT NULL,
`ticket_subject` varchar(200) NOT NULL,
`ticket_details` longtext NOT NULL,
@@ -1644,6 +1702,7 @@ CREATE TABLE `tickets` (
`ticket_location_id` int(11) NOT NULL DEFAULT 0,
`ticket_asset_id` int(11) NOT NULL DEFAULT 0,
`ticket_invoice_id` int(11) NOT NULL DEFAULT 0,
`ticket_project_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`ticket_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -1820,4 +1879,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2024-03-19 17:11:58
-- As of 2024 03 29