===== MySQL implementation of the helpdesk tables ===== The UML [[class diagram]] 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 */;