MySQL implementation of the helpdesk tables

The UML UML class diagram for the helpdesk entities representing the logical model from which this is derived is listed on its own page.

--
-- Table structure for table `hd_timeinfo`
--
 
DROP TABLE IF EXISTS `hd_timeinfo`;
CREATE TABLE `hd_timeinfo` (
  `timeid` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `stime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `atime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `mtime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `etime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY  (`timeid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Helpdesk Module: Start/Access/Modification/End times.';
 
--
-- Dumping data for table `hd_timeinfo`
--
 
 
/*!40000 ALTER TABLE `hd_timeinfo` DISABLE KEYS */;
LOCK TABLES `hd_timeinfo` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `hd_timeinfo` ENABLE KEYS */;
 
--
-- Table structure for table `hd_user`
--
 
DROP TABLE IF EXISTS `hd_user`;
CREATE TABLE `hd_user` (
  `uid` int(10) NOT NULL DEFAULT '0',
  `uidcustomer` int(10) DEFAULT NULL,
  PRIMARY KEY  (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Helpdesk module: users and customers';
 
--
-- Dumping data for table `hd_user`
--
 
 
/*!40000 ALTER TABLE `hd_user` DISABLE KEYS */;
LOCK TABLES `hd_user` WRITE;
INSERT INTO `hd_user` VALUES (4,5),(5,5);
UNLOCK TABLES;
/*!40000 ALTER TABLE `hd_user` ENABLE KEYS */;
 
--
-- Table structure for table `hd_contract`
--
 
DROP TABLE IF EXISTS `hd_contract`;
CREATE TABLE `hd_contract` (
  `nid` int(10) NOT NULL DEFAULT '0',
  `timeid` int(10) NOT NULL DEFAULT '0',
  `uidcustomer` int(10) NOT NULL DEFAULT '0',
  `maxdate` datetime DEFAULT NULL,
  `maxtime` datetime DEFAULT NULL,
  `maxissue` int(10) DEFAULT NULL,
  `usemaxdate` tinyint(1) NOT NULL DEFAULT '0',
  `usemaxtime` tinyint(1) NOT NULL DEFAULT '0',
  `usemaxissue` tinyint(1) NOT NULL DEFAULT '0',
  `deftimeincrement` int(10) DEFAULT '1',
  `issuspended` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY  (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Helpdesk module : contract parameters';
 
--
-- Dumping data for table `hd_contract`
--
 
 
/*!40000 ALTER TABLE `hd_contract` DISABLE KEYS */;
LOCK TABLES `hd_contract` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `hd_contract` ENABLE KEYS */;
 
--
-- Table structure for table `hd_event`
--
 
DROP TABLE IF EXISTS `hd_event`;
CREATE TABLE `hd_event` (
  `nid` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `timeid` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `description` text NOT NULL,
  `contractid` int(10) DEFAULT NULL,
  `txnid` int(10) UNSIGNED DEFAULT NULL,
  `nidparent` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `nidroot` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `tidseverity` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `tidstatus` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `uidtech` int(10) UNSIGNED DEFAULT NULL,
  `tempcontact` text,
  `attachment` mediumblob,
  PRIMARY KEY  (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Helpdesk module: Ticket and followup events';
 
--
-- Dumping data for table `hd_event`
--
 
 
/*!40000 ALTER TABLE `hd_event` DISABLE KEYS */;
LOCK TABLES `hd_event` WRITE;
INSERT INTO `hd_event` VALUES (45,0,'',NULL,NULL,45,45,0,44,NULL,NULL,NULL),(47,0,'',NULL,NULL,47,47,0,0,NULL,NULL,NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `hd_event` ENABLE KEYS */;
hd/mysql.txt · Last modified: 2007/12/22 15:45 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki