--
-- Host: localhost    Database: autocity_stck1
-- ------------------------------------------------------


--
-- Current Database: `autocity_stck1`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `autocity_stck1` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `autocity_stck1`;

--
-- Table structure for table `tickets_categories`
--

CREATE TABLE `tickets_categories` (
  `tickets_categories_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `tickets_categories_name` varchar(20) NOT NULL DEFAULT '',
  `tickets_categories_order` tinyint(3) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`tickets_categories_id`),
  UNIQUE KEY `tickets_categories_name` (`tickets_categories_name`),
  KEY `tickets_categories_order` (`tickets_categories_order`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tickets_categories`
--

INSERT INTO `tickets_categories` VALUES (1,'AutoCity Finance',1),(2,'AutoCity Sales',2),(3,'AutoCity Sales Admin',1),(4,'AutoCity Parts',1),(5,'AutoCity Service',1),(6,'AutoCity Management',1),(7,'AutoCity IT',1);

--
-- Table structure for table `tickets_status`
--

CREATE TABLE `tickets_status` (
  `tickets_status_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `tickets_status_name` varchar(20) NOT NULL DEFAULT '',
  `tickets_status_order` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `tickets_status_color` varchar(6) NOT NULL DEFAULT '',
  PRIMARY KEY (`tickets_status_id`),
  KEY `tickets_status_name` (`tickets_status_name`),
  KEY `tickets_status_order` (`tickets_status_order`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tickets_status`
--

INSERT INTO `tickets_status` VALUES (1,'Low',1,'FFCC99'),(2,'Medium',2,'FF9966'),(3,'High',3,'FF6633'),(4,'Urgent',4,'FF3300');

--
-- Table structure for table `tickets_tickets`
--

CREATE TABLE `tickets_tickets` (
  `tickets_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `tickets_username` varchar(16) NOT NULL DEFAULT '',
  `tickets_subject` varchar(50) NOT NULL DEFAULT '',
  `tickets_timestamp` bigint(10) unsigned NOT NULL DEFAULT '0',
  `tickets_status` varchar(10) NOT NULL DEFAULT 'Open',
  `tickets_name` varchar(50) NOT NULL DEFAULT '',
  `tickets_email` varchar(50) NOT NULL DEFAULT '',
  `tickets_urgency` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `tickets_category` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `tickets_admin` varchar(20) NOT NULL DEFAULT 'Client',
  `tickets_child` smallint(5) unsigned NOT NULL DEFAULT '0',
  `tickets_question` text NOT NULL,
  PRIMARY KEY (`tickets_id`),
  KEY `tickets_username` (`tickets_username`),
  KEY `tickets_urgency` (`tickets_urgency`),
  KEY `tickets_category` (`tickets_category`),
  KEY `tickets_child` (`tickets_child`),
  KEY `tickets_status` (`tickets_status`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tickets_tickets`
--

INSERT INTO `tickets_tickets` VALUES (1,'lmartinez','test',1210176279,'Closed','Leomar Martinez','l.martinez@autocity-bv.com',4,7,'Client',0,'test');


