diff --git a/.gitfox/CODEOWNERS b/.gitfox/CODEOWNERS
index a0484e1136..0360e4d6c5 100644
--- a/.gitfox/CODEOWNERS
+++ b/.gitfox/CODEOWNERS
@@ -1,3 +1,5 @@
+config/cache.php liugang@easycorp.ltd zhujinyong@easycorp.ltd
framework/** liugang@easycorp.ltd zhujinyong@easycorp.ltd
lib/base/** liugang@easycorp.ltd zhujinyong@easycorp.ltd
+lib/cache/** liugang@easycorp.ltd zhujinyong@easycorp.ltd
CODEOWNERS liugang@easycorp.ltd zhujinyong@easycorp.ltd qishiyao@easycorp.ltd
diff --git a/Makefile b/Makefile
index 46a0f9054b..0051cf639a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
VERSION = $(shell head -n 1 VERSION)
XUANVERSION = $(shell jq -r .pkg.xuanxuan.gitVersion < ci.json)
XVERSION = $(shell jq -r .pkg.xuanxuan.version < ci.json)
+SUITEVERSION = $(shell jq -r .pkg.blocksuite.version < ci.json)
XHPROF_VERSION = 2.3.9
XUANPATH := $(XUANXUAN_SRC_PATH)
@@ -28,6 +29,8 @@ clean:
rm -f *.sh
rm -f *.deb *.rpm
common:
+ curl https://$(GITFOX_HOST)/_artifacts/zentao/raw/zui3/static/blocksuite/$(SUITEVERSION)/blocksuite-$(SUITEVERSION).tar.gz | tar zxf - -C www/js/zui3/editor/
+
mkdir zentaopms
cp -fr api zentaopms/
cp -fr bin zentaopms/
diff --git a/VERSION b/VERSION
index 74623ac8d7..90cd64c4fa 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-21.0
\ No newline at end of file
+21.1
\ No newline at end of file
diff --git a/api/v1/entries/doc.php b/api/v1/entries/doc.php
index 54b14fdd55..f7041b1fea 100644
--- a/api/v1/entries/doc.php
+++ b/api/v1/entries/doc.php
@@ -23,25 +23,20 @@ class docEntry extends entry
$this->resetOpenApp($this->param('tab', 'doc'));
$control = $this->loadController('doc', 'view');
- $control->view($docID);
- $data = $this->getData();
-
- if(!$data or !isset($data->status)) return $this->send400('error');
- if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
-
- $doc = $data->data->doc;
+ $doc = $this->loadModel('doc')->getByID($docID, 0, true);
+ if(!$doc) return $this->send400('error');
unset($doc->draft);
if(!empty($doc->files)) $doc->files = array_values((array)$doc->files);
- /* Set lib name */
- $doc->libName = $data->data->lib->name;
+ $lib = null;
+ if($doc->lib) $lib = $this->doc->getLibByID((int)$doc->lib);
+ $doc->libName = $lib ? $lib->name : '';
- $preAndNext = $data->data->preAndNext;
$doc->preAndNext = array();
- $doc->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
- $doc->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
+ $doc->preAndNext['pre'] = '';
+ $doc->preAndNext['next'] = '';
return $this->send(200, $this->format($doc, 'addedBy:user,addedDate:time,assignedTo:user,assignedDate:date,editedBy:user,editedDate:time,mailto:userList'));
}
diff --git a/ci.json b/ci.json
index a70fb1b4c4..9267d04c3b 100644
--- a/ci.json
+++ b/ci.json
@@ -15,6 +15,9 @@
},
"downgradeExt": {
"gitRepo": "ci/zentaoext-downgrade"
+ },
+ "blocksuite": {
+ "version": "0.17.32"
}
},
"image": {
diff --git a/config/config.php b/config/config.php
index 4492008fab..7e4c05d0cc 100644
--- a/config/config.php
+++ b/config/config.php
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
-$config->version = '21.0'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
+$config->version = '21.1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->liteVersion = '1.2'; // 迅捷版版本。 The version of Lite.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
diff --git a/config/zentaopms.php b/config/zentaopms.php
index 421771dfb0..40edc0f2d3 100644
--- a/config/zentaopms.php
+++ b/config/zentaopms.php
@@ -296,7 +296,12 @@ $config->logonMethods[] = 'instance.install';
$config->logonMethods[] = 'instance.setting';
$config->logonMethods[] = 'instance.upgrade';
$config->logonMethods[] = 'instance.view';
+$config->logonMethods[] = 'instance.backuplist';
$config->logonMethods[] = 'instance.visit';
+$config->logonMethods[] = 'instance.manualbackup';
+$config->logonMethods[] = 'instance.backupsettings';
+$config->logonMethods[] = 'instance.autobackup';
+$config->logonMethods[] = 'instance.ajaxRestore';
$config->logonMethods[] = 'jenkins.create';
$config->logonMethods[] = 'jenkins.edit';
$config->logonMethods[] = 'kanban.activatecard';
@@ -461,7 +466,6 @@ define('TABLE_MR', '`' . $config->db->prefix . 'mr`');
define('TABLE_MRAPPROVAL', '`' . $config->db->prefix . 'mrapproval`');
define('TABLE_SERVERROOM', '`' . $config->db->prefix . 'serverroom`');
-define('TABLE_ACCOUNT', '`' . $config->db->prefix . 'account`');
define('TABLE_HOST', '`' . $config->db->prefix . 'host`');
define('TABLE_REPO', '`' . $config->db->prefix . 'repo`');
define('TABLE_RELATION', '`' . $config->db->prefix . 'relation`');
@@ -518,7 +522,6 @@ define('TABLE_BUDGET', '`' . $config->db->prefix . 'budget`');
define('TABLE_CMCL', '`' . $config->db->prefix . 'cmcl`');
define('TABLE_DEPLOY', '`' . $config->db->prefix . 'deploy`');
define('TABLE_DEPLOYPRODUCT', '`' . $config->db->prefix . 'deployproduct`');
-define('TABLE_DEPLOYSCOPE', '`' . $config->db->prefix . 'deployscope`');
define('TABLE_DEPLOYSTEP', '`' . $config->db->prefix . 'deploystep`');
define('TABLE_DERIVEMEAS', '`' . $config->db->prefix . 'derivemeas`');
define('TABLE_DOMAIN', '`' . $config->db->prefix . 'domain`');
@@ -696,7 +699,6 @@ $config->objectTables['privmanager'] = TABLE_PRIVMANAGER;
$config->objectTables['privrelation'] = TABLE_PRIVRELATION;
$config->objectTables['scene'] = TABLE_SCENE;
$config->objectTables['pivot'] = TABLE_PIVOT;
-$config->objectTables['account'] = TABLE_ACCOUNT;
$config->objectTables['serverroom'] = TABLE_SERVERROOM;
$config->objectTables['host'] = TABLE_ZAHOST;
$config->objectTables['instance'] = TABLE_INSTANCE;
@@ -720,6 +722,7 @@ $config->objectTables['marketresearch'] = TABLE_PROJECT;
$config->objectTables['researchstage'] = TABLE_PROJECT;
$config->objectTables['workflowgroup'] = TABLE_WORKFLOWGROUP;
$config->objectTables['productline'] = TABLE_MODULE;
+$config->objectTables['repocommit'] = TABLE_REPOHISTORY;
$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions', 'aiPrompts', 'promptDesign', 'promptExec');
$config->disabledFeatures = '';
diff --git a/db/standard/zentao21.1.sql b/db/standard/zentao21.1.sql
new file mode 100644
index 0000000000..9249343c5a
--- /dev/null
+++ b/db/standard/zentao21.1.sql
@@ -0,0 +1,4435 @@
+CREATE TABLE `im_chat` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `name` varchar(60) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT 'group',
+ `admins` varchar(255) NOT NULL DEFAULT '',
+ `committers` varchar(255) NOT NULL DEFAULT '',
+ `subject` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `ownedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `mergedDate` datetime DEFAULT NULL,
+ `lastActiveTime` datetime DEFAULT NULL,
+ `lastMessage` int(11) unsigned NOT NULL DEFAULT 0,
+ `lastMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
+ `dismissDate` datetime DEFAULT NULL,
+ `pinnedMessages` text DEFAULT NULL,
+ `mergedChats` text DEFAULT NULL,
+ `adminInvite` enum('0','1') NOT NULL DEFAULT '0',
+ `avatar` text DEFAULT NULL,
+ `archiveDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `gid` (`gid`),
+ KEY `name` (`name`),
+ KEY `type` (`type`),
+ KEY `public` (`public`),
+ KEY `createdBy` (`createdBy`),
+ KEY `editedBy` (`editedBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_chat_message_index` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL,
+ `tableName` char(64) NOT NULL,
+ `start` int(11) unsigned NOT NULL,
+ `end` int(11) unsigned NOT NULL,
+ `startIndex` int(11) unsigned NOT NULL,
+ `endIndex` int(11) unsigned NOT NULL,
+ `startDate` datetime DEFAULT NULL,
+ `endDate` datetime DEFAULT NULL,
+ `count` mediumint(8) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `chattable` (`gid`,`tableName`),
+ KEY `start` (`start`),
+ KEY `end` (`end`),
+ KEY `startDate` (`startDate`),
+ KEY `endDate` (`endDate`),
+ KEY `chatstartindex` (`gid`,`startIndex`),
+ KEY `chatendindex` (`gid`,`endIndex`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_chatuser` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` mediumint(8) NOT NULL DEFAULT 0,
+ `order` smallint(5) NOT NULL DEFAULT 0,
+ `star` enum('0','1') NOT NULL DEFAULT '0',
+ `hide` enum('0','1') NOT NULL DEFAULT '0',
+ `mute` enum('0','1') NOT NULL DEFAULT '0',
+ `freeze` enum('0','1') NOT NULL DEFAULT '0',
+ `join` datetime DEFAULT NULL,
+ `quit` datetime DEFAULT NULL,
+ `category` varchar(40) NOT NULL DEFAULT '',
+ `lastReadMessage` int(11) unsigned NOT NULL DEFAULT 0,
+ `lastReadMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `chatuser` (`cgid`,`user`),
+ KEY `cgid` (`cgid`),
+ KEY `user` (`user`),
+ KEY `order` (`order`),
+ KEY `star` (`star`),
+ KEY `hide` (`hide`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_client` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `version` char(30) NOT NULL DEFAULT '',
+ `desc` varchar(100) NOT NULL DEFAULT '',
+ `changeLog` text DEFAULT NULL,
+ `strategy` varchar(10) NOT NULL DEFAULT '',
+ `downloads` text DEFAULT NULL,
+ `createdDate` datetime DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `status` enum('released','wait') NOT NULL DEFAULT 'wait',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_conference` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `rid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `status` enum('closed','open','notStarted','canceled') NOT NULL DEFAULT 'closed',
+ `participants` text DEFAULT NULL,
+ `subscribers` text DEFAULT NULL,
+ `invitee` text DEFAULT NULL,
+ `openedBy` mediumint(8) NOT NULL DEFAULT 0,
+ `openedDate` datetime DEFAULT NULL,
+ `topic` text DEFAULT NULL,
+ `startTime` datetime DEFAULT NULL,
+ `endTime` datetime DEFAULT NULL,
+ `password` char(20) NOT NULL DEFAULT '',
+ `type` enum('default','periodic','scheduled') NOT NULL DEFAULT 'default',
+ `number` char(20) NOT NULL DEFAULT '',
+ `note` text DEFAULT NULL,
+ `sentNotify` tinyint(1) NOT NULL DEFAULT 0,
+ `reminderTime` int(11) NOT NULL DEFAULT 0,
+ `moderators` text DEFAULT NULL,
+ `isPrivate` enum('0','1') NOT NULL DEFAULT '0',
+ `isInner` enum('0','1') NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`),
+ KEY `status` (`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_conferenceaction` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `rid` char(40) NOT NULL DEFAULT '',
+ `type` enum('create','invite','join','leave','close','publish') NOT NULL DEFAULT 'create',
+ `data` text DEFAULT NULL,
+ `user` mediumint(8) NOT NULL DEFAULT 0,
+ `date` datetime DEFAULT NULL,
+ `device` char(40) NOT NULL DEFAULT 'default',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_conferenceinvite` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `conferenceID` mediumint(8) unsigned NOT NULL,
+ `inviteeID` mediumint(8) unsigned NOT NULL,
+ `status` enum('pending','accepted','rejected') NOT NULL DEFAULT 'pending',
+ `createdDate` datetime DEFAULT NULL,
+ `updatedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `conference_user` (`conferenceID`,`inviteeID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_conferenceuser` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `conference` mediumint(8) NOT NULL DEFAULT 0,
+ `user` mediumint(8) NOT NULL DEFAULT 0,
+ `hide` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `conferenceuser` (`conference`,`user`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_message` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ `index` int(11) unsigned NOT NULL DEFAULT 0,
+ `type` enum('normal','broadcast','notify','bulletin','botcommand') NOT NULL DEFAULT 'normal',
+ `content` text DEFAULT NULL,
+ `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
+ `data` text DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `legacy` tinyint(1) NOT NULL DEFAULT 0,
+ `uniqueIndex` int(11) GENERATED ALWAYS AS (case when `legacy` = 1 then NULL when `cgid` = 'notification' then NULL else `index` end) STORED,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `uniqueIndexInChat` (`cgid`,`uniqueIndex`),
+ KEY `mgid` (`gid`),
+ KEY `mcgid` (`cgid`),
+ KEY `muser` (`user`),
+ KEY `mtype` (`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_message_backup` (
+ `id` int(11) unsigned NOT NULL,
+ `gid` char(40) NOT NULL DEFAULT '',
+ `cgid` char(40) NOT NULL DEFAULT '',
+ `user` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ `index` int(11) unsigned NOT NULL DEFAULT 0,
+ `type` enum('normal','broadcast','notify') NOT NULL DEFAULT 'normal',
+ `content` text DEFAULT NULL,
+ `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
+ `data` text DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_message_index` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `tableName` char(64) NOT NULL,
+ `start` int(11) unsigned NOT NULL,
+ `end` int(11) unsigned NOT NULL,
+ `startDate` datetime DEFAULT NULL,
+ `endDate` datetime DEFAULT NULL,
+ `chats` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `tableName` (`tableName`),
+ KEY `start` (`start`),
+ KEY `end` (`end`),
+ KEY `startDate` (`startDate`),
+ KEY `endDate` (`endDate`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_messagestatus` (
+ `user` mediumint(8) NOT NULL DEFAULT 0,
+ `message` int(11) unsigned NOT NULL,
+ `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting',
+ UNIQUE KEY `user` (`user`,`message`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_queue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL,
+ `content` text DEFAULT NULL,
+ `addDate` datetime DEFAULT NULL,
+ `processDate` datetime DEFAULT NULL,
+ `result` text DEFAULT NULL,
+ `status` char(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `im_userdevice` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `user` mediumint(8) NOT NULL DEFAULT 0,
+ `device` char(40) NOT NULL DEFAULT 'default',
+ `deviceID` char(40) NOT NULL DEFAULT '',
+ `token` char(64) NOT NULL DEFAULT '',
+ `validUntil` datetime DEFAULT NULL,
+ `lastLogin` datetime DEFAULT NULL,
+ `lastLogout` datetime DEFAULT NULL,
+ `online` tinyint(1) NOT NULL DEFAULT 0,
+ `version` char(10) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `userdevice` (`user`,`device`),
+ KEY `user` (`user`),
+ KEY `lastLogin` (`lastLogin`),
+ KEY `lastLogout` (`lastLogout`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_acl` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `objectType` char(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(9) NOT NULL DEFAULT 0,
+ `type` char(40) NOT NULL DEFAULT 'whitelist',
+ `source` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_action` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` text DEFAULT NULL,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `actor` varchar(100) NOT NULL DEFAULT '',
+ `action` varchar(80) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ `comment` text DEFAULT NULL,
+ `extra` text DEFAULT NULL,
+ `read` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `efforted` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `date` (`date`),
+ KEY `actor` (`actor`),
+ KEY `project` (`project`),
+ KEY `action` (`action`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_actionrecent` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` text DEFAULT NULL,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `actor` varchar(100) NOT NULL DEFAULT '',
+ `action` varchar(80) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ `comment` text DEFAULT NULL,
+ `extra` text DEFAULT NULL,
+ `read` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `efforted` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `date` (`date`),
+ KEY `actor` (`actor`),
+ KEY `project` (`project`),
+ KEY `action` (`action`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_activity` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `process` mediumint(9) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `optional` varchar(255) NOT NULL DEFAULT '',
+ `tailorNorm` varchar(255) NOT NULL DEFAULT '',
+ `content` mediumtext DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `order` mediumint(8) DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_assistant` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) NOT NULL,
+ `modelId` mediumint(8) unsigned NOT NULL,
+ `desc` text NOT NULL,
+ `systemMessage` text NOT NULL,
+ `greetings` text NOT NULL,
+ `icon` varchar(30) NOT NULL DEFAULT 'coding-1',
+ `enabled` enum('0','1') NOT NULL DEFAULT '1',
+ `createdDate` datetime NOT NULL,
+ `publishedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_message` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `appID` mediumint(8) unsigned NOT NULL,
+ `user` mediumint(8) unsigned NOT NULL,
+ `type` enum('req','res','ntf') NOT NULL,
+ `content` text NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_miniprogram` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) NOT NULL,
+ `category` varchar(30) NOT NULL,
+ `desc` text DEFAULT NULL,
+ `model` mediumint(8) unsigned DEFAULT NULL,
+ `icon` varchar(30) NOT NULL DEFAULT 'writinghand-7',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) NOT NULL,
+ `editedDate` datetime NOT NULL,
+ `published` enum('0','1') NOT NULL DEFAULT '0',
+ `publishedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `prompt` text NOT NULL,
+ `builtIn` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_miniprogramfield` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `appID` mediumint(8) unsigned NOT NULL,
+ `name` varchar(30) NOT NULL,
+ `type` enum('radio','checkbox','text','textarea') DEFAULT 'text',
+ `placeholder` text DEFAULT NULL,
+ `options` text DEFAULT NULL,
+ `required` enum('0','1') DEFAULT '1',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_miniprogramstar` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `appID` mediumint(8) unsigned NOT NULL,
+ `userID` mediumint(8) unsigned NOT NULL,
+ `createdDate` datetime NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `appID` (`appID`,`userID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_model` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(20) NOT NULL,
+ `vendor` varchar(20) NOT NULL,
+ `credentials` text NOT NULL,
+ `proxy` text DEFAULT NULL,
+ `name` varchar(20) DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) DEFAULT NULL,
+ `editedDate` datetime DEFAULT NULL,
+ `enabled` enum('0','1') NOT NULL DEFAULT '1',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_prompt` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(20) NOT NULL,
+ `desc` text DEFAULT NULL,
+ `model` mediumint(8) unsigned DEFAULT NULL,
+ `module` varchar(30) DEFAULT NULL,
+ `source` text DEFAULT NULL,
+ `targetForm` varchar(30) DEFAULT NULL,
+ `purpose` text DEFAULT NULL,
+ `elaboration` text DEFAULT NULL,
+ `role` text DEFAULT NULL,
+ `characterization` text DEFAULT NULL,
+ `status` enum('draft','active') NOT NULL DEFAULT 'draft',
+ `createdBy` varchar(30) NOT NULL,
+ `createdDate` datetime NOT NULL,
+ `editedBy` varchar(30) DEFAULT NULL,
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ai_promptrole` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `model` mediumint(8) unsigned DEFAULT NULL,
+ `role` text DEFAULT NULL,
+ `characterization` text DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_api` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `product` varchar(255) NOT NULL DEFAULT '',
+ `lib` int(11) unsigned NOT NULL DEFAULT 0,
+ `module` int(11) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(100) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `protocol` varchar(10) NOT NULL DEFAULT '',
+ `method` varchar(10) NOT NULL DEFAULT '',
+ `requestType` varchar(100) NOT NULL DEFAULT '',
+ `responseType` varchar(100) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '0',
+ `desc` mediumtext DEFAULT NULL,
+ `version` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `params` text DEFAULT NULL,
+ `paramsExample` text DEFAULT NULL,
+ `responseExample` text DEFAULT NULL,
+ `response` text DEFAULT NULL,
+ `commonParams` text DEFAULT NULL,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_api_lib_release` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `lib` int(11) unsigned NOT NULL DEFAULT 0,
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `version` varchar(255) NOT NULL DEFAULT '',
+ `snap` mediumtext DEFAULT NULL,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apispec` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` int(11) unsigned NOT NULL DEFAULT 0,
+ `module` int(11) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(100) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `protocol` varchar(10) NOT NULL DEFAULT '',
+ `method` varchar(10) NOT NULL DEFAULT '',
+ `requestType` varchar(100) NOT NULL DEFAULT '',
+ `responseType` varchar(100) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `owner` varchar(255) NOT NULL DEFAULT '0',
+ `desc` mediumtext DEFAULT NULL,
+ `version` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `params` text DEFAULT NULL,
+ `paramsExample` text DEFAULT NULL,
+ `responseExample` text DEFAULT NULL,
+ `response` text DEFAULT NULL,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apistruct` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `lib` int(11) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `type` varchar(50) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `version` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `attribute` text DEFAULT NULL,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_apistruct_spec` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(50) NOT NULL DEFAULT '',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `attribute` text DEFAULT NULL,
+ `version` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `addedBy` varchar(30) NOT NULL DEFAULT '0',
+ `addedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approval` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `flow` mediumint(8) NOT NULL DEFAULT 0,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(9) NOT NULL DEFAULT 0,
+ `nodes` mediumtext DEFAULT NULL,
+ `version` mediumint(9) NOT NULL DEFAULT 0,
+ `status` varchar(20) NOT NULL DEFAULT 'doing',
+ `result` varchar(20) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflow` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `code` varchar(100) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `version` mediumint(8) NOT NULL DEFAULT 1,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `workflow` varchar(30) NOT NULL DEFAULT '',
+ `deleted` tinyint(4) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflowobject` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `root` int(8) NOT NULL DEFAULT 0,
+ `flow` int(8) NOT NULL DEFAULT 0,
+ `objectType` char(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(9) NOT NULL DEFAULT 0,
+ `extra` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalflowspec` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `flow` mediumint(8) NOT NULL DEFAULT 0,
+ `version` mediumint(8) NOT NULL DEFAULT 0,
+ `nodes` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalnode` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `approval` mediumint(8) NOT NULL DEFAULT 0,
+ `type` enum('review','cc') NOT NULL DEFAULT 'review',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `account` char(30) NOT NULL DEFAULT '',
+ `node` varchar(100) NOT NULL DEFAULT '',
+ `reviewType` varchar(100) NOT NULL DEFAULT 'manual',
+ `agentType` varchar(100) NOT NULL DEFAULT 'pass',
+ `multipleType` enum('and','or') NOT NULL DEFAULT 'and',
+ `percent` smallint(6) NOT NULL DEFAULT 0,
+ `needAll` enum('0','1') NOT NULL DEFAULT '0',
+ `solicit` enum('0','1') NOT NULL DEFAULT '0',
+ `prev` mediumtext DEFAULT NULL,
+ `next` mediumtext DEFAULT NULL,
+ `status` varchar(20) NOT NULL DEFAULT 'wait',
+ `result` varchar(10) NOT NULL DEFAULT '',
+ `date` date DEFAULT NULL,
+ `opinion` mediumtext DEFAULT NULL,
+ `extra` mediumtext DEFAULT NULL,
+ `revertTo` char(30) NOT NULL DEFAULT '',
+ `forwardBy` char(30) NOT NULL DEFAULT '',
+ `reviewedBy` char(30) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `idx_reviewed_date` (`reviewedDate`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalobject` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `approval` int(8) NOT NULL DEFAULT 0,
+ `objectType` char(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) NOT NULL DEFAULT 0,
+ `extra` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_approvalrole` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `code` char(30) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `users` longtext DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_artifactrepo` (
+ `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(45) NOT NULL DEFAULT '',
+ `products` varchar(255) NOT NULL DEFAULT '',
+ `serverID` smallint(8) NOT NULL DEFAULT 0,
+ `repoName` varchar(45) NOT NULL DEFAULT '',
+ `format` varchar(10) NOT NULL DEFAULT '',
+ `type` char(7) NOT NULL DEFAULT '',
+ `status` varchar(10) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` tinyint(4) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_assetlib` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_attend` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `date` date DEFAULT NULL,
+ `signIn` time DEFAULT NULL,
+ `signOut` time DEFAULT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `ip` varchar(100) NOT NULL DEFAULT '',
+ `device` varchar(30) NOT NULL DEFAULT '',
+ `client` varchar(20) NOT NULL DEFAULT '',
+ `manualIn` time DEFAULT NULL,
+ `manualOut` time DEFAULT NULL,
+ `reason` varchar(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `reviewStatus` varchar(30) DEFAULT NULL,
+ `reviewedBy` char(30) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `attend` (`date`,`account`),
+ KEY `account` (`account`),
+ KEY `date` (`date`),
+ KEY `status` (`status`),
+ KEY `reason` (`reason`),
+ KEY `reviewStatus` (`reviewStatus`),
+ KEY `reviewedBy` (`reviewedBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_attendstat` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `month` char(10) NOT NULL DEFAULT '',
+ `normal` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `late` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `early` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `absent` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `trip` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `egress` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `lieu` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `paidLeave` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `unpaidLeave` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `timeOvertime` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `restOvertime` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `holidayOvertime` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `deserve` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `actual` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `status` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `attend` (`month`,`account`),
+ KEY `account` (`account`),
+ KEY `month` (`month`),
+ KEY `status` (`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL DEFAULT 'waterfall',
+ `practiceArea` char(30) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `objectType` char(30) NOT NULL DEFAULT '',
+ `objectID` int(11) NOT NULL DEFAULT 0,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `dateType` char(30) NOT NULL DEFAULT '',
+ `config` text DEFAULT NULL,
+ `objectID` mediumint(9) NOT NULL DEFAULT 0,
+ `objectType` char(30) NOT NULL DEFAULT '',
+ `process` mediumint(9) NOT NULL DEFAULT 0,
+ `processType` char(30) NOT NULL DEFAULT '',
+ `checkDate` date DEFAULT NULL,
+ `checkedBy` varchar(30) NOT NULL DEFAULT '',
+ `realCheckDate` date DEFAULT NULL,
+ `result` char(30) NOT NULL DEFAULT '',
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `checkBy` varchar(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_auditresult` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `auditplan` mediumint(8) NOT NULL DEFAULT 0,
+ `listID` mediumint(8) NOT NULL DEFAULT 0,
+ `result` char(30) NOT NULL DEFAULT '',
+ `checkedBy` varchar(30) NOT NULL DEFAULT '',
+ `checkedDate` date DEFAULT NULL,
+ `comment` text DEFAULT NULL,
+ `severity` char(30) NOT NULL DEFAULT '',
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_automation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `node` int(11) unsigned NOT NULL DEFAULT 0,
+ `product` int(11) unsigned NOT NULL DEFAULT 0,
+ `scriptPath` varchar(255) NOT NULL DEFAULT '',
+ `shell` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_basicmeas` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `purpose` varchar(50) NOT NULL DEFAULT '',
+ `scope` char(30) NOT NULL DEFAULT '',
+ `object` char(30) NOT NULL DEFAULT '',
+ `name` varchar(90) NOT NULL DEFAULT '',
+ `code` char(30) NOT NULL DEFAULT '',
+ `unit` varchar(100) NOT NULL DEFAULT '',
+ `configure` text DEFAULT NULL,
+ `params` text DEFAULT NULL,
+ `definition` text DEFAULT NULL,
+ `source` varchar(255) NOT NULL DEFAULT '',
+ `collectType` varchar(30) NOT NULL DEFAULT '',
+ `collectConf` text DEFAULT NULL,
+ `execTime` varchar(30) NOT NULL DEFAULT '',
+ `collectedBy` varchar(10) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_block` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `dashboard` varchar(20) NOT NULL DEFAULT '',
+ `module` varchar(20) NOT NULL DEFAULT '',
+ `title` varchar(100) NOT NULL DEFAULT '',
+ `block` varchar(30) NOT NULL DEFAULT '',
+ `code` varchar(30) NOT NULL DEFAULT '',
+ `width` enum('1','2','3') NOT NULL DEFAULT '1',
+ `height` smallint(6) unsigned NOT NULL DEFAULT 3,
+ `left` enum('0','1','2') NOT NULL DEFAULT '0',
+ `top` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `params` text DEFAULT NULL,
+ `hidden` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_branch` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `default` enum('0','1') NOT NULL DEFAULT '0',
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `desc` varchar(255) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `closedDate` date DEFAULT NULL,
+ `order` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_budget` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `stage` char(30) NOT NULL DEFAULT '',
+ `subject` mediumint(8) NOT NULL DEFAULT 0,
+ `amount` char(30) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_bug` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `injection` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `identify` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `plan` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `storyVersion` smallint(6) NOT NULL DEFAULT 1,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `toTask` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `toStory` mediumint(8) NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `severity` tinyint(4) NOT NULL DEFAULT 0,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `os` varchar(255) NOT NULL DEFAULT '',
+ `browser` varchar(255) NOT NULL DEFAULT '',
+ `hardware` varchar(30) NOT NULL DEFAULT '',
+ `found` varchar(30) NOT NULL DEFAULT '',
+ `steps` mediumtext DEFAULT NULL,
+ `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL DEFAULT '',
+ `confirmed` tinyint(1) NOT NULL DEFAULT 0,
+ `activatedCount` smallint(6) NOT NULL DEFAULT 0,
+ `activatedDate` datetime DEFAULT NULL,
+ `feedbackBy` varchar(100) NOT NULL DEFAULT '',
+ `notifyEmail` varchar(100) NOT NULL DEFAULT '',
+ `mailto` text DEFAULT NULL,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `openedBuild` varchar(255) NOT NULL DEFAULT '',
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deadline` date DEFAULT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `resolution` varchar(30) NOT NULL DEFAULT '',
+ `resolvedBuild` varchar(30) NOT NULL DEFAULT '',
+ `resolvedDate` datetime DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `duplicateBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `relatedBug` varchar(255) NOT NULL DEFAULT '',
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `caseVersion` smallint(6) NOT NULL DEFAULT 1,
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `result` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `mr` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `entry` text DEFAULT NULL,
+ `lines` varchar(10) NOT NULL DEFAULT '',
+ `v1` varchar(255) NOT NULL DEFAULT '',
+ `v2` varchar(255) NOT NULL DEFAULT '',
+ `repoType` varchar(30) NOT NULL DEFAULT '',
+ `issueKey` varchar(50) NOT NULL DEFAULT '',
+ `testtask` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `status` (`status`),
+ KEY `plan` (`plan`),
+ KEY `story` (`story`),
+ KEY `case` (`case`),
+ KEY `toStory` (`toStory`),
+ KEY `result` (`result`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `deleted` (`deleted`),
+ KEY `project` (`project`),
+ KEY `product_status_deleted` (`product`,`status`,`deleted`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_build` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` varchar(255) NOT NULL DEFAULT '0',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `builds` varchar(255) NOT NULL DEFAULT '',
+ `name` char(150) NOT NULL DEFAULT '',
+ `scmPath` char(255) NOT NULL DEFAULT '',
+ `filePath` char(255) NOT NULL DEFAULT '',
+ `date` date DEFAULT NULL,
+ `stories` text DEFAULT NULL,
+ `bugs` text DEFAULT NULL,
+ `artifactRepoID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `builder` char(30) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_burn` (
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `date` date NOT NULL,
+ `estimate` float NOT NULL DEFAULT 0,
+ `left` float NOT NULL DEFAULT 0,
+ `consumed` float NOT NULL DEFAULT 0,
+ `storyPoint` float NOT NULL DEFAULT 0,
+ PRIMARY KEY (`execution`,`date`,`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_case` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(30) unsigned NOT NULL DEFAULT 0,
+ `storyVersion` smallint(6) NOT NULL DEFAULT 1,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `precondition` text DEFAULT NULL,
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 3,
+ `type` char(30) NOT NULL DEFAULT '1',
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `frame` varchar(10) NOT NULL DEFAULT '',
+ `stage` varchar(255) NOT NULL DEFAULT '',
+ `howRun` varchar(30) NOT NULL DEFAULT '',
+ `script` longtext DEFAULT NULL,
+ `scriptedBy` varchar(30) NOT NULL DEFAULT '',
+ `scriptedDate` date DEFAULT NULL,
+ `scriptStatus` varchar(30) NOT NULL DEFAULT '',
+ `scriptLocation` varchar(255) NOT NULL DEFAULT '',
+ `status` char(30) NOT NULL DEFAULT '1',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL DEFAULT '',
+ `frequency` enum('1','2','3') NOT NULL DEFAULT '1',
+ `order` tinyint(30) unsigned NOT NULL DEFAULT 0,
+ `openedBy` char(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `reviewedBy` varchar(255) NOT NULL DEFAULT '',
+ `reviewedDate` date DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `version` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `linkCase` varchar(255) NOT NULL DEFAULT '',
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromCaseID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromCaseVersion` mediumint(8) unsigned NOT NULL DEFAULT 1,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `lastRunner` varchar(30) NOT NULL DEFAULT '',
+ `lastRunDate` datetime DEFAULT NULL,
+ `lastRunResult` char(30) NOT NULL DEFAULT '',
+ `scene` int(11) NOT NULL DEFAULT 0,
+ `sort` int(11) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `story` (`story`),
+ KEY `fromBug` (`fromBug`),
+ KEY `module` (`module`),
+ KEY `scene` (`scene`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_casestep` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `type` varchar(10) NOT NULL DEFAULT 'step',
+ `desc` text DEFAULT NULL,
+ `expect` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cfd` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `execution` int(8) NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT '',
+ `name` char(30) NOT NULL DEFAULT '',
+ `count` smallint(6) NOT NULL DEFAULT 0,
+ `date` date DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_chart` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `code` varchar(255) NOT NULL DEFAULT '',
+ `driver` enum('mysql','duckdb') NOT NULL DEFAULT 'mysql',
+ `mode` enum('text','builder') NOT NULL DEFAULT 'builder',
+ `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `group` varchar(255) NOT NULL DEFAULT '',
+ `dataset` varchar(30) NOT NULL DEFAULT '0',
+ `desc` text DEFAULT NULL,
+ `acl` enum('open','private') NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `settings` mediumtext DEFAULT NULL,
+ `filters` mediumtext DEFAULT NULL,
+ `step` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `fields` mediumtext DEFAULT NULL,
+ `langs` text DEFAULT NULL,
+ `sql` mediumtext DEFAULT NULL,
+ `stage` enum('draft','published') NOT NULL DEFAULT 'draft',
+ `builtin` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `objects` mediumtext DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_charter` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `level` int(8) NOT NULL DEFAULT 0,
+ `category` char(30) NOT NULL DEFAULT '',
+ `market` varchar(30) NOT NULL DEFAULT '',
+ `check` enum('0','1') NOT NULL DEFAULT '0',
+ `appliedBy` char(30) NOT NULL DEFAULT '',
+ `appliedDate` datetime DEFAULT NULL,
+ `budget` char(30) NOT NULL DEFAULT '',
+ `budgetUnit` char(30) NOT NULL DEFAULT '',
+ `product` text DEFAULT NULL,
+ `roadmap` text DEFAULT NULL,
+ `spec` mediumtext DEFAULT NULL,
+ `status` char(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `charterFiles` text DEFAULT NULL,
+ `closedBy` char(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `closedReason` varchar(255) NOT NULL DEFAULT '',
+ `activatedBy` char(30) NOT NULL DEFAULT '',
+ `activatedDate` datetime DEFAULT NULL,
+ `reviewedBy` varchar(255) NOT NULL DEFAULT '',
+ `reviewedResult` char(30) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ `meetingDate` date DEFAULT NULL,
+ `meetingLocation` varchar(255) NOT NULL DEFAULT '',
+ `meetingMinutes` mediumtext DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cmcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL DEFAULT '',
+ `projectType` varchar(255) NOT NULL DEFAULT '',
+ `title` int(11) NOT NULL DEFAULT 0,
+ `contents` text DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `order` int(11) NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_company` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(120) DEFAULT NULL,
+ `phone` char(20) DEFAULT NULL,
+ `fax` char(20) DEFAULT NULL,
+ `address` char(120) DEFAULT NULL,
+ `zipcode` char(10) DEFAULT NULL,
+ `website` char(120) DEFAULT NULL,
+ `backyard` char(120) DEFAULT NULL,
+ `guest` enum('1','0') NOT NULL DEFAULT '0',
+ `admins` char(255) DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_compile` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL DEFAULT '',
+ `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `queue` mediumint(8) NOT NULL DEFAULT 0,
+ `status` varchar(255) NOT NULL DEFAULT '',
+ `logs` longtext DEFAULT NULL,
+ `atTime` varchar(10) NOT NULL DEFAULT '',
+ `testtask` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `tag` varchar(255) NOT NULL DEFAULT '',
+ `times` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `updateDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_config` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT '',
+ `owner` char(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `section` char(30) NOT NULL DEFAULT '',
+ `key` char(30) NOT NULL DEFAULT '',
+ `value` longtext DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`),
+ KEY `vision` (`vision`),
+ KEY `owner` (`owner`),
+ KEY `module` (`module`),
+ KEY `key` (`key`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_cron` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `m` varchar(20) NOT NULL DEFAULT '',
+ `h` varchar(20) NOT NULL DEFAULT '',
+ `dom` varchar(20) NOT NULL DEFAULT '',
+ `mon` varchar(20) NOT NULL DEFAULT '',
+ `dow` varchar(20) NOT NULL DEFAULT '',
+ `command` text DEFAULT NULL,
+ `remark` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT '',
+ `buildin` tinyint(1) NOT NULL DEFAULT 0,
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `lastTime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `lastTime` (`lastTime`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dashboard` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `dimension` int(8) NOT NULL DEFAULT 0,
+ `module` mediumint(8) NOT NULL DEFAULT 0,
+ `desc` mediumtext DEFAULT NULL,
+ `layout` mediumtext DEFAULT NULL,
+ `filters` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dataset` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(155) NOT NULL DEFAULT '',
+ `sql` text DEFAULT NULL,
+ `fields` mediumtext DEFAULT NULL,
+ `objects` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dataview` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(155) NOT NULL DEFAULT '',
+ `code` varchar(50) NOT NULL DEFAULT '',
+ `mode` enum('text','builder') NOT NULL DEFAULT 'builder',
+ `view` varchar(57) NOT NULL DEFAULT '',
+ `sql` text DEFAULT NULL,
+ `fields` mediumtext DEFAULT NULL,
+ `langs` text DEFAULT NULL,
+ `objects` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` tinyint(4) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_demand` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `pool` int(8) NOT NULL DEFAULT 0,
+ `module` int(8) NOT NULL DEFAULT 0,
+ `product` varchar(255) NOT NULL DEFAULT '',
+ `parent` mediumint(8) NOT NULL DEFAULT 0,
+ `pri` char(30) NOT NULL DEFAULT '',
+ `category` char(30) NOT NULL DEFAULT '',
+ `source` char(30) NOT NULL DEFAULT '',
+ `sourceNote` varchar(255) NOT NULL DEFAULT '',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `feedbackedBy` varchar(255) NOT NULL DEFAULT '',
+ `email` varchar(255) NOT NULL DEFAULT '',
+ `assignedTo` char(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `reviewedBy` text DEFAULT NULL,
+ `reviewedDate` datetime DEFAULT NULL,
+ `status` char(30) NOT NULL DEFAULT '',
+ `stage` enum('wait','distributed','inroadmap','incharter','developing','delivering','delivered','closed') NOT NULL DEFAULT 'wait',
+ `duration` char(30) NOT NULL DEFAULT '',
+ `BSA` char(30) NOT NULL DEFAULT '',
+ `story` mediumint(8) NOT NULL DEFAULT 0,
+ `roadmap` mediumint(8) NOT NULL DEFAULT 0,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `mailto` text DEFAULT NULL,
+ `duplicateDemand` mediumint(8) DEFAULT NULL,
+ `childDemands` varchar(255) NOT NULL DEFAULT '',
+ `version` varchar(255) NOT NULL DEFAULT '',
+ `parentVersion` smallint(6) NOT NULL DEFAULT 0,
+ `vision` varchar(255) NOT NULL DEFAULT 'or',
+ `color` varchar(255) NOT NULL DEFAULT '',
+ `changedBy` char(30) NOT NULL DEFAULT '',
+ `changedDate` datetime DEFAULT NULL,
+ `closedBy` char(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `closedReason` varchar(30) NOT NULL DEFAULT '',
+ `submitedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `activatedDate` datetime DEFAULT NULL,
+ `distributedBy` varchar(30) NOT NULL DEFAULT '',
+ `distributedDate` datetime DEFAULT NULL,
+ `feedback` mediumint(9) NOT NULL DEFAULT 0,
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_demandpool` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `status` char(30) NOT NULL DEFAULT '',
+ `products` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `owner` text DEFAULT NULL,
+ `reviewer` text DEFAULT NULL,
+ `acl` char(30) DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_demandreview` (
+ `demand` mediumint(9) NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `reviewer` varchar(30) NOT NULL DEFAULT '',
+ `result` varchar(30) NOT NULL DEFAULT '',
+ `reviewDate` datetime DEFAULT NULL,
+ UNIQUE KEY `demand` (`demand`,`version`,`reviewer`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_demandspec` (
+ `demand` mediumint(9) NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `spec` mediumtext DEFAULT NULL,
+ `verify` mediumtext DEFAULT NULL,
+ `files` text DEFAULT NULL,
+ UNIQUE KEY `demand` (`demand`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deploy` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `begin` datetime DEFAULT NULL,
+ `end` datetime DEFAULT NULL,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `host` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `owner` char(30) NOT NULL DEFAULT '',
+ `members` text DEFAULT NULL,
+ `notify` text DEFAULT NULL,
+ `cases` text DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `result` varchar(20) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deployproduct` (
+ `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `release` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_deploystep` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `stage` varchar(30) NOT NULL DEFAULT '',
+ `content` text DEFAULT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `assignedTo` char(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `finishedBy` char(30) NOT NULL DEFAULT '',
+ `finishedDate` datetime DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dept` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(60) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `order` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `position` char(30) NOT NULL DEFAULT '',
+ `function` char(255) NOT NULL DEFAULT '',
+ `manager` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_design` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` varchar(255) NOT NULL DEFAULT '',
+ `product` varchar(255) NOT NULL DEFAULT '',
+ `commit` text DEFAULT NULL,
+ `commitedBy` varchar(30) NOT NULL DEFAULT '',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `story` char(30) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_designspec` (
+ `design` mediumint(8) NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `files` varchar(255) NOT NULL DEFAULT '',
+ UNIQUE KEY `design` (`design`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_dimension` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(90) NOT NULL DEFAULT '',
+ `code` varchar(45) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `acl` enum('open','private') NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `code` (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doc` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `lib` varchar(30) NOT NULL DEFAULT '',
+ `template` varchar(30) NOT NULL DEFAULT '',
+ `templateType` varchar(30) NOT NULL DEFAULT '',
+ `chapterType` varchar(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT 'normal',
+ `parent` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `order` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `views` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `assetLib` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `assetLibType` varchar(30) NOT NULL DEFAULT '',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromVersion` smallint(6) NOT NULL DEFAULT 1,
+ `draft` longtext DEFAULT NULL,
+ `collects` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `addedBy` varchar(30) NOT NULL DEFAULT '',
+ `addedDate` datetime DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `approvedDate` date DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `editingDate` text DEFAULT NULL,
+ `editedList` text DEFAULT NULL,
+ `mailto` text DEFAULT NULL,
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL DEFAULT '',
+ `users` text DEFAULT NULL,
+ `version` smallint(6) unsigned NOT NULL DEFAULT 1,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`),
+ KEY `lib` (`lib`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_docaction` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `action` varchar(80) NOT NULL DEFAULT '',
+ `actor` char(30) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `doc` (`doc`),
+ KEY `actor` (`actor`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doccontent` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `doc` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `digest` varchar(255) NOT NULL DEFAULT '',
+ `content` longtext DEFAULT NULL,
+ `files` text DEFAULT NULL,
+ `type` varchar(10) NOT NULL DEFAULT '',
+ `version` smallint(6) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `doc_version` (`doc`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_doclib` (
+ `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(60) NOT NULL DEFAULT '',
+ `baseUrl` varchar(255) NOT NULL DEFAULT '',
+ `acl` varchar(10) NOT NULL DEFAULT 'open',
+ `groups` varchar(255) NOT NULL DEFAULT '',
+ `users` text DEFAULT NULL,
+ `main` enum('0','1') NOT NULL DEFAULT '0',
+ `collector` text DEFAULT NULL,
+ `desc` mediumtext DEFAULT NULL,
+ `order` tinyint(5) unsigned NOT NULL DEFAULT 0,
+ `addedBy` varchar(30) NOT NULL DEFAULT '',
+ `addedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `orderBy` varchar(30) NOT NULL DEFAULT 'id_asc',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `execution` (`execution`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_domain` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `domain` varchar(255) NOT NULL DEFAULT '',
+ `adminURI` varchar(255) NOT NULL DEFAULT '',
+ `resolverURI` varchar(255) NOT NULL DEFAULT '',
+ `register` varchar(255) NOT NULL DEFAULT '',
+ `expiredDate` datetime DEFAULT NULL,
+ `renew` varchar(255) NOT NULL DEFAULT '',
+ `account` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `domain` (`domain`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_duckdbqueue` (
+ `object` varchar(255) NOT NULL DEFAULT '',
+ `updatedTime` datetime DEFAULT NULL,
+ `syncTime` datetime DEFAULT NULL,
+ UNIQUE KEY `object` (`object`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_durationestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `stage` mediumint(9) NOT NULL DEFAULT 0,
+ `workload` varchar(255) NOT NULL DEFAULT '',
+ `worktimeRate` varchar(255) NOT NULL DEFAULT '',
+ `people` varchar(255) NOT NULL DEFAULT '',
+ `startDate` date DEFAULT NULL,
+ `endDate` date DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_effort` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` text DEFAULT NULL,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `work` text DEFAULT NULL,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `date` date DEFAULT NULL,
+ `left` float NOT NULL DEFAULT 0,
+ `consumed` float NOT NULL DEFAULT 0,
+ `begin` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
+ `end` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
+ `extra` text DEFAULT NULL,
+ `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `execution` (`execution`),
+ KEY `objectID` (`objectID`),
+ KEY `date` (`date`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_entry` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL DEFAULT '',
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `code` varchar(20) NOT NULL DEFAULT '',
+ `key` varchar(32) NOT NULL DEFAULT '',
+ `freePasswd` enum('0','1') NOT NULL DEFAULT '0',
+ `ip` varchar(100) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `calledTime` int(11) unsigned NOT NULL DEFAULT 0,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_expect` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `userID` mediumint(8) NOT NULL DEFAULT 0,
+ `project` mediumint(8) NOT NULL DEFAULT 0,
+ `expect` text DEFAULT NULL,
+ `progress` text DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_extension` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(150) NOT NULL DEFAULT '',
+ `code` varchar(30) NOT NULL DEFAULT '',
+ `version` varchar(50) NOT NULL DEFAULT '',
+ `author` varchar(100) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `license` text DEFAULT NULL,
+ `type` varchar(20) NOT NULL DEFAULT 'extension',
+ `site` varchar(150) NOT NULL DEFAULT '',
+ `zentaoCompatible` text DEFAULT NULL,
+ `installedTime` datetime DEFAULT NULL,
+ `depends` varchar(100) NOT NULL DEFAULT '',
+ `dirs` mediumtext DEFAULT NULL,
+ `files` mediumtext DEFAULT NULL,
+ `status` varchar(20) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`),
+ KEY `name` (`name`),
+ KEY `installedTime` (`installedTime`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_faq` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `module` mediumint(9) NOT NULL DEFAULT 0,
+ `product` mediumint(9) NOT NULL DEFAULT 0,
+ `question` varchar(255) NOT NULL DEFAULT '',
+ `answer` text DEFAULT NULL,
+ `addedtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_feedback` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `solution` char(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 2,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ `notify` enum('0','1') NOT NULL DEFAULT '0',
+ `notifyEmail` varchar(100) NOT NULL DEFAULT '',
+ `source` varchar(255) NOT NULL DEFAULT '',
+ `likes` text DEFAULT NULL,
+ `result` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `faq` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `openedBy` char(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `reviewedBy` varchar(255) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ `processedBy` char(30) NOT NULL DEFAULT '',
+ `processedDate` datetime DEFAULT NULL,
+ `closedBy` char(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `closedReason` varchar(30) NOT NULL DEFAULT '',
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedTo` varchar(255) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `activatedBy` varchar(30) NOT NULL DEFAULT '',
+ `activatedDate` datetime DEFAULT NULL,
+ `feedbackBy` varchar(100) NOT NULL DEFAULT '',
+ `repeatFeedback` mediumint(8) NOT NULL DEFAULT 0,
+ `mailto` varchar(255) NOT NULL DEFAULT '',
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_feedbackview` (
+ `account` char(30) NOT NULL DEFAULT '',
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ UNIQUE KEY `account_product` (`account`,`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_file` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `pathname` char(100) NOT NULL DEFAULT '',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `extension` char(30) NOT NULL DEFAULT '',
+ `size` int(11) unsigned NOT NULL DEFAULT 0,
+ `objectType` char(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(9) NOT NULL DEFAULT 0,
+ `addedBy` char(30) NOT NULL DEFAULT '',
+ `addedDate` datetime DEFAULT NULL,
+ `downloads` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `extra` varchar(255) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_gapanalysis` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `role` varchar(20) NOT NULL DEFAULT '',
+ `analysis` mediumtext DEFAULT NULL,
+ `needTrain` enum('no','yes') NOT NULL DEFAULT 'no',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `project_account` (`project`,`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_group` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `name` char(30) NOT NULL DEFAULT '',
+ `role` char(30) NOT NULL DEFAULT '',
+ `desc` char(255) NOT NULL DEFAULT '',
+ `acl` text DEFAULT NULL,
+ `developer` enum('0','1') NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_grouppriv` (
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` char(30) NOT NULL DEFAULT '',
+ `method` char(30) NOT NULL DEFAULT '',
+ UNIQUE KEY `group` (`group`,`module`,`method`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_history` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `action` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `field` varchar(30) NOT NULL DEFAULT '',
+ `old` text DEFAULT NULL,
+ `oldValue` text DEFAULT NULL,
+ `new` text DEFAULT NULL,
+ `newValue` text DEFAULT NULL,
+ `diff` mediumtext DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `action` (`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_holiday` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `type` enum('holiday','working') NOT NULL DEFAULT 'holiday',
+ `desc` text DEFAULT NULL,
+ `year` char(4) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_host` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(30) NOT NULL DEFAULT 'normal',
+ `hostType` varchar(30) NOT NULL DEFAULT '',
+ `mac` varchar(128) NOT NULL DEFAULT '',
+ `memory` varchar(30) NOT NULL DEFAULT '',
+ `diskSize` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(50) NOT NULL DEFAULT '',
+ `secret` varchar(50) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `tokenSN` varchar(50) NOT NULL DEFAULT '',
+ `tokenTime` datetime DEFAULT NULL,
+ `oldTokenSN` varchar(50) NOT NULL DEFAULT '',
+ `vsoft` varchar(30) NOT NULL DEFAULT '',
+ `heartbeat` datetime DEFAULT NULL,
+ `zap` varchar(10) NOT NULL DEFAULT '',
+ `vnc` int(11) NOT NULL DEFAULT 0,
+ `ztf` int(11) NOT NULL DEFAULT 0,
+ `zd` int(11) NOT NULL DEFAULT 0,
+ `ssh` int(11) NOT NULL DEFAULT 0,
+ `parent` int(11) unsigned NOT NULL DEFAULT 0,
+ `image` int(11) unsigned NOT NULL DEFAULT 0,
+ `admin` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `serverRoom` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `cpuNumber` varchar(16) NOT NULL DEFAULT '',
+ `cpuCores` varchar(30) NOT NULL DEFAULT '',
+ `intranet` varchar(128) NOT NULL DEFAULT '',
+ `extranet` varchar(128) NOT NULL DEFAULT '',
+ `osName` varchar(64) NOT NULL DEFAULT '',
+ `osVersion` varchar(64) NOT NULL DEFAULT '',
+ `group` varchar(128) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_image` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `host` int(11) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(64) NOT NULL DEFAULT '',
+ `localName` varchar(64) NOT NULL DEFAULT '',
+ `address` varchar(64) NOT NULL DEFAULT '',
+ `path` varchar(64) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `osName` varchar(32) NOT NULL DEFAULT '',
+ `from` varchar(10) NOT NULL DEFAULT 'zentao',
+ `memory` float unsigned NOT NULL DEFAULT 0,
+ `disk` float unsigned NOT NULL DEFAULT 0,
+ `fileSize` float unsigned NOT NULL DEFAULT 0,
+ `md5` varchar(64) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `restoreDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_instance` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `solution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` char(50) NOT NULL DEFAULT '',
+ `appID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `appName` char(50) NOT NULL DEFAULT '',
+ `appVersion` char(20) NOT NULL DEFAULT '',
+ `chart` char(50) NOT NULL DEFAULT '',
+ `logo` varchar(255) NOT NULL DEFAULT '',
+ `version` char(50) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `introduction` text DEFAULT NULL,
+ `source` char(20) NOT NULL DEFAULT '',
+ `channel` char(20) NOT NULL DEFAULT '',
+ `k8name` char(64) NOT NULL DEFAULT '',
+ `status` char(20) NOT NULL DEFAULT '',
+ `pinned` enum('0','1') NOT NULL DEFAULT '0',
+ `domain` char(255) NOT NULL DEFAULT '',
+ `smtpSnippetName` char(30) NOT NULL DEFAULT '',
+ `ldapSnippetName` char(30) NOT NULL DEFAULT '',
+ `ldapSettings` text DEFAULT NULL,
+ `dbSettings` text DEFAULT NULL,
+ `autoBackup` tinyint(1) NOT NULL DEFAULT 0,
+ `backupKeepDays` int(10) unsigned NOT NULL DEFAULT 1,
+ `autoRestore` tinyint(1) NOT NULL DEFAULT 0,
+ `env` text DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdAt` datetime DEFAULT NULL,
+ `deleted` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `space` (`space`),
+ KEY `k8name` (`k8name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_intervention` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `activity` mediumint(8) NOT NULL DEFAULT 0,
+ `status` char(30) NOT NULL DEFAULT '',
+ `partake` text DEFAULT NULL,
+ `begin` date DEFAULT NULL,
+ `realBegin` date DEFAULT NULL,
+ `situation` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `project` (`project`,`activity`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_issue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `project` varchar(255) NOT NULL DEFAULT '',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `pri` char(30) NOT NULL DEFAULT '',
+ `severity` char(30) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `activity` varchar(255) NOT NULL DEFAULT '',
+ `deadline` date DEFAULT NULL,
+ `resolution` char(30) NOT NULL DEFAULT '',
+ `resolutionComment` text DEFAULT NULL,
+ `objectID` varchar(255) NOT NULL DEFAULT '',
+ `resolvedDate` date DEFAULT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `owner` varchar(255) NOT NULL DEFAULT '',
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `activateBy` varchar(30) NOT NULL DEFAULT '',
+ `activateDate` date DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` date DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `approvedDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_job` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) NOT NULL DEFAULT '',
+ `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `frame` varchar(20) NOT NULL DEFAULT '',
+ `engine` varchar(20) NOT NULL DEFAULT '',
+ `autoRun` enum('0','1') NOT NULL DEFAULT '1',
+ `server` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `pipeline` varchar(500) NOT NULL DEFAULT '',
+ `triggerType` varchar(255) NOT NULL DEFAULT '',
+ `sonarqubeServer` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `projectKey` varchar(255) NOT NULL DEFAULT '',
+ `svnDir` varchar(255) NOT NULL DEFAULT '',
+ `atDay` varchar(255) NOT NULL DEFAULT '',
+ `atTime` varchar(10) NOT NULL DEFAULT '',
+ `customParam` text DEFAULT NULL,
+ `comment` varchar(255) NOT NULL DEFAULT '',
+ `triggerActions` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `lastExec` datetime DEFAULT NULL,
+ `lastStatus` varchar(255) NOT NULL DEFAULT '',
+ `lastTag` varchar(255) NOT NULL DEFAULT '',
+ `lastSyncDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `idx_repo_deleted` (`repo`,`deleted`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanban` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '',
+ `team` text DEFAULT NULL,
+ `desc` mediumtext DEFAULT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `archived` enum('0','1') NOT NULL DEFAULT '1',
+ `performable` enum('0','1') NOT NULL DEFAULT '0',
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `displayCards` smallint(6) NOT NULL DEFAULT 0,
+ `showWIP` enum('0','1') NOT NULL DEFAULT '1',
+ `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
+ `colWidth` smallint(4) NOT NULL DEFAULT 264,
+ `minColWidth` smallint(4) NOT NULL DEFAULT 200,
+ `maxColWidth` smallint(4) NOT NULL DEFAULT 384,
+ `object` varchar(255) NOT NULL DEFAULT '',
+ `alignment` varchar(10) NOT NULL DEFAULT 'center',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `closedBy` char(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `activatedBy` char(30) NOT NULL DEFAULT '',
+ `activatedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancard` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromType` varchar(30) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT 'doing',
+ `pri` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `assignedTo` text DEFAULT NULL,
+ `desc` mediumtext DEFAULT NULL,
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `estimate` float unsigned NOT NULL DEFAULT 0,
+ `progress` float unsigned NOT NULL DEFAULT 0,
+ `color` char(7) NOT NULL DEFAULT '',
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `archived` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `archivedBy` char(30) NOT NULL DEFAULT '',
+ `archivedDate` datetime DEFAULT NULL,
+ `assignedBy` char(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancell` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) NOT NULL DEFAULT 0,
+ `lane` mediumint(8) NOT NULL DEFAULT 0,
+ `column` mediumint(8) NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT '',
+ `cards` mediumtext DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbancolumn` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT '',
+ `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `group` mediumint(8) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `color` char(30) NOT NULL DEFAULT '',
+ `limit` smallint(6) NOT NULL DEFAULT -1,
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `archived` enum('0','1') NOT NULL DEFAULT '0',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbangroup` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `order` smallint(6) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanlane` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `execution` mediumint(8) NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT '',
+ `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `groupby` char(30) NOT NULL DEFAULT '',
+ `extra` char(30) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `color` char(30) NOT NULL DEFAULT '',
+ `order` smallint(6) NOT NULL DEFAULT 0,
+ `lastEditedTime` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanregion` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_kanbanspace` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(50) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '',
+ `team` text DEFAULT NULL,
+ `desc` mediumtext DEFAULT NULL,
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `status` enum('active','closed') NOT NULL DEFAULT 'active',
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `closedBy` char(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `activatedBy` char(30) NOT NULL DEFAULT '',
+ `activatedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_lang` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `lang` varchar(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `section` varchar(50) NOT NULL DEFAULT '',
+ `key` varchar(60) NOT NULL DEFAULT '',
+ `value` text DEFAULT NULL,
+ `system` enum('0','1') NOT NULL DEFAULT '1',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_leave` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `start` time DEFAULT NULL,
+ `finish` time DEFAULT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
+ `backDate` datetime DEFAULT NULL,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `reviewedBy` char(30) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ `level` tinyint(3) NOT NULL DEFAULT 0,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `reviewers` text DEFAULT NULL,
+ `backReviewers` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `type` (`type`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_lieu` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `start` time DEFAULT NULL,
+ `finish` time DEFAULT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
+ `overtime` char(255) NOT NULL DEFAULT '',
+ `trip` char(255) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `reviewedBy` char(30) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ `level` tinyint(3) NOT NULL DEFAULT 0,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `reviewers` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_log` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `action` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `date` datetime DEFAULT NULL,
+ `url` varchar(255) NOT NULL DEFAULT '',
+ `contentType` varchar(30) NOT NULL DEFAULT '',
+ `data` text DEFAULT NULL,
+ `result` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `obejctID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_market` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `industry` char(255) NOT NULL DEFAULT '',
+ `scale` decimal(10,2) NOT NULL DEFAULT 0.00,
+ `maturity` char(255) NOT NULL DEFAULT '',
+ `speed` varchar(255) NOT NULL DEFAULT '',
+ `competition` char(255) NOT NULL DEFAULT '',
+ `strategy` varchar(255) NOT NULL DEFAULT '',
+ `ppm` varchar(20) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_marketreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `market` mediumint(8) NOT NULL DEFAULT 0,
+ `research` mediumint(8) NOT NULL DEFAULT 0,
+ `maturity` varchar(30) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '',
+ `participants` char(255) NOT NULL DEFAULT '',
+ `source` varchar(30) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `publishedBy` varchar(30) NOT NULL DEFAULT '',
+ `publishedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_measqueue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `mid` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `status` varchar(255) NOT NULL DEFAULT '',
+ `logs` text DEFAULT NULL,
+ `execTime` varchar(10) NOT NULL DEFAULT '',
+ `params` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `updateDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_measrecords` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `mid` mediumint(8) NOT NULL DEFAULT 0,
+ `measCode` char(50) NOT NULL DEFAULT '',
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `params` text DEFAULT NULL,
+ `year` char(4) NOT NULL DEFAULT '',
+ `month` char(6) NOT NULL DEFAULT '',
+ `week` char(8) NOT NULL DEFAULT '',
+ `day` char(8) NOT NULL DEFAULT '',
+ `value` varchar(255) NOT NULL DEFAULT '',
+ `date` date DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `time` (`year`,`month`,`day`,`week`),
+ KEY `product` (`product`),
+ KEY `project` (`project`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meastemplate` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `content` mediumtext DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meeting` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL DEFAULT 0,
+ `execution` mediumint(8) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `begin` time DEFAULT NULL,
+ `end` time DEFAULT NULL,
+ `dept` mediumint(8) NOT NULL DEFAULT 0,
+ `mode` varchar(255) NOT NULL DEFAULT '',
+ `host` varchar(30) NOT NULL DEFAULT '',
+ `participant` text DEFAULT NULL,
+ `date` date DEFAULT NULL,
+ `room` int(11) NOT NULL DEFAULT 0,
+ `minutes` text DEFAULT NULL,
+ `minutedBy` varchar(30) NOT NULL DEFAULT '',
+ `minutedDate` datetime DEFAULT NULL,
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_meetingroom` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `position` varchar(30) NOT NULL DEFAULT '',
+ `seats` int(11) NOT NULL DEFAULT 0,
+ `equipment` varchar(255) NOT NULL DEFAULT '',
+ `openTime` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_metric` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `purpose` varchar(50) NOT NULL DEFAULT '',
+ `scope` char(30) NOT NULL DEFAULT '',
+ `object` char(30) NOT NULL DEFAULT '',
+ `stage` enum('wait','released') DEFAULT 'wait',
+ `type` enum('php','sql') DEFAULT 'php',
+ `name` varchar(90) NOT NULL DEFAULT '',
+ `alias` varchar(90) NOT NULL DEFAULT '',
+ `code` varchar(90) NOT NULL DEFAULT '',
+ `unit` varchar(10) NOT NULL DEFAULT '',
+ `dateType` varchar(50) NOT NULL DEFAULT '',
+ `collector` text DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `definition` text DEFAULT NULL,
+ `when` varchar(30) NOT NULL DEFAULT '',
+ `event` varchar(30) NOT NULL DEFAULT '',
+ `cronCFG` varchar(30) NOT NULL DEFAULT '',
+ `time` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `implementedBy` varchar(30) NOT NULL DEFAULT '',
+ `implementedDate` datetime DEFAULT NULL,
+ `delistedBy` varchar(30) NOT NULL DEFAULT '',
+ `delistedDate` datetime DEFAULT NULL,
+ `builtin` enum('0','1') NOT NULL DEFAULT '0',
+ `fromID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `lastCalcRows` int(11) NOT NULL DEFAULT 0,
+ `lastCalcTime` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_metriclib` (
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `metricID` mediumint(9) NOT NULL DEFAULT 0,
+ `metricCode` varchar(100) NOT NULL DEFAULT '',
+ `system` char(30) NOT NULL DEFAULT '0',
+ `program` char(30) NOT NULL DEFAULT '',
+ `project` char(30) NOT NULL DEFAULT '',
+ `product` char(30) NOT NULL DEFAULT '',
+ `execution` char(30) NOT NULL DEFAULT '',
+ `code` char(30) NOT NULL DEFAULT '',
+ `pipeline` char(30) NOT NULL DEFAULT '',
+ `repo` char(30) NOT NULL DEFAULT '',
+ `user` text DEFAULT NULL,
+ `dept` char(30) NOT NULL DEFAULT '',
+ `year` char(4) NOT NULL DEFAULT '0',
+ `month` char(2) NOT NULL DEFAULT '0',
+ `week` char(2) NOT NULL DEFAULT '0',
+ `day` char(2) NOT NULL DEFAULT '0',
+ `value` varchar(100) NOT NULL DEFAULT '0',
+ `calcType` enum('cron','inference') NOT NULL DEFAULT 'cron',
+ `calculatedBy` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `metricID` (`metricID`),
+ KEY `metricCode` (`metricCode`),
+ KEY `date` (`date`),
+ KEY `deleted` (`deleted`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_module` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` char(60) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT '',
+ `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `owner` varchar(30) NOT NULL DEFAULT '',
+ `collector` text DEFAULT NULL,
+ `short` varchar(30) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `root` (`root`),
+ KEY `type` (`type`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_mr` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `hostID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `sourceProject` varchar(50) NOT NULL DEFAULT '',
+ `sourceBranch` varchar(100) NOT NULL DEFAULT '',
+ `targetProject` varchar(50) NOT NULL DEFAULT '',
+ `targetBranch` varchar(100) NOT NULL DEFAULT '',
+ `mriid` int(10) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `description` text DEFAULT NULL,
+ `assignee` varchar(255) NOT NULL DEFAULT '',
+ `reviewer` varchar(255) NOT NULL DEFAULT '',
+ `approver` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `status` char(30) NOT NULL DEFAULT '',
+ `mergeStatus` char(30) NOT NULL DEFAULT '',
+ `approvalStatus` char(30) NOT NULL DEFAULT '',
+ `needApproved` enum('0','1') NOT NULL DEFAULT '0',
+ `needCI` enum('0','1') NOT NULL DEFAULT '0',
+ `repoID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `jobID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `executionID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `compileID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `compileStatus` char(30) NOT NULL DEFAULT '',
+ `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0',
+ `squash` enum('0','1') NOT NULL DEFAULT '0',
+ `isFlow` enum('0','1') NOT NULL DEFAULT '0',
+ `synced` enum('0','1') NOT NULL DEFAULT '1',
+ `syncError` varchar(255) NOT NULL DEFAULT '',
+ `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0',
+ `diffs` longtext DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_mrapproval` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `mrID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `account` varchar(255) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ `action` char(30) NOT NULL DEFAULT '',
+ `comment` text DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_nc` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `auditplan` mediumint(8) NOT NULL DEFAULT 0,
+ `listID` mediumint(8) NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `type` char(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `severity` char(30) NOT NULL DEFAULT '',
+ `deadline` date DEFAULT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `resolution` char(30) NOT NULL DEFAULT '',
+ `resolvedDate` date DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` date DEFAULT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` date DEFAULT NULL,
+ `activateDate` date DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_notify` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectType` varchar(50) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `action` mediumint(8) NOT NULL DEFAULT 0,
+ `toList` text DEFAULT NULL,
+ `ccList` text DEFAULT NULL,
+ `subject` text DEFAULT NULL,
+ `data` text DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `sendTime` datetime DEFAULT NULL,
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `failReason` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `objectType` (`objectType`),
+ KEY `status` (`status`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_oauth` (
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `openID` varchar(255) NOT NULL DEFAULT '',
+ `providerType` varchar(30) NOT NULL DEFAULT '',
+ `providerID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ UNIQUE KEY `account_openID` (`account`,`openID`,`providerType`,`providerID`),
+ KEY `account` (`account`),
+ KEY `providerType` (`providerType`),
+ KEY `providerID` (`providerID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_object` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) NOT NULL DEFAULT 0,
+ `from` mediumint(8) NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `category` char(30) NOT NULL DEFAULT '',
+ `version` varchar(255) NOT NULL DEFAULT '',
+ `type` enum('reviewed','taged') NOT NULL DEFAULT 'reviewed',
+ `enabled` enum('0','1') NOT NULL DEFAULT '1',
+ `range` text DEFAULT NULL,
+ `data` text DEFAULT NULL,
+ `storyEst` char(30) NOT NULL DEFAULT '',
+ `taskEst` char(30) NOT NULL DEFAULT '',
+ `requestEst` char(30) NOT NULL DEFAULT '',
+ `testEst` char(30) NOT NULL DEFAULT '',
+ `devEst` char(30) NOT NULL DEFAULT '',
+ `designEst` char(30) NOT NULL DEFAULT '',
+ `end` date DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_opportunity` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `source` char(30) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `strategy` char(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `impact` mediumint(8) NOT NULL DEFAULT 0,
+ `chance` mediumint(8) NOT NULL DEFAULT 0,
+ `ratio` mediumint(8) NOT NULL DEFAULT 0,
+ `pri` char(30) NOT NULL DEFAULT '',
+ `identifiedDate` date DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` date DEFAULT NULL,
+ `approvedDate` date DEFAULT NULL,
+ `prevention` mediumtext DEFAULT NULL,
+ `plannedClosedDate` date DEFAULT NULL,
+ `actualClosedDate` date DEFAULT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `desc` mediumtext DEFAULT NULL,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `activatedBy` varchar(30) NOT NULL DEFAULT '',
+ `activatedDate` datetime DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `canceledBy` varchar(30) NOT NULL DEFAULT '',
+ `canceledDate` datetime DEFAULT NULL,
+ `cancelReason` char(30) NOT NULL DEFAULT '',
+ `hangupedBy` varchar(30) NOT NULL DEFAULT '',
+ `hangupedDate` datetime DEFAULT NULL,
+ `resolution` mediumtext DEFAULT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `resolvedDate` datetime DEFAULT NULL,
+ `lastCheckedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastCheckedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_overtime` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `year` char(4) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `start` time DEFAULT NULL,
+ `finish` time DEFAULT NULL,
+ `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
+ `leave` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `rejectReason` varchar(100) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `reviewedBy` char(30) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ `level` tinyint(3) NOT NULL DEFAULT 0,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `reviewers` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `type` (`type`),
+ KEY `status` (`status`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_pipeline` (
+ `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` char(30) NOT NULL DEFAULT '',
+ `name` varchar(50) NOT NULL DEFAULT '',
+ `url` varchar(255) DEFAULT NULL,
+ `account` varchar(30) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `token` varchar(255) DEFAULT NULL,
+ `private` char(32) DEFAULT NULL,
+ `instanceID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_pivot` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `group` varchar(255) NOT NULL DEFAULT '',
+ `code` varchar(255) NOT NULL DEFAULT '',
+ `driver` enum('mysql','duckdb') NOT NULL DEFAULT 'mysql',
+ `mode` enum('text','builder') NOT NULL DEFAULT 'builder',
+ `name` text DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `acl` enum('open','private') NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `sql` mediumtext DEFAULT NULL,
+ `fields` mediumtext DEFAULT NULL,
+ `langs` mediumtext DEFAULT NULL,
+ `vars` mediumtext DEFAULT NULL,
+ `objects` mediumtext DEFAULT NULL,
+ `settings` mediumtext DEFAULT NULL,
+ `filters` mediumtext DEFAULT NULL,
+ `step` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `stage` enum('draft','published') NOT NULL DEFAULT 'draft',
+ `builtin` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `dimension` (`dimension`),
+ KEY `group` (`group`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_pivotdrill` (
+ `pivot` mediumint(9) NOT NULL,
+ `field` varchar(255) NOT NULL,
+ `object` varchar(40) NOT NULL,
+ `whereSql` mediumtext NOT NULL,
+ `condition` mediumtext NOT NULL,
+ `status` enum('design','published') NOT NULL DEFAULT 'published',
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `type` enum('auto','manual') NOT NULL DEFAULT 'manual'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_planstory` (
+ `plan` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `order` mediumint(9) NOT NULL DEFAULT 0,
+ UNIQUE KEY `plan_story` (`plan`,`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_practice` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `code` char(50) NOT NULL DEFAULT '',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `labels` varchar(255) NOT NULL DEFAULT '',
+ `summary` varchar(255) NOT NULL DEFAULT '',
+ `content` text DEFAULT NULL,
+ `contributor` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_priv` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `method` varchar(30) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `edition` varchar(30) NOT NULL DEFAULT ',open,biz,max,',
+ `vision` varchar(30) NOT NULL DEFAULT ',rnd,',
+ `system` enum('0','1') NOT NULL DEFAULT '0',
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `priv` (`module`,`method`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_privlang` (
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `objectType` enum('priv','manager') NOT NULL DEFAULT 'priv',
+ `lang` varchar(30) NOT NULL DEFAULT '',
+ `key` varchar(100) NOT NULL DEFAULT '',
+ `value` varchar(255) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ UNIQUE KEY `objectlang` (`objectID`,`objectType`,`lang`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_privmanager` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `code` varchar(100) NOT NULL DEFAULT '',
+ `type` enum('view','module','package') NOT NULL DEFAULT 'package',
+ `edition` varchar(30) NOT NULL DEFAULT ',open,biz,max,',
+ `vision` varchar(30) NOT NULL DEFAULT ',rnd,',
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_privrelation` (
+ `priv` varchar(100) NOT NULL DEFAULT '',
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `relationPriv` varchar(100) NOT NULL DEFAULT '',
+ UNIQUE KEY `privrelation` (`priv`,`type`,`relationPriv`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_process` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `model` char(30) NOT NULL DEFAULT 'waterfall',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `abbr` char(30) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `order` mediumint(9) NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_product` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `program` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(110) NOT NULL DEFAULT '',
+ `code` varchar(45) NOT NULL DEFAULT '',
+ `shadow` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `bind` enum('0','1') NOT NULL DEFAULT '0',
+ `line` mediumint(8) NOT NULL DEFAULT 0,
+ `type` varchar(30) NOT NULL DEFAULT 'normal',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `PO` varchar(30) NOT NULL DEFAULT '',
+ `QD` varchar(30) NOT NULL DEFAULT '',
+ `RD` varchar(30) NOT NULL DEFAULT '',
+ `feedback` varchar(30) NOT NULL DEFAULT '',
+ `ticket` varchar(30) NOT NULL DEFAULT '',
+ `workflowGroup` int(8) NOT NULL DEFAULT 0,
+ `acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
+ `groups` text DEFAULT NULL,
+ `whitelist` text DEFAULT NULL,
+ `reviewer` text DEFAULT NULL,
+ `PMT` text DEFAULT NULL,
+ `draftEpics` mediumint(8) NOT NULL DEFAULT 0,
+ `activeEpics` mediumint(8) NOT NULL DEFAULT 0,
+ `changingEpics` mediumint(8) NOT NULL DEFAULT 0,
+ `reviewingEpics` mediumint(8) NOT NULL DEFAULT 0,
+ `finishedEpics` mediumint(8) NOT NULL DEFAULT 0,
+ `closedEpics` mediumint(8) NOT NULL DEFAULT 0,
+ `totalEpics` mediumint(8) NOT NULL DEFAULT 0,
+ `draftRequirements` mediumint(8) NOT NULL DEFAULT 0,
+ `activeRequirements` mediumint(8) NOT NULL DEFAULT 0,
+ `changingRequirements` mediumint(8) NOT NULL DEFAULT 0,
+ `reviewingRequirements` mediumint(8) NOT NULL DEFAULT 0,
+ `finishedRequirements` mediumint(8) NOT NULL DEFAULT 0,
+ `closedRequirements` mediumint(8) NOT NULL DEFAULT 0,
+ `totalRequirements` mediumint(8) NOT NULL DEFAULT 0,
+ `draftStories` mediumint(8) NOT NULL DEFAULT 0,
+ `activeStories` mediumint(8) NOT NULL DEFAULT 0,
+ `changingStories` mediumint(8) NOT NULL DEFAULT 0,
+ `reviewingStories` mediumint(8) NOT NULL DEFAULT 0,
+ `finishedStories` mediumint(8) NOT NULL DEFAULT 0,
+ `closedStories` mediumint(8) NOT NULL DEFAULT 0,
+ `totalStories` mediumint(8) NOT NULL DEFAULT 0,
+ `unresolvedBugs` mediumint(8) NOT NULL DEFAULT 0,
+ `closedBugs` mediumint(8) NOT NULL DEFAULT 0,
+ `fixedBugs` mediumint(8) NOT NULL DEFAULT 0,
+ `totalBugs` mediumint(8) NOT NULL DEFAULT 0,
+ `plans` mediumint(8) NOT NULL DEFAULT 0,
+ `releases` mediumint(8) NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `createdVersion` varchar(20) NOT NULL DEFAULT '',
+ `closedDate` date DEFAULT NULL,
+ `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_productplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` varchar(255) NOT NULL DEFAULT '0',
+ `parent` mediumint(9) NOT NULL DEFAULT 0,
+ `title` varchar(90) NOT NULL DEFAULT '',
+ `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
+ `desc` mediumtext DEFAULT NULL,
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `finishedDate` datetime DEFAULT NULL,
+ `closedDate` datetime DEFAULT NULL,
+ `order` text DEFAULT NULL,
+ `closedReason` varchar(20) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `end` (`end`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programactivity` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `process` mediumint(8) NOT NULL DEFAULT 0,
+ `activity` mediumint(8) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `content` text DEFAULT NULL,
+ `reason` varchar(255) NOT NULL DEFAULT '',
+ `result` char(30) NOT NULL DEFAULT '',
+ `linkedBy` char(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programoutput` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `process` mediumint(8) NOT NULL DEFAULT 0,
+ `activity` mediumint(8) NOT NULL DEFAULT 0,
+ `output` mediumint(8) NOT NULL DEFAULT 0,
+ `content` text DEFAULT NULL,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `reason` varchar(255) NOT NULL DEFAULT '',
+ `result` char(30) NOT NULL DEFAULT '',
+ `linkedBy` char(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programprocess` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `process` mediumint(8) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `abbr` char(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `reason` varchar(255) NOT NULL DEFAULT '',
+ `linkedBy` char(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_programreport` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `template` mediumint(8) NOT NULL DEFAULT 0,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `params` text DEFAULT NULL,
+ `content` text DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_project` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL DEFAULT 0,
+ `charter` mediumint(8) NOT NULL DEFAULT 0,
+ `model` char(30) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT 'sprint',
+ `category` char(30) NOT NULL DEFAULT '',
+ `lifetime` char(30) NOT NULL DEFAULT '',
+ `budget` varchar(30) NOT NULL DEFAULT '0',
+ `budgetUnit` char(30) NOT NULL DEFAULT 'CNY',
+ `attribute` varchar(30) NOT NULL DEFAULT '',
+ `percent` float unsigned NOT NULL DEFAULT 0,
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `output` text DEFAULT NULL,
+ `auth` char(30) NOT NULL DEFAULT '',
+ `storyType` char(30) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(90) NOT NULL DEFAULT '',
+ `code` varchar(45) NOT NULL DEFAULT '',
+ `hasProduct` tinyint(1) unsigned NOT NULL DEFAULT 1,
+ `workflowGroup` int(8) NOT NULL DEFAULT 0,
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `firstEnd` date DEFAULT NULL,
+ `realBegan` date DEFAULT NULL,
+ `realEnd` date DEFAULT NULL,
+ `days` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `status` varchar(10) NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
+ `desc` mediumtext DEFAULT NULL,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `parentVersion` smallint(6) NOT NULL DEFAULT 0,
+ `planDuration` int(11) NOT NULL DEFAULT 0,
+ `realDuration` int(11) NOT NULL DEFAULT 0,
+ `progress` decimal(5,2) NOT NULL DEFAULT 0.00,
+ `estimate` float NOT NULL DEFAULT 0,
+ `left` float NOT NULL DEFAULT 0,
+ `consumed` float NOT NULL DEFAULT 0,
+ `teamCount` int(11) NOT NULL DEFAULT 0,
+ `market` mediumint(8) NOT NULL DEFAULT 0,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `openedVersion` varchar(20) NOT NULL DEFAULT '',
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `closedReason` varchar(20) NOT NULL DEFAULT '',
+ `canceledBy` varchar(30) NOT NULL DEFAULT '',
+ `canceledDate` datetime DEFAULT NULL,
+ `suspendedDate` date DEFAULT NULL,
+ `PO` varchar(30) NOT NULL DEFAULT '',
+ `PM` varchar(30) NOT NULL DEFAULT '',
+ `QD` varchar(30) NOT NULL DEFAULT '',
+ `RD` varchar(30) NOT NULL DEFAULT '',
+ `team` varchar(90) NOT NULL DEFAULT '',
+ `acl` char(30) NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `stageBy` enum('project','product') NOT NULL DEFAULT 'product',
+ `displayCards` smallint(6) NOT NULL DEFAULT 0,
+ `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
+ `multiple` enum('0','1') NOT NULL DEFAULT '1',
+ `parallel` mediumint(9) NOT NULL DEFAULT 0,
+ `enabled` enum('on','off') NOT NULL DEFAULT 'on',
+ `colWidth` smallint(6) NOT NULL DEFAULT 264,
+ `minColWidth` smallint(6) NOT NULL DEFAULT 200,
+ `maxColWidth` smallint(6) NOT NULL DEFAULT 384,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `begin` (`begin`),
+ KEY `end` (`end`),
+ KEY `status` (`status`),
+ KEY `acl` (`acl`),
+ KEY `order` (`order`),
+ KEY `project` (`project`),
+ KEY `type_order` (`type`,`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectadmin` (
+ `group` smallint(6) NOT NULL DEFAULT 0,
+ `account` char(30) NOT NULL DEFAULT '',
+ `programs` text DEFAULT NULL,
+ `projects` text DEFAULT NULL,
+ `products` text DEFAULT NULL,
+ `executions` text DEFAULT NULL,
+ UNIQUE KEY `group_account` (`group`,`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectcase` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `count` mediumint(8) unsigned NOT NULL DEFAULT 1,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `order` smallint(6) unsigned NOT NULL DEFAULT 0,
+ UNIQUE KEY `project` (`project`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectproduct` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `plan` varchar(255) NOT NULL DEFAULT '',
+ `roadmap` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`project`,`product`,`branch`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectspec` (
+ `project` mediumint(8) NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `milestone` enum('0','1') NOT NULL DEFAULT '0',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ UNIQUE KEY `project` (`project`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_projectstory` (
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `order` smallint(6) unsigned NOT NULL DEFAULT 0,
+ UNIQUE KEY `project` (`project`,`story`),
+ KEY `story` (`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_queue` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `cron` mediumint(9) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `command` text NOT NULL,
+ `status` enum('wait','doing','done') NOT NULL DEFAULT 'wait',
+ `execId` int(11) DEFAULT NULL,
+ `createdDate` datetime NOT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_relation` (
+ `id` int(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) NOT NULL DEFAULT 0,
+ `product` mediumint(8) NOT NULL DEFAULT 0,
+ `execution` mediumint(8) NOT NULL DEFAULT 0,
+ `AType` char(30) NOT NULL DEFAULT '',
+ `AID` mediumint(8) NOT NULL DEFAULT 0,
+ `AVersion` char(30) NOT NULL DEFAULT '',
+ `relation` char(30) NOT NULL DEFAULT '',
+ `BType` char(30) NOT NULL DEFAULT '',
+ `BID` mediumint(8) NOT NULL DEFAULT 0,
+ `BVersion` char(30) NOT NULL DEFAULT '',
+ `extra` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_relationoftasks` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `execution` mediumint(8) unsigned NOT NULL,
+ `pretask` mediumint(8) unsigned NOT NULL,
+ `condition` enum('begin','end') NOT NULL,
+ `task` mediumint(8) unsigned NOT NULL,
+ `action` enum('begin','end') NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `relationoftasks` (`execution`,`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_release` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` varchar(255) NOT NULL DEFAULT '0',
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` varchar(255) NOT NULL DEFAULT '0',
+ `shadow` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `build` varchar(255) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `marker` enum('0','1') NOT NULL DEFAULT '0',
+ `date` date DEFAULT NULL,
+ `releasedDate` date DEFAULT NULL,
+ `stories` text DEFAULT NULL,
+ `bugs` text DEFAULT NULL,
+ `leftBugs` text DEFAULT NULL,
+ `desc` mediumtext DEFAULT NULL,
+ `mailto` text DEFAULT NULL,
+ `notify` varchar(255) NOT NULL DEFAULT '',
+ `status` varchar(20) NOT NULL DEFAULT 'normal',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `product` varchar(255) NOT NULL DEFAULT '',
+ `projects` varchar(255) NOT NULL DEFAULT '',
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `prefix` varchar(100) NOT NULL DEFAULT '',
+ `encoding` varchar(20) NOT NULL DEFAULT '',
+ `SCM` varchar(10) NOT NULL DEFAULT '',
+ `client` varchar(100) NOT NULL DEFAULT '',
+ `serviceHost` varchar(50) NOT NULL DEFAULT '',
+ `serviceProject` varchar(100) NOT NULL DEFAULT '',
+ `commits` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `password` varchar(30) NOT NULL DEFAULT '',
+ `encrypt` varchar(30) NOT NULL DEFAULT 'plain',
+ `acl` text DEFAULT NULL,
+ `synced` tinyint(1) NOT NULL DEFAULT 0,
+ `lastSync` datetime DEFAULT NULL,
+ `lastCommit` datetime DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `extra` char(30) NOT NULL DEFAULT '',
+ `preMerge` enum('0','1') NOT NULL DEFAULT '0',
+ `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fileServerUrl` text DEFAULT NULL,
+ `fileServerAccount` varchar(40) NOT NULL DEFAULT '',
+ `fileServerPassword` varchar(100) NOT NULL DEFAULT '',
+ `deleted` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repobranch` (
+ `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `revision` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` varchar(255) NOT NULL DEFAULT '',
+ UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
+ KEY `branch` (`branch`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repofiles` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `revision` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` varchar(255) NOT NULL DEFAULT '',
+ `oldPath` varchar(255) NOT NULL DEFAULT '',
+ `parent` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT '',
+ `action` char(1) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `path` (`path`),
+ KEY `parent` (`parent`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_repohistory` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `repo` mediumint(9) NOT NULL DEFAULT 0,
+ `revision` varchar(40) NOT NULL DEFAULT '',
+ `commit` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `comment` text DEFAULT NULL,
+ `committer` varchar(100) NOT NULL DEFAULT '',
+ `time` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `repo` (`repo`),
+ KEY `revision` (`revision`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_report` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `code` varchar(100) NOT NULL DEFAULT '',
+ `name` text DEFAULT NULL,
+ `dimension` int(8) NOT NULL DEFAULT 0,
+ `module` varchar(100) NOT NULL DEFAULT '',
+ `sql` text DEFAULT NULL,
+ `vars` text DEFAULT NULL,
+ `langs` text DEFAULT NULL,
+ `params` text DEFAULT NULL,
+ `step` tinyint(1) NOT NULL DEFAULT 2,
+ `desc` text DEFAULT NULL,
+ `addedBy` char(30) NOT NULL DEFAULT '',
+ `addedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_researchplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `customer` varchar(255) NOT NULL DEFAULT '',
+ `stakeholder` varchar(255) NOT NULL DEFAULT '',
+ `objective` varchar(255) NOT NULL DEFAULT '',
+ `begin` datetime DEFAULT NULL,
+ `end` datetime DEFAULT NULL,
+ `location` varchar(255) NOT NULL DEFAULT '',
+ `team` varchar(255) NOT NULL DEFAULT '',
+ `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL DEFAULT '',
+ `outline` mediumtext DEFAULT NULL,
+ `schedule` mediumtext DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_researchreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `relatedPlan` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `author` varchar(30) NOT NULL DEFAULT '',
+ `content` mediumtext DEFAULT NULL,
+ `customer` varchar(255) NOT NULL DEFAULT '',
+ `researchObjects` varchar(255) NOT NULL DEFAULT '',
+ `begin` datetime DEFAULT NULL,
+ `end` datetime DEFAULT NULL,
+ `location` varchar(255) NOT NULL DEFAULT '',
+ `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_review` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `object` mediumint(8) NOT NULL DEFAULT 0,
+ `template` mediumint(8) NOT NULL DEFAULT 0,
+ `doc` varchar(255) NOT NULL DEFAULT '',
+ `docVersion` varchar(255) NOT NULL DEFAULT '',
+ `status` char(30) NOT NULL DEFAULT '',
+ `reviewedBy` varchar(255) NOT NULL DEFAULT '',
+ `auditedBy` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `begin` date DEFAULT NULL,
+ `deadline` date DEFAULT NULL,
+ `lastReviewedBy` varchar(255) NOT NULL DEFAULT '',
+ `lastReviewedDate` date DEFAULT NULL,
+ `lastAuditedBy` varchar(255) NOT NULL DEFAULT '',
+ `lastAuditedDate` date DEFAULT NULL,
+ `lastEditedBy` varchar(255) NOT NULL DEFAULT '',
+ `lastEditedDate` date DEFAULT NULL,
+ `result` char(30) NOT NULL DEFAULT '',
+ `auditResult` char(30) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewcl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `object` char(30) NOT NULL DEFAULT '',
+ `category` char(30) NOT NULL DEFAULT '',
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `order` mediumint(8) DEFAULT 0,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewissue` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `review` mediumint(8) NOT NULL DEFAULT 0,
+ `approval` mediumint(8) NOT NULL DEFAULT 0,
+ `injection` mediumint(8) NOT NULL DEFAULT 0,
+ `identify` mediumint(8) NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT 'review',
+ `listID` mediumint(8) NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `opinion` mediumtext DEFAULT NULL,
+ `opinionDate` date DEFAULT NULL,
+ `status` char(30) NOT NULL DEFAULT '',
+ `resolution` char(30) NOT NULL DEFAULT '',
+ `resolutionBy` char(30) NOT NULL DEFAULT '',
+ `resolutionDate` date DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewlist` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `object` char(30) NOT NULL DEFAULT '',
+ `category` char(30) NOT NULL DEFAULT '',
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_reviewresult` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `review` mediumint(8) NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT 'review',
+ `result` char(30) NOT NULL DEFAULT '',
+ `opinion` text DEFAULT NULL,
+ `reviewer` char(30) NOT NULL DEFAULT '',
+ `remainIssue` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `consumed` float NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_risk` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` varchar(255) NOT NULL DEFAULT '',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `source` char(30) NOT NULL DEFAULT '',
+ `category` char(30) NOT NULL DEFAULT '',
+ `strategy` char(30) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT 'active',
+ `impact` char(30) NOT NULL DEFAULT '',
+ `probability` char(30) NOT NULL DEFAULT '',
+ `rate` char(30) NOT NULL DEFAULT '',
+ `pri` char(30) NOT NULL DEFAULT '',
+ `identifiedDate` date DEFAULT NULL,
+ `prevention` mediumtext DEFAULT NULL,
+ `remedy` mediumtext DEFAULT NULL,
+ `plannedClosedDate` date DEFAULT NULL,
+ `actualClosedDate` date DEFAULT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `resolution` mediumtext DEFAULT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `activateBy` varchar(30) NOT NULL DEFAULT '',
+ `activateDate` date DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` date DEFAULT NULL,
+ `cancelBy` varchar(30) NOT NULL DEFAULT '',
+ `cancelDate` date DEFAULT NULL,
+ `cancelReason` char(30) NOT NULL DEFAULT '',
+ `hangupBy` varchar(30) NOT NULL DEFAULT '',
+ `hangupDate` date DEFAULT NULL,
+ `trackedBy` varchar(30) NOT NULL DEFAULT '',
+ `trackedDate` date DEFAULT NULL,
+ `assignedDate` date DEFAULT NULL,
+ `approvedDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_riskissue` (
+ `risk` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `issue` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ UNIQUE KEY `risk_issue` (`risk`,`issue`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_roadmap` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) NOT NULL DEFAULT 0,
+ `branch` mediumint(8) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `status` char(30) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `desc` longtext DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `closedBy` char(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `closedReason` enum('done','canceled') DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_roadmapstory` (
+ `roadmap` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `order` mediumint(8) unsigned NOT NULL,
+ UNIQUE KEY `roadmap_story` (`roadmap`,`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_scene` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `sort` int(11) unsigned NOT NULL DEFAULT 0,
+ `openedBy` char(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `parent` int(11) NOT NULL DEFAULT 0,
+ `grade` tinyint(3) NOT NULL DEFAULT 0,
+ `path` varchar(1000) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_score` (
+ `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
+ `account` varchar(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `method` varchar(30) NOT NULL DEFAULT '',
+ `desc` varchar(250) NOT NULL DEFAULT '',
+ `before` int(11) NOT NULL DEFAULT 0,
+ `score` int(11) NOT NULL DEFAULT 0,
+ `after` int(11) NOT NULL DEFAULT 0,
+ `time` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `module` (`module`),
+ KEY `method` (`method`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_screen` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `acl` enum('open','private') NOT NULL DEFAULT 'open',
+ `whitelist` text DEFAULT NULL,
+ `cover` mediumtext DEFAULT NULL,
+ `scheme` mediumtext DEFAULT NULL,
+ `status` enum('draft','published') NOT NULL DEFAULT 'draft',
+ `builtin` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchdict` (
+ `key` smallint(6) unsigned NOT NULL DEFAULT 0,
+ `value` char(3) NOT NULL DEFAULT '',
+ PRIMARY KEY (`key`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_searchindex` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `objectType` char(20) NOT NULL DEFAULT '',
+ `objectID` mediumint(9) NOT NULL DEFAULT 0,
+ `title` text DEFAULT NULL,
+ `content` text DEFAULT NULL,
+ `addedDate` datetime DEFAULT NULL,
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `object` (`objectType`,`objectID`),
+ KEY `addedDate` (`addedDate`),
+ FULLTEXT KEY `title_content` (`title`,`content`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_serverroom` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL DEFAULT '',
+ `city` varchar(128) NOT NULL DEFAULT '',
+ `line` varchar(20) NOT NULL DEFAULT '',
+ `bandwidth` varchar(128) NOT NULL DEFAULT '',
+ `provider` varchar(128) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_service` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `external` enum('0','1') NOT NULL DEFAULT '0',
+ `port` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `entry` varchar(255) NOT NULL DEFAULT '',
+ `deploy` varchar(255) NOT NULL DEFAULT '',
+ `version` varchar(64) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `dept` varchar(128) NOT NULL DEFAULT '',
+ `devel` varchar(30) NOT NULL DEFAULT '',
+ `qa` varchar(30) NOT NULL DEFAULT '',
+ `ops` varchar(30) NOT NULL DEFAULT '',
+ `hosts` text DEFAULT NULL,
+ `softName` varchar(128) NOT NULL DEFAULT '',
+ `softVersion` varchar(128) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_session` (
+ `id` varchar(32) NOT NULL,
+ `data` mediumtext DEFAULT NULL,
+ `timestamp` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `timestamp` (`timestamp`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_solution` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(50) NOT NULL DEFAULT '',
+ `appID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `appName` char(50) NOT NULL DEFAULT '',
+ `appVersion` char(20) NOT NULL DEFAULT '',
+ `version` char(50) NOT NULL DEFAULT '',
+ `chart` char(50) NOT NULL DEFAULT '',
+ `cover` varchar(255) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `introduction` varchar(255) NOT NULL DEFAULT '',
+ `source` char(20) NOT NULL DEFAULT '',
+ `channel` char(20) NOT NULL DEFAULT '',
+ `components` text DEFAULT NULL,
+ `status` char(20) NOT NULL DEFAULT '',
+ `deleted` tinyint(1) NOT NULL DEFAULT 0,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdAt` datetime DEFAULT NULL,
+ `updatedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_solutions` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `contents` text NOT NULL,
+ `support` text NOT NULL,
+ `measures` text NOT NULL,
+ `type` char(30) NOT NULL DEFAULT '',
+ `addedBy` varchar(30) NOT NULL DEFAULT '',
+ `addedDate` date DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_space` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(200) NOT NULL,
+ `k8space` char(64) NOT NULL,
+ `owner` char(30) NOT NULL,
+ `default` tinyint(1) NOT NULL DEFAULT 0,
+ `createdAt` datetime DEFAULT NULL,
+ `deleted` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_sqlbuilder` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `objectID` mediumint(8) NOT NULL,
+ `objectType` varchar(50) NOT NULL,
+ `sql` text DEFAULT NULL,
+ `setting` text DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_sqlview` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(90) NOT NULL DEFAULT '',
+ `code` varchar(45) NOT NULL DEFAULT '',
+ `sql` text DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_stage` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `percent` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `projectType` varchar(255) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_stakeholder` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `objectID` mediumint(8) NOT NULL DEFAULT 0,
+ `objectType` char(30) NOT NULL DEFAULT '',
+ `user` char(30) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `key` enum('0','1') NOT NULL DEFAULT '0',
+ `from` char(30) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `objectID` (`objectID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_story` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `parent` mediumint(9) NOT NULL DEFAULT 0,
+ `isParent` enum('0','1') NOT NULL DEFAULT '0',
+ `root` mediumint(9) NOT NULL DEFAULT 0,
+ `path` text DEFAULT NULL,
+ `grade` smallint(6) NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `plan` text DEFAULT NULL,
+ `source` varchar(20) NOT NULL DEFAULT '',
+ `sourceNote` varchar(255) NOT NULL DEFAULT '',
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(30) NOT NULL DEFAULT 'story',
+ `category` varchar(30) NOT NULL DEFAULT 'feature',
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 3,
+ `estimate` float unsigned NOT NULL DEFAULT 0,
+ `status` enum('','changing','active','draft','closed','reviewing','launched','developing') NOT NULL DEFAULT '',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL DEFAULT '',
+ `stage` enum('','wait','inroadmap','incharter','planned','projected','designing','designed','developing','developed','testing','tested','verified','rejected','delivering','delivered','released','closed') NOT NULL DEFAULT 'wait',
+ `stagedBy` char(30) NOT NULL DEFAULT '',
+ `mailto` text DEFAULT NULL,
+ `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromStory` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromVersion` smallint(6) NOT NULL DEFAULT 1,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `approvedDate` date DEFAULT NULL,
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `changedBy` varchar(30) NOT NULL DEFAULT '',
+ `changedDate` datetime DEFAULT NULL,
+ `reviewedBy` varchar(255) NOT NULL DEFAULT '',
+ `reviewedDate` datetime DEFAULT NULL,
+ `releasedDate` datetime DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `closedReason` varchar(30) NOT NULL DEFAULT '',
+ `activatedDate` datetime DEFAULT NULL,
+ `toBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `linkStories` varchar(255) NOT NULL DEFAULT '',
+ `linkRequirements` varchar(255) NOT NULL DEFAULT '',
+ `twins` varchar(255) NOT NULL DEFAULT '',
+ `duplicateStory` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 1,
+ `parentVersion` smallint(6) NOT NULL DEFAULT 0,
+ `demandVersion` smallint(6) NOT NULL DEFAULT 0,
+ `storyChanged` enum('0','1') NOT NULL DEFAULT '0',
+ `feedbackBy` varchar(100) NOT NULL DEFAULT '',
+ `notifyEmail` varchar(100) NOT NULL DEFAULT '',
+ `BSA` char(30) NOT NULL DEFAULT '',
+ `duration` char(30) NOT NULL DEFAULT '',
+ `demand` mediumint(8) NOT NULL DEFAULT 0,
+ `submitedBy` varchar(30) NOT NULL DEFAULT '',
+ `roadmap` varchar(255) NOT NULL DEFAULT '',
+ `URChanged` enum('0','1') NOT NULL DEFAULT '0',
+ `unlinkReason` enum('','omit','other') NOT NULL DEFAULT '',
+ `retractedReason` enum('','omit','other') NOT NULL DEFAULT '',
+ `retractedBy` varchar(30) NOT NULL DEFAULT '',
+ `retractedDate` datetime DEFAULT NULL,
+ `verifiedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `root` (`root`),
+ KEY `status` (`status`),
+ KEY `assignedTo` (`assignedTo`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyestimate` (
+ `story` mediumint(9) NOT NULL DEFAULT 0,
+ `round` smallint(6) NOT NULL DEFAULT 0,
+ `estimate` text DEFAULT NULL,
+ `average` float NOT NULL DEFAULT 0,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ UNIQUE KEY `story` (`story`,`round`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storygrade` (
+ `type` enum('story','requirement','epic') NOT NULL,
+ `grade` smallint(6) NOT NULL,
+ `name` char(30) NOT NULL,
+ `status` char(30) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyreview` (
+ `story` mediumint(9) NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `reviewer` varchar(30) NOT NULL DEFAULT '',
+ `result` varchar(30) NOT NULL DEFAULT '',
+ `reviewDate` datetime DEFAULT NULL,
+ UNIQUE KEY `story` (`story`,`version`,`reviewer`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storyspec` (
+ `story` mediumint(9) NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `spec` mediumtext DEFAULT NULL,
+ `verify` mediumtext DEFAULT NULL,
+ `files` text DEFAULT NULL,
+ UNIQUE KEY `story` (`story`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_storystage` (
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `stage` varchar(50) NOT NULL DEFAULT '',
+ `stagedBy` char(30) NOT NULL DEFAULT '',
+ UNIQUE KEY `story_branch` (`story`,`branch`),
+ KEY `story` (`story`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_suitecase` (
+ `suite` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(5) unsigned NOT NULL DEFAULT 0,
+ UNIQUE KEY `suitecase` (`suite`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_task` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `parent` mediumint(8) NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `design` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `storyVersion` smallint(6) NOT NULL DEFAULT 1,
+ `designVersion` smallint(6) unsigned NOT NULL DEFAULT 1,
+ `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT '',
+ `mode` varchar(10) NOT NULL DEFAULT '',
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `estimate` float unsigned NOT NULL DEFAULT 0,
+ `consumed` float unsigned NOT NULL DEFAULT 0,
+ `left` float unsigned NOT NULL DEFAULT 0,
+ `deadline` date DEFAULT NULL,
+ `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `color` char(7) NOT NULL DEFAULT '',
+ `mailto` text DEFAULT NULL,
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `estStarted` date DEFAULT NULL,
+ `realStarted` datetime DEFAULT NULL,
+ `finishedBy` varchar(30) NOT NULL DEFAULT '',
+ `finishedDate` datetime DEFAULT NULL,
+ `finishedList` text DEFAULT NULL,
+ `canceledBy` varchar(30) NOT NULL DEFAULT '',
+ `canceledDate` datetime DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `planDuration` int(11) NOT NULL DEFAULT 0,
+ `realDuration` int(11) NOT NULL DEFAULT 0,
+ `closedReason` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `activatedDate` datetime DEFAULT NULL,
+ `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `mr` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `entry` varchar(255) NOT NULL DEFAULT '',
+ `lines` varchar(10) NOT NULL DEFAULT '',
+ `v1` varchar(40) NOT NULL DEFAULT '',
+ `v2` varchar(40) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ KEY `execution` (`execution`),
+ KEY `story` (`story`),
+ KEY `parent` (`parent`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskestimate` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `date` date DEFAULT NULL,
+ `left` float unsigned NOT NULL DEFAULT 0,
+ `consumed` float unsigned NOT NULL DEFAULT 0,
+ `account` char(30) NOT NULL DEFAULT '',
+ `work` text DEFAULT NULL,
+ `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `task` (`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskspec` (
+ `task` mediumint(8) NOT NULL DEFAULT 0,
+ `version` smallint(6) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `estStarted` date DEFAULT NULL,
+ `deadline` date DEFAULT NULL,
+ UNIQUE KEY `task` (`task`,`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_taskteam` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `account` char(30) NOT NULL DEFAULT '',
+ `estimate` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `consumed` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `left` decimal(12,2) NOT NULL DEFAULT 0.00,
+ `transfer` char(30) NOT NULL DEFAULT '',
+ `status` enum('wait','doing','done','cancel','closed') NOT NULL DEFAULT 'wait',
+ `order` int(8) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `task` (`task`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_team` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `type` enum('project','task','execution') NOT NULL DEFAULT 'project',
+ `account` char(30) NOT NULL DEFAULT '',
+ `role` char(30) NOT NULL DEFAULT '',
+ `position` varchar(30) NOT NULL DEFAULT '',
+ `limited` char(8) NOT NULL DEFAULT 'no',
+ `join` date DEFAULT NULL,
+ `days` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `hours` float(3,1) unsigned NOT NULL DEFAULT 0.0,
+ `estimate` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
+ `consumed` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
+ `left` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
+ `order` tinyint(3) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `team` (`root`,`type`,`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `tasks` varchar(255) NOT NULL DEFAULT '',
+ `builds` varchar(255) NOT NULL DEFAULT '',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `owner` char(30) NOT NULL DEFAULT '',
+ `members` text DEFAULT NULL,
+ `stories` text DEFAULT NULL,
+ `bugs` text DEFAULT NULL,
+ `cases` text DEFAULT NULL,
+ `report` text DEFAULT NULL,
+ `objectType` varchar(20) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testresult` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `run` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `compile` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `caseResult` char(30) NOT NULL DEFAULT '',
+ `stepResults` text DEFAULT NULL,
+ `ZTFResult` text DEFAULT NULL,
+ `node` int(8) unsigned NOT NULL DEFAULT 0,
+ `lastRunner` varchar(30) NOT NULL DEFAULT '',
+ `date` datetime DEFAULT NULL,
+ `duration` float NOT NULL DEFAULT 0,
+ `xml` text DEFAULT NULL,
+ `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `case` (`case`),
+ KEY `version` (`version`),
+ KEY `run` (`run`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testrun` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `version` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `assignedTo` char(30) NOT NULL DEFAULT '',
+ `lastRunner` varchar(30) NOT NULL DEFAULT '',
+ `lastRunDate` datetime DEFAULT NULL,
+ `lastRunResult` char(30) NOT NULL DEFAULT '',
+ `status` char(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `task` (`task`,`case`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testsuite` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `type` varchar(20) NOT NULL DEFAULT '',
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `addedBy` char(30) NOT NULL DEFAULT '',
+ `addedDate` datetime DEFAULT NULL,
+ `lastEditedBy` char(30) NOT NULL DEFAULT '',
+ `lastEditedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_testtask` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` char(90) NOT NULL DEFAULT '',
+ `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `build` char(30) NOT NULL DEFAULT '',
+ `type` varchar(255) NOT NULL DEFAULT '',
+ `owner` varchar(30) NOT NULL DEFAULT '',
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `realBegan` date DEFAULT NULL,
+ `realFinishedDate` datetime DEFAULT NULL,
+ `mailto` text DEFAULT NULL,
+ `desc` mediumtext DEFAULT NULL,
+ `report` text DEFAULT NULL,
+ `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
+ `testreport` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `auto` varchar(10) NOT NULL DEFAULT 'no',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `members` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`),
+ KEY `build` (`build`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ticket` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `openedBuild` varchar(255) NOT NULL DEFAULT '',
+ `feedback` mediumint(8) NOT NULL DEFAULT 0,
+ `assignedTo` varchar(255) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `realStarted` datetime DEFAULT NULL,
+ `startedBy` varchar(255) NOT NULL DEFAULT '',
+ `startedDate` datetime DEFAULT NULL,
+ `deadline` date DEFAULT NULL,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `estimate` float unsigned NOT NULL DEFAULT 0,
+ `left` float unsigned NOT NULL DEFAULT 0,
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `openedBy` varchar(30) NOT NULL DEFAULT '',
+ `openedDate` datetime DEFAULT NULL,
+ `activatedCount` int(11) NOT NULL DEFAULT 0,
+ `activatedBy` varchar(30) NOT NULL DEFAULT '',
+ `activatedDate` datetime DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `closedReason` varchar(30) NOT NULL DEFAULT '',
+ `finishedBy` varchar(30) NOT NULL DEFAULT '',
+ `finishedDate` datetime DEFAULT NULL,
+ `resolvedBy` varchar(30) NOT NULL DEFAULT '',
+ `resolvedDate` datetime DEFAULT NULL,
+ `resolution` text DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `keywords` varchar(255) NOT NULL DEFAULT '',
+ `repeatTicket` mediumint(8) NOT NULL DEFAULT 0,
+ `mailto` varchar(255) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `subStatus` varchar(30) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `product` (`product`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ticketrelation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `ticketId` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `objectId` mediumint(8) NOT NULL DEFAULT 0,
+ `objectType` varchar(100) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ KEY `ticketId` (`ticketId`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_ticketsource` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `ticketId` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `customer` varchar(100) NOT NULL DEFAULT '',
+ `contact` varchar(100) NOT NULL DEFAULT '',
+ `notifyEmail` varchar(100) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `ticketId` (`ticketId`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_todo` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `date` date DEFAULT NULL,
+ `begin` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
+ `end` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
+ `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `type` char(15) NOT NULL DEFAULT '',
+ `cycle` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `name` char(150) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
+ `private` tinyint(1) NOT NULL DEFAULT 0,
+ `config` varchar(1000) NOT NULL DEFAULT '',
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedBy` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `finishedBy` varchar(30) NOT NULL DEFAULT '',
+ `finishedDate` datetime DEFAULT NULL,
+ `closedBy` varchar(30) NOT NULL DEFAULT '',
+ `closedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `assignedTo` (`assignedTo`),
+ KEY `finishedBy` (`finishedBy`),
+ KEY `date` (`date`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincategory` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `name` char(30) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `grade` tinyint(3) NOT NULL DEFAULT 0,
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `parent` (`parent`),
+ KEY `path` (`path`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincontents` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `code` varchar(50) NOT NULL DEFAULT '',
+ `course` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `type` varchar(30) NOT NULL DEFAULT '',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `path` char(255) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `order` mediumint(8) NOT NULL DEFAULT 0,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_traincourse` (
+ `id` mediumint(8) NOT NULL AUTO_INCREMENT,
+ `code` varchar(255) NOT NULL DEFAULT '',
+ `category` mediumint(8) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `status` varchar(10) NOT NULL DEFAULT '',
+ `teacher` varchar(30) NOT NULL DEFAULT '',
+ `desc` mediumtext DEFAULT NULL,
+ `importedStatus` enum('','wait','doing','done') NOT NULL DEFAULT '',
+ `lastUpdatedTime` int(10) unsigned NOT NULL DEFAULT 0,
+ `createdBy` varchar(255) NOT NULL DEFAULT '',
+ `createdDate` date DEFAULT NULL,
+ `editedBy` varchar(255) NOT NULL DEFAULT '',
+ `editedDate` date DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trainplan` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `place` varchar(255) NOT NULL DEFAULT '',
+ `trainee` text DEFAULT NULL,
+ `lecturer` varchar(20) NOT NULL DEFAULT '',
+ `type` enum('inside','outside') NOT NULL DEFAULT 'inside',
+ `status` varchar(20) NOT NULL DEFAULT '',
+ `summary` mediumtext DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trainrecords` (
+ `user` char(30) NOT NULL DEFAULT '',
+ `objectId` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `objectType` varchar(10) NOT NULL DEFAULT '',
+ `status` varchar(10) NOT NULL DEFAULT '',
+ PRIMARY KEY (`user`,`objectId`,`objectType`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_trip` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('trip','egress') NOT NULL DEFAULT 'trip',
+ `customers` varchar(20) NOT NULL DEFAULT '',
+ `name` char(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `year` char(4) NOT NULL DEFAULT '',
+ `begin` date DEFAULT NULL,
+ `end` date DEFAULT NULL,
+ `start` time DEFAULT NULL,
+ `finish` time DEFAULT NULL,
+ `from` char(50) NOT NULL DEFAULT '',
+ `to` char(50) NOT NULL DEFAULT '',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `year` (`year`),
+ KEY `createdBy` (`createdBy`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_user` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `company` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `type` char(30) NOT NULL DEFAULT 'inside',
+ `dept` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `account` char(30) NOT NULL DEFAULT '',
+ `password` char(32) NOT NULL DEFAULT '',
+ `role` char(10) NOT NULL DEFAULT '',
+ `realname` varchar(100) NOT NULL DEFAULT '',
+ `superior` char(30) DEFAULT '',
+ `pinyin` varchar(255) NOT NULL DEFAULT '',
+ `nickname` char(60) NOT NULL DEFAULT '',
+ `commiter` varchar(100) NOT NULL DEFAULT '',
+ `avatar` text DEFAULT NULL,
+ `birthday` date DEFAULT NULL,
+ `gender` enum('f','m') NOT NULL DEFAULT 'f',
+ `email` char(90) NOT NULL DEFAULT '',
+ `skype` char(90) NOT NULL DEFAULT '',
+ `qq` char(20) NOT NULL DEFAULT '',
+ `mobile` char(11) NOT NULL DEFAULT '',
+ `phone` char(20) NOT NULL DEFAULT '',
+ `weixin` varchar(90) NOT NULL DEFAULT '',
+ `dingding` varchar(90) NOT NULL DEFAULT '',
+ `slack` varchar(90) NOT NULL DEFAULT '',
+ `whatsapp` varchar(90) NOT NULL DEFAULT '',
+ `address` char(120) NOT NULL DEFAULT '',
+ `zipcode` char(10) NOT NULL DEFAULT '',
+ `nature` text DEFAULT NULL,
+ `analysis` text DEFAULT NULL,
+ `strategy` text DEFAULT NULL,
+ `join` date DEFAULT NULL,
+ `visits` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite',
+ `ip` varchar(255) NOT NULL DEFAULT '',
+ `last` int(11) unsigned NOT NULL DEFAULT 0,
+ `fails` tinyint(5) NOT NULL DEFAULT 0,
+ `locked` datetime DEFAULT NULL,
+ `feedback` enum('0','1') NOT NULL DEFAULT '0',
+ `ranzhi` char(30) NOT NULL DEFAULT '',
+ `ldap` char(30) NOT NULL DEFAULT '',
+ `score` int(11) NOT NULL DEFAULT 0,
+ `scoreLevel` int(11) NOT NULL DEFAULT 0,
+ `resetToken` varchar(50) NOT NULL DEFAULT '',
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline',
+ `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `account` (`account`),
+ KEY `dept` (`dept`),
+ KEY `email` (`email`),
+ KEY `commiter` (`commiter`),
+ KEY `deleted` (`deleted`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usercontact` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `listName` varchar(60) NOT NULL DEFAULT '',
+ `userList` text DEFAULT NULL,
+ `public` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usergroup` (
+ `account` char(30) NOT NULL DEFAULT '',
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `project` text DEFAULT NULL,
+ UNIQUE KEY `account` (`account`,`group`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userquery` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `title` varchar(90) NOT NULL DEFAULT '',
+ `form` text DEFAULT NULL,
+ `sql` text DEFAULT NULL,
+ `shortcut` enum('0','1') NOT NULL DEFAULT '0',
+ `common` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_usertpl` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `account` char(30) NOT NULL DEFAULT '',
+ `type` char(30) NOT NULL DEFAULT '',
+ `title` varchar(150) NOT NULL DEFAULT '',
+ `content` text DEFAULT NULL,
+ `public` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_userview` (
+ `account` char(30) NOT NULL DEFAULT '',
+ `programs` mediumtext DEFAULT NULL,
+ `products` mediumtext DEFAULT NULL,
+ `projects` mediumtext DEFAULT NULL,
+ `sprints` mediumtext DEFAULT NULL,
+ UNIQUE KEY `account` (`account`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_webhook` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(15) NOT NULL DEFAULT 'default',
+ `name` varchar(50) NOT NULL DEFAULT '',
+ `url` varchar(255) NOT NULL DEFAULT '',
+ `domain` varchar(255) NOT NULL DEFAULT '',
+ `secret` varchar(255) NOT NULL DEFAULT '',
+ `contentType` varchar(30) NOT NULL DEFAULT 'application/json',
+ `sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
+ `products` text DEFAULT NULL,
+ `executions` text DEFAULT NULL,
+ `params` varchar(100) NOT NULL DEFAULT '',
+ `actions` text DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_weeklyreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `weekStart` date DEFAULT NULL,
+ `pv` float(9,2) NOT NULL DEFAULT 0.00,
+ `ev` float(9,2) NOT NULL DEFAULT 0.00,
+ `ac` float(9,2) NOT NULL DEFAULT 0.00,
+ `sv` float(9,2) NOT NULL DEFAULT 0.00,
+ `cv` float(9,2) NOT NULL DEFAULT 0.00,
+ `staff` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `progress` varchar(255) NOT NULL DEFAULT '',
+ `workload` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `week` (`project`,`weekStart`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workestimation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `scale` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
+ `productivity` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
+ `duration` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
+ `unitLaborCost` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
+ `totalLaborCost` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `assignedTo` varchar(30) NOT NULL DEFAULT '',
+ `assignedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ `dayHour` decimal(10,2) NOT NULL DEFAULT 0.00,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflow` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `parent` varchar(30) NOT NULL DEFAULT '',
+ `child` varchar(30) NOT NULL DEFAULT '',
+ `type` varchar(10) NOT NULL DEFAULT 'flow',
+ `navigator` varchar(10) NOT NULL DEFAULT '',
+ `app` varchar(20) NOT NULL DEFAULT '',
+ `position` varchar(30) NOT NULL DEFAULT '',
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `table` varchar(50) NOT NULL DEFAULT '',
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `icon` varchar(30) NOT NULL DEFAULT 'flow',
+ `titleField` varchar(30) NOT NULL DEFAULT '',
+ `contentField` text DEFAULT NULL,
+ `flowchart` text DEFAULT NULL,
+ `js` text DEFAULT NULL,
+ `css` text DEFAULT NULL,
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `role` varchar(10) NOT NULL DEFAULT 'buildin',
+ `belong` varchar(50) NOT NULL DEFAULT '',
+ `administrator` text DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `version` varchar(10) NOT NULL DEFAULT '1.0',
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `approval` enum('enabled','disabled') NOT NULL DEFAULT 'disabled',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`group`,`app`,`module`,`vision`),
+ KEY `type` (`type`),
+ KEY `app` (`app`),
+ KEY `module` (`module`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowaction` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `action` varchar(50) NOT NULL DEFAULT '',
+ `method` varchar(50) NOT NULL DEFAULT '',
+ `name` varchar(50) NOT NULL DEFAULT '',
+ `type` enum('single','batch') NOT NULL DEFAULT 'single',
+ `batchMode` enum('same','different') NOT NULL DEFAULT 'different',
+ `extensionType` varchar(10) NOT NULL DEFAULT 'override',
+ `open` varchar(20) NOT NULL DEFAULT '',
+ `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview',
+ `layout` char(20) NOT NULL DEFAULT '',
+ `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist',
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `virtual` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `conditions` text DEFAULT NULL,
+ `verifications` text DEFAULT NULL,
+ `hooks` text DEFAULT NULL,
+ `linkages` text DEFAULT NULL,
+ `js` text DEFAULT NULL,
+ `css` text DEFAULT NULL,
+ `toList` char(255) NOT NULL DEFAULT '',
+ `blocks` text DEFAULT NULL,
+ `desc` text DEFAULT NULL,
+ `status` varchar(10) NOT NULL DEFAULT 'enable',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`group`,`module`,`action`,`vision`),
+ KEY `module` (`module`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowdatasource` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option',
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `code` varchar(30) NOT NULL DEFAULT '',
+ `datasource` text DEFAULT NULL,
+ `view` varchar(20) NOT NULL DEFAULT '',
+ `keyField` varchar(50) NOT NULL DEFAULT '',
+ `valueField` varchar(50) NOT NULL DEFAULT '',
+ `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `type` (`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowfield` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `field` varchar(50) NOT NULL DEFAULT '',
+ `type` varchar(20) NOT NULL DEFAULT 'varchar',
+ `length` varchar(10) NOT NULL DEFAULT '',
+ `name` varchar(50) NOT NULL DEFAULT '',
+ `control` varchar(20) NOT NULL DEFAULT '',
+ `expression` text DEFAULT NULL,
+ `options` text DEFAULT NULL,
+ `default` varchar(100) NOT NULL DEFAULT '',
+ `rules` varchar(255) NOT NULL DEFAULT '',
+ `placeholder` varchar(100) NOT NULL DEFAULT '',
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `searchOrder` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `exportOrder` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `canExport` enum('0','1') NOT NULL DEFAULT '0',
+ `canSearch` enum('0','1') NOT NULL DEFAULT '0',
+ `isValue` enum('0','1') NOT NULL DEFAULT '0',
+ `readonly` enum('0','1') NOT NULL DEFAULT '0',
+ `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `desc` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`group`,`module`,`field`),
+ KEY `module` (`module`),
+ KEY `field` (`field`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowgroup` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` varchar(10) NOT NULL DEFAULT '',
+ `projectModel` varchar(10) NOT NULL DEFAULT '',
+ `projectType` varchar(10) NOT NULL DEFAULT '',
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `code` varchar(30) NOT NULL DEFAULT '',
+ `desc` text DEFAULT NULL,
+ `disabledModules` varchar(255) NOT NULL DEFAULT '',
+ `status` varchar(10) NOT NULL DEFAULT 'wait',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ `main` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `type` (`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlabel` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `action` varchar(30) NOT NULL DEFAULT 'browse',
+ `code` varchar(30) NOT NULL DEFAULT '',
+ `label` varchar(255) NOT NULL DEFAULT '',
+ `params` text DEFAULT NULL,
+ `orderBy` text DEFAULT NULL,
+ `order` tinyint(3) NOT NULL DEFAULT 0,
+ `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `role` varchar(10) NOT NULL DEFAULT 'custom',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `module` (`module`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlayout` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `action` varchar(50) NOT NULL DEFAULT '',
+ `ui` mediumint(8) NOT NULL DEFAULT 0,
+ `field` varchar(50) NOT NULL DEFAULT '',
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `width` varchar(50) NOT NULL DEFAULT '0',
+ `position` text DEFAULT NULL,
+ `readonly` enum('0','1') NOT NULL DEFAULT '0',
+ `mobileShow` enum('0','1') NOT NULL DEFAULT '1',
+ `summary` varchar(20) NOT NULL DEFAULT '',
+ `defaultValue` text DEFAULT NULL,
+ `layoutRules` varchar(255) NOT NULL DEFAULT '',
+ `vision` varchar(10) NOT NULL DEFAULT 'rnd',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`group`,`module`,`action`,`ui`,`field`,`vision`),
+ KEY `module` (`module`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowlinkdata` (
+ `objectType` varchar(30) NOT NULL DEFAULT '',
+ `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `linkedType` varchar(30) NOT NULL DEFAULT '',
+ `linkedID` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrelation` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `prev` varchar(30) NOT NULL DEFAULT '',
+ `next` varchar(30) NOT NULL DEFAULT '',
+ `field` varchar(50) NOT NULL DEFAULT '',
+ `actions` varchar(20) NOT NULL DEFAULT '',
+ `actionCodes` text DEFAULT NULL,
+ `buildin` enum('0','1') NOT NULL DEFAULT '0',
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrelationlayout` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `prev` varchar(30) NOT NULL DEFAULT '',
+ `next` varchar(30) NOT NULL DEFAULT '',
+ `action` varchar(50) NOT NULL DEFAULT '',
+ `ui` mediumint(8) NOT NULL DEFAULT 0,
+ `field` varchar(50) NOT NULL DEFAULT '',
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique` (`prev`,`next`,`action`,`ui`,`field`),
+ KEY `prev` (`prev`),
+ KEY `next` (`next`),
+ KEY `action` (`action`),
+ KEY `order` (`order`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowreport` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL,
+ `name` varchar(100) NOT NULL,
+ `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie',
+ `countType` enum('sum','count') NOT NULL DEFAULT 'sum',
+ `displayType` enum('value','percent') NOT NULL DEFAULT 'value',
+ `dimension` varchar(130) NOT NULL,
+ `fields` text NOT NULL,
+ `order` smallint(5) unsigned NOT NULL DEFAULT 0,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowrule` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `type` enum('system','regex','func') NOT NULL DEFAULT 'regex',
+ `name` varchar(30) NOT NULL DEFAULT '',
+ `rule` text DEFAULT NULL,
+ `createdBy` char(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` char(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `type` (`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowsql` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `field` varchar(50) NOT NULL DEFAULT '',
+ `action` varchar(50) NOT NULL DEFAULT '',
+ `sql` text DEFAULT NULL,
+ `vars` text DEFAULT NULL,
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `module` (`module`),
+ KEY `field` (`field`),
+ KEY `action` (`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowui` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
+ `module` varchar(30) NOT NULL,
+ `action` varchar(50) NOT NULL,
+ `name` varchar(30) NOT NULL,
+ `conditions` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `module` (`module`),
+ KEY `action` (`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_workflowversion` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `module` varchar(30) NOT NULL DEFAULT '',
+ `version` varchar(10) NOT NULL DEFAULT '',
+ `fields` text DEFAULT NULL,
+ `actions` text DEFAULT NULL,
+ `layouts` text DEFAULT NULL,
+ `sqls` text DEFAULT NULL,
+ `labels` text DEFAULT NULL,
+ `table` text DEFAULT NULL,
+ `datas` text DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `moduleversion` (`module`,`version`),
+ KEY `module` (`module`),
+ KEY `version` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE `zt_zoutput` (
+ `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+ `activity` mediumint(8) NOT NULL DEFAULT 0,
+ `name` varchar(255) NOT NULL DEFAULT '',
+ `content` mediumtext DEFAULT NULL,
+ `optional` char(20) NOT NULL DEFAULT '',
+ `tailorNorm` varchar(255) NOT NULL DEFAULT '',
+ `status` varchar(30) NOT NULL DEFAULT '',
+ `createdBy` varchar(30) NOT NULL DEFAULT '',
+ `createdDate` datetime DEFAULT NULL,
+ `editedBy` varchar(30) NOT NULL DEFAULT '',
+ `editedDate` datetime DEFAULT NULL,
+ `order` mediumint(8) DEFAULT 0,
+ `deleted` enum('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/db/update20.8.sql b/db/update20.8.sql
index 90a326d523..e9edfaae1b 100644
--- a/db/update20.8.sql
+++ b/db/update20.8.sql
@@ -30,13 +30,13 @@ ALTER TABLE `zt_workflowui` ADD `group` mediumint(8) unsigned NOT NULL DEFAULT '
UPDATE `zt_workflow` SET `role` = 'custom' WHERE `buildin` = '0';
-ALTER TABLE `zt_workflow` DROP INDEX `unique`;
+DROP INDEX `unique` ON `zt_workflow`;
CREATE UNIQUE INDEX `unique` ON `zt_workflow`(`group`,`app`,`module`,`vision`);
-ALTER TABLE `zt_workflowfield` DROP INDEX `unique`;
+DROP INDEX `unique` ON `zt_workflowfield`;
CREATE UNIQUE INDEX `unique` ON `zt_workflowfield`(`group`,`module`,`field`);
-ALTER TABLE `zt_workflowaction` DROP INDEX `unique`;
+DROP INDEX `unique` ON `zt_workflowaction`;
CREATE UNIQUE INDEX `unique` ON `zt_workflowaction`(`group`,`module`,`action`,`vision`);
-ALTER TABLE `zt_workflowlayout` DROP INDEX `unique`;
+DROP INDEX `unique` ON `zt_workflowlayout`;
CREATE UNIQUE INDEX `unique` ON `zt_workflowlayout`(`group`,`module`,`action`,`ui`,`field`,`vision`);
ALTER TABLE `zt_product` ADD `workflowGroup` int(8) NOT NULL DEFAULT '0' AFTER `ticket`;
diff --git a/db/update21.0.sql b/db/update21.0.sql
new file mode 100644
index 0000000000..6ddea32202
--- /dev/null
+++ b/db/update21.0.sql
@@ -0,0 +1,51 @@
+ALTER TABLE `zt_host` DROP COLUMN `serverModel`;
+ALTER TABLE `zt_host` DROP COLUMN `hardwareType`;
+ALTER TABLE `zt_host` DROP COLUMN `cpuBrand`;
+ALTER TABLE `zt_host` DROP COLUMN `cpuModel`;
+ALTER TABLE `zt_host` DROP COLUMN `provider`;
+
+ALTER TABLE `zt_deploystep` DROP COLUMN `begin`;
+ALTER TABLE `zt_deploystep` DROP COLUMN `end`;
+ALTER TABLE `zt_deploystep` ADD `parent` mediumint(8) unsigned NOT NULL DEFAULT 0 AFTER `deploy`;
+
+DROP TABLE IF EXISTS `zt_deployscope`;
+
+ALTER TABLE `zt_deploy` ADD `host` varchar(255) NOT NULL DEFAULT '' AFTER `name`;
+
+ALTER TABLE `zt_deployproduct` DROP COLUMN `package`;
+
+UPDATE `zt_deploy` SET `status` = 'fail' WHERE `status` = 'done' AND `result` = 'fail';
+UPDATE `zt_deploy` SET `status` = 'success' WHERE `status` = 'done';
+
+REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) VALUES
+('zh-cn', 'custom', 'relationList', '1', '{\"relation\":\"\\u76f8\\u5173\",\"relativeRelation\":\"\\u76f8\\u5173\"}', '0', 'all'),
+('zh-cn', 'custom', 'relationList', '2', '{\"relation\":\"\\u4f9d\\u8d56\",\"relativeRelation\":\"\\u88ab\\u4f9d\\u8d56\"}', '0', 'all'),
+('zh-cn', 'custom', 'relationList', '3', '{\"relation\":\"\\u91cd\\u590d\",\"relativeRelation\":\"\\u91cd\\u590d\"}', '0', 'all'),
+('zh-cn', 'custom', 'relationList', '4', '{\"relation\":\"\\u5f15\\u7528\",\"relativeRelation\":\"\\u88ab\\u5f15\\u7528\"}', '0', 'all'),
+('en', 'custom', 'relationList', '1', '{\"relation\":\"Relate\",\"relativeRelation\":\"Relate\"}', '0', 'all'),
+('en', 'custom', 'relationList', '2', '{\"relation\":\"Dependence\",\"relativeRelation\":\"Depended On\"}', '0', 'all'),
+('en', 'custom', 'relationList', '3', '{\"relation\":\"Repetition\",\"relativeRelation\":\"Repetition\"}', '0', 'all'),
+('en', 'custom', 'relationList', '4', '{\"relation\":\"Quote\",\"relativeRelation\":\"Quoted\"}', '0', 'all'),
+('de', 'custom', 'relationList', '1', '{\"relation\":\"Relate\",\"relativeRelation\":\"Relate\"}', '0', 'all'),
+('de', 'custom', 'relationList', '2', '{\"relation\":\"Dependence\",\"relativeRelation\":\"Depended On\"}', '0', 'all'),
+('de', 'custom', 'relationList', '3', '{\"relation\":\"Repetition\",\"relativeRelation\":\"Repetition\"}', '0', 'all'),
+('de', 'custom', 'relationList', '4', '{\"relation\":\"Quote\",\"relativeRelation\":\"Quoted\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '1', '{\"relation\":\"Relate\",\"relativeRelation\":\"Relate\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '2', '{\"relation\":\"Dependence\",\"relativeRelation\":\"Depended On\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '3', '{\"relation\":\"Repetition\",\"relativeRelation\":\"Repetition\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '4', '{\"relation\":\"Quote\",\"relativeRelation\":\"Quoted\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '1', '{\"relation\":\"\\u76f8\\u95dc\",\"relativeRelation\":\"\\u76f8\\u95dc\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '2', '{\"relation\":\"\\u4f9d\\u8cf4\",\"relativeRelation\":\"\\u88ab\\u4f9d\\u8cf4\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '3', '{\"relation\":\"\\u91cd\\u8907\",\"relativeRelation\":\"\\u91cd\\u8907\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '4', '{\"relation\":\"\\u5f15\\u7528\",\"relativeRelation\":\"\\u88ab\\u5f15\\u7528\"}', '0', 'all');
+
+INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`) VALUES
+('0', '2', '*', '*', '*', 'moduleName=upgrade&methodName=ajaxProcessObjectRelation', '更新关联关系', 'zentao', 1, 'normal');
+
+UPDATE `zt_action` SET `action` = 'canceled' WHERE `objectType` = 'deploy' AND `action` = 'activated';
+
+DROP TABLE IF EXISTS `zt_account`;
+DELETE FROM `zt_lang` WHERE `module` = 'host' AND `section` = 'cpuBrandList';
+DELETE FROM `zt_action` WHERE `objectType` = 'account';
+DELETE FROM `zt_actionrecent` WHERE `objectType` = 'account';
+DELETE FROM `zt_config` WHERE `module` ='common' AND `section` = 'zentaoWebsite';
diff --git a/db/update21.1.sql b/db/update21.1.sql
new file mode 100644
index 0000000000..ca77c72313
--- /dev/null
+++ b/db/update21.1.sql
@@ -0,0 +1,24 @@
+CREATE TABLE IF NOT EXISTS `zt_system` (
+ `id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `name` VARCHAR(100) NOT NULL DEFAULT '',
+ `product` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
+ `integrated` ENUM('0','1') NOT NULL DEFAULT '0',
+ `latestRelease` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
+ `latestDate` DATETIME NULL,
+ `children` VARCHAR(255) NOT NULL DEFAULT '',
+ `status` ENUM('active','inactive') NOT NULL DEFAULT 'active',
+ `desc` mediumtext NULL,
+ `createdBy` VARCHAR(30) NOT NULL DEFAULT '',
+ `createdDate` DATETIME NULL,
+ `editedBy` VARCHAR(30) NOT NULL DEFAULT '',
+ `editedDate` DATETIME NULL,
+ `deleted` ENUM('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE INDEX `idx_product` ON `zt_system`(`product`);
+CREATE INDEX `idx_status` ON `zt_system`(`status`);
+
+ALTER TABLE `zt_release` ADD `system` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' AFTER `name`;
+ALTER TABLE `zt_release` ADD `releases` VARCHAR(255) NOT NULL DEFAULT '' AFTER `system`;
+
+CREATE INDEX `idx_system` ON `zt_release`(`system`);
diff --git a/db/zentao.sql b/db/zentao.sql
index e8006263d1..98523829cd 100755
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -1630,6 +1630,8 @@ CREATE TABLE IF NOT EXISTS `zt_release` (
`shadow` mediumint(8) unsigned NOT NULL default '0',
`build` varchar(255) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL default '',
+ `system` mediumint(8) unsigned NOT NULL default '0',
+ `releases` varchar(255) NOT NULL default '',
`marker` enum('0','1') NOT NULL default '0',
`date` date NULL,
`releasedDate` date NULL,
@@ -1648,6 +1650,7 @@ CREATE TABLE IF NOT EXISTS `zt_release` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX `product` ON `zt_release` (`product`);
CREATE INDEX `build` ON `zt_release` (`build`);
+CREATE INDEX `idx_system` ON `zt_release` (`system`);
-- DROP TABLE IF EXISTS `zt_repo`;
CREATE TABLE IF NOT EXISTS `zt_repo` (
@@ -2658,30 +2661,6 @@ CREATE TABLE IF NOT EXISTS `zt_serverroom` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--- DROP TABLE IF EXISTS `zt_account`;
-CREATE TABLE IF NOT EXISTS `zt_account` (
- `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL DEFAULT '',
- `type` varchar(255) NOT NULL DEFAULT '',
- `provider` varchar(255) NOT NULL DEFAULT '',
- `adminURI` varchar(255) NOT NULL DEFAULT '',
- `account` varchar(255) NOT NULL DEFAULT '',
- `password` varchar(255) NOT NULL DEFAULT '',
- `email` varchar(255) NOT NULL DEFAULT '',
- `mobile` varchar(255) NOT NULL DEFAULT '',
- `extra` text NULL,
- `createdBy` varchar(30) NOT NULL DEFAULT '',
- `createdDate` datetime NULL,
- `editedBy` varchar(30) NOT NULL DEFAULT '',
- `editedDate` datetime NULL,
- `status` varchar(30) NOT NULL DEFAULT '',
- `deleted` enum('0','1') NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE INDEX `name` ON `zt_account` (`name`);
-CREATE INDEX `provider` ON `zt_account` (`provider`);
-CREATE INDEX `status` ON `zt_account` (`status`);
-
-- DROP TABLE IF EXISTS `zt_host`;
CREATE TABLE `zt_host` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
@@ -2700,7 +2679,6 @@ CREATE TABLE `zt_host` (
`vsoft` varchar(30) NOT NULL DEFAULT '',
`heartbeat` datetime NULL,
`zap` varchar(10) NOT NULL DEFAULT '',
- `provider` varchar(255) NOT NULL DEFAULT '',
`vnc` int(11) NOT NULL DEFAULT '0',
`ztf` int(11) NOT NULL DEFAULT '0',
`zd` int(11) NOT NULL DEFAULT '0',
@@ -2709,10 +2687,6 @@ CREATE TABLE `zt_host` (
`image` int(11) unsigned NOT NULL DEFAULT '0',
`admin` smallint(5) unsigned NOT NULL DEFAULT '0',
`serverRoom` mediumint(8) unsigned NOT NULL DEFAULT '0',
- `serverModel` varchar(256) NOT NULL DEFAULT '',
- `hardwareType` varchar(64) NOT NULL DEFAULT '',
- `cpuBrand` varchar(128) NOT NULL DEFAULT '',
- `cpuModel` varchar(128) NOT NULL DEFAULT '',
`cpuNumber` varchar(16) NOT NULL DEFAULT '',
`cpuCores` varchar(30) NOT NULL DEFAULT '',
`intranet` varchar(128) NOT NULL DEFAULT '',
@@ -2971,6 +2945,7 @@ CREATE TABLE IF NOT EXISTS `zt_deploy` (
`begin` datetime NULL,
`end` datetime NULL,
`name` varchar(255) NOT NULL DEFAULT '',
+ `host` varchar(255) NOT NULL DEFAULT '',
`desc` mediumtext NULL,
`status` varchar(20) NOT NULL DEFAULT '',
`owner` char(30) NOT NULL DEFAULT '',
@@ -2988,8 +2963,7 @@ CREATE TABLE IF NOT EXISTS `zt_deploy` (
CREATE TABLE IF NOT EXISTS `zt_deployproduct` (
`deploy` mediumint(8) unsigned NOT NULL DEFAULT '0',
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
- `release` mediumint(8) unsigned NOT NULL DEFAULT '0',
- `package` varchar(255) NOT NULL DEFAULT ''
+ `release` mediumint(8) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE UNIQUE INDEX `deploy_product_release` ON `zt_deployproduct`(`deploy`,`product`,`release`);
@@ -2997,9 +2971,8 @@ CREATE UNIQUE INDEX `deploy_product_release` ON `zt_deployproduct`(`deploy`,`pro
CREATE TABLE IF NOT EXISTS `zt_deploystep` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`deploy` mediumint(8) unsigned NOT NULL DEFAULT '0',
+ `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
- `begin` datetime NULL,
- `end` datetime NULL,
`stage` varchar(30) NOT NULL DEFAULT '',
`content` text NULL,
`status` varchar(30) NOT NULL DEFAULT '',
@@ -3013,15 +2986,6 @@ CREATE TABLE IF NOT EXISTS `zt_deploystep` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--- DROP TABLE IF EXISTS `zt_deployscope`;
-CREATE TABLE IF NOT EXISTS `zt_deployscope` (
- `deploy` mediumint(8) unsigned NOT NULL DEFAULT '0',
- `service` mediumint(8) unsigned NOT NULL DEFAULT '0',
- `hosts` text NULL,
- `remove` text NULL,
- `add` text NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-- DROP TABLE IF EXISTS `zt_traincourse`;
CREATE TABLE IF NOT EXISTS `zt_traincourse` (
`id` mediumint(8) NOT NULL AUTO_INCREMENT,
@@ -16117,3 +16081,45 @@ CREATE INDEX `idx_repo_deleted` ON `zt_job` (`repo`,`deleted`);
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES
('*/5', '*', '*', '*', '*', 'moduleName=program&methodName=refreshStats', '刷新项目集统计数据', 'zentao', 1, 'normal', NULL),
('*/5', '*', '*', '*', '*', 'moduleName=product&methodName=refreshStats', '刷新产品统计数据', 'zentao', 1, 'normal', NULL);
+
+REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) VALUES
+('zh-cn', 'custom', 'relationList', '1', '{\"relation\":\"\\u76f8\\u5173\",\"relativeRelation\":\"\\u76f8\\u5173\"}', '0', 'all'),
+('zh-cn', 'custom', 'relationList', '2', '{\"relation\":\"\\u4f9d\\u8d56\",\"relativeRelation\":\"\\u88ab\\u4f9d\\u8d56\"}', '0', 'all'),
+('zh-cn', 'custom', 'relationList', '3', '{\"relation\":\"\\u91cd\\u590d\",\"relativeRelation\":\"\\u91cd\\u590d\"}', '0', 'all'),
+('zh-cn', 'custom', 'relationList', '4', '{\"relation\":\"\\u5f15\\u7528\",\"relativeRelation\":\"\\u88ab\\u5f15\\u7528\"}', '0', 'all'),
+('en', 'custom', 'relationList', '1', '{\"relation\":\"Relate\",\"relativeRelation\":\"Relate\"}', '0', 'all'),
+('en', 'custom', 'relationList', '2', '{\"relation\":\"Dependence\",\"relativeRelation\":\"Depended On\"}', '0', 'all'),
+('en', 'custom', 'relationList', '3', '{\"relation\":\"Repetition\",\"relativeRelation\":\"Repetition\"}', '0', 'all'),
+('en', 'custom', 'relationList', '4', '{\"relation\":\"Quote\",\"relativeRelation\":\"Quoted\"}', '0', 'all'),
+('de', 'custom', 'relationList', '1', '{\"relation\":\"Relate\",\"relativeRelation\":\"Relate\"}', '0', 'all'),
+('de', 'custom', 'relationList', '2', '{\"relation\":\"Dependence\",\"relativeRelation\":\"Depended On\"}', '0', 'all'),
+('de', 'custom', 'relationList', '3', '{\"relation\":\"Repetition\",\"relativeRelation\":\"Repetition\"}', '0', 'all'),
+('de', 'custom', 'relationList', '4', '{\"relation\":\"Quote\",\"relativeRelation\":\"Quoted\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '1', '{\"relation\":\"Relate\",\"relativeRelation\":\"Relate\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '2', '{\"relation\":\"Dependence\",\"relativeRelation\":\"Depended On\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '3', '{\"relation\":\"Repetition\",\"relativeRelation\":\"Repetition\"}', '0', 'all'),
+('fr', 'custom', 'relationList', '4', '{\"relation\":\"Quote\",\"relativeRelation\":\"Quoted\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '1', '{\"relation\":\"\\u76f8\\u95dc\",\"relativeRelation\":\"\\u76f8\\u95dc\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '2', '{\"relation\":\"\\u4f9d\\u8cf4\",\"relativeRelation\":\"\\u88ab\\u4f9d\\u8cf4\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '3', '{\"relation\":\"\\u91cd\\u8907\",\"relativeRelation\":\"\\u91cd\\u8907\"}', '0', 'all'),
+('zh-tw', 'custom', 'relationList', '4', '{\"relation\":\"\\u5f15\\u7528\",\"relativeRelation\":\"\\u88ab\\u5f15\\u7528\"}', '0', 'all');
+
+CREATE TABLE IF NOT EXISTS `zt_system` (
+ `id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `name` VARCHAR(100) NOT NULL DEFAULT '',
+ `product` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
+ `integrated` ENUM('0','1') NOT NULL DEFAULT '0',
+ `latestRelease` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
+ `latestDate` DATETIME NULL,
+ `children` VARCHAR(255) NOT NULL DEFAULT '',
+ `status` ENUM('active','inactive') NOT NULL DEFAULT 'active',
+ `desc` mediumtext NULL,
+ `createdBy` VARCHAR(30) NOT NULL DEFAULT '',
+ `createdDate` DATETIME NULL,
+ `editedBy` VARCHAR(30) NOT NULL DEFAULT '',
+ `editedDate` DATETIME NULL,
+ `deleted` ENUM('0','1') NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE INDEX `idx_product` ON `zt_system`(`product`);
+CREATE INDEX `idx_status` ON `zt_system`(`status`);
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index c05679164e..9a2165cce0 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -1,3 +1,82 @@
+2024-11-15 21.1
+完成的需求
+开源版:
+69184 在左侧目录树和下拉菜单中增加接口库的显示
+68988 接口空间支持进入产品接口和项目接口列表页
+68963 将接口空间中的版本管理和发布接口功能入口合并且移动到左侧树形导航中
+68957 项目空间首页优化
+68954 产品空间首页优化
+68953 在接口空间的左侧树形导航中增加接口目录的分组名
+68952 将接口空间中的数据结构功能移动到左侧树形导航中
+68951 接口空间详情页对文档的操作功能入口调整
+68940 接口空间支持进入独立接口列表页
+68938 接口空间新增首页
+68609 详情页面优化
+68514 主机创建页面字段优化
+68432 编辑页面优化
+68347 优化主机列表
+67973 接口空间下面包屑路径导航新增下拉菜单
+企业版:
+69158 上线申请的用例增加执行按钮
+68946 删除账号、CPU品牌功能
+68600 实现上线申请的完成功能
+68589 上线步骤改为列表样式
+68512 优化上线步骤的样式
+68511 重新调整上线申请详情页面的排版
+68504 简化上线申请的功能
+68501 实现上线申请的取消上线功能
+68429 打印部署的三级菜单
+68422 实现上线申请的删除功能
+68421 实现上线申请的上线功能
+68417 实现编辑上线申请的功能
+68416 实现上线申请列表的搜索功能
+68412 实现上线申请列表的功能
+68338 创建上线申请页面优化
+修复的Bug
+开源版:
+51916 文档左侧树选中后刷新导致无法定位
+53420 wiki中添加图片不在附件库中展示 (Feedback#5252)
+53421 wiki中删除附件,附件库中没有同步删除 (Feedback#5251)
+54306 在文档中创建空间、库和文档定位有问题
+54307 在我的空间中我创建的列表里,点击面包屑导航定位有误
+54817 通过链接打开文档,左侧目录未定位至文档所在位置
+55664 评审为有待明确的需求,编辑保存重新发起评审后评审人置灰了 (Feedback#7227)
+55828 表单数据标题颜色在地盘待处理列表不生效 (Feedback#7235)
+55870 敏捷项目的执行列表中执行名称前面没有展开/收起操作
+56362 编辑Bug调整所属产品时,产品和影响版本、解决版本不匹配 (Feedback#7385)
+56423 文档面包屑导航过长时会挤压检索标签
+56513 快捷访问文档详情页中,所在位置的跳转不对
+56771 执行任务列表下,搜索后点击研发需求排序报错 (Feedback#7553)
+56787 发布接口弹窗中描述提示信息显示为desc
+56866 按模块分配权限保存报错 (Feedback#7595)
+56890 需求列表阶段阶段字段没有根据规则更新 (Feedback#7541)
+56897 联系方式是单数时,用户编辑页样式异常 (Feedback#7648)
+56932 任务列表状态列进行中/已完成/已暂停不显示颜色了
+56938 评审研发需求代码报错
+57000 执行没关联产品进入执行-测试下有报错
+企业版:
+55879 字段的“分类设置”数据源无效 (Feedback#7280)
+56576 任务列表上,父任务不展示 研发需求变更 的确认按钮 (Feedback#7374)
+56749 导入用户,提示密码小于系统设定
+56868 工作流中自定义附件字段设置为必填,不上传附件保存时页面代码报错 (Feedback#7633)
+56876 审批流中存在“自动同意”时,提交审批报错
+56884 文档模板类型的分组树没有英文语言项
+56887 创建文档模板类型后跳转至文档模板首页
+56970 需求在执行中直接创建用例后需求详情页有报错
+56984 审批流的发起动作没法显示在列表上
+56996 工作流时间/日期类型字段设置不必填,置空保存时代码报错
+57009 登记工时,输入10小时会显示成1小时 (Feedback#7674)
+旗舰版:
+55822 20系列版本中项目甘特图中缺少高亮显示当天日期 (Feedback#7245)
+56900 审批流绑定无法关联到流程中字段 (Feedback#7623)
+57031 审批流中存在“指定人员”时,其他用户发起立项审批出现报错
+IPD版:
+56901 执行需求详情页有代码报错
+56956 OR界面产品路标页面1.5级导航下拉菜单报错
+56974 提交概念决策评审提示为空
+56990 IPD项目评审点审批通过后,会出现一个多余的评审点
+57006 设计图表页点击查询有报错 (Feedback#7670)
+
2024-11-01 21.0
完成的需求
开源版:
diff --git a/extension/lite/group/ext/lang/resource.php b/extension/lite/group/ext/lang/resource.php
index 918d48302d..04cbe8bae5 100644
--- a/extension/lite/group/ext/lang/resource.php
+++ b/extension/lite/group/ext/lang/resource.php
@@ -572,9 +572,7 @@ $lang->task->methodOrder[125] = 'import';
$lang->resource->doc = new stdclass();
$lang->resource->doc->index = 'index';
$lang->resource->doc->mySpace = 'mySpace';
-$lang->resource->doc->myView = 'myView';
-$lang->resource->doc->myCollection = 'myCollection';
-$lang->resource->doc->myCreation = 'myCreation';
+$lang->resource->doc->quick = 'quick';
$lang->resource->doc->createSpace = 'createSpace';
$lang->resource->doc->createLib = 'createLibAction';
$lang->resource->doc->editLib = 'editLibAction';
diff --git a/framework/api/entry.class.php b/framework/api/entry.class.php
index e31f5f07d2..11d18c6448 100644
--- a/framework/api/entry.class.php
+++ b/framework/api/entry.class.php
@@ -344,7 +344,7 @@ class baseEntry
{
$this->app->loadModuleConfig($moduleName, $appName);
$this->app->loadLang($moduleName, $appName);
- $this->dao = new dao($this->dao);
+ $this->dao = new dao($this->app);
return false;
}
diff --git a/framework/base/helper.class.php b/framework/base/helper.class.php
index 0c93c75a4a..1ba6537af3 100644
--- a/framework/base/helper.class.php
+++ b/framework/base/helper.class.php
@@ -1093,6 +1093,21 @@ class baseHelper
{
throw EndResponseException::create($content);
}
+
+ /**
+ * 将科学计数法转化为两位小数。
+ * Convert scientific notation to two decimal places.
+ *
+ * @param int|float|string $hours
+ * @param string $characters
+ * @static
+ * @access public
+ * @return float
+ */
+ public static function formatHours($hours, $characters = '.0'): float
+ {
+ return (float)rtrim(number_format((float)$hours, 2, '.', ''), $characters);
+ }
}
//------------------------------- 常用函数。Some tool functions.-------------------------------//
diff --git a/framework/helper.class.php b/framework/helper.class.php
index 06cb6c422b..47fff7cde1 100644
--- a/framework/helper.class.php
+++ b/framework/helper.class.php
@@ -433,21 +433,6 @@ class helper extends baseHelper
$checkFunc = 'check' . $operator;
return validater::$checkFunc($value1, $value2);
}
-
- /**
- * 将科学计数法转化为两位小数。
- * Convert scientific notation to two decimal places.
- *
- * @param int|float|string $hours
- * @param string $characters
- * @static
- * @access public
- * @return float
- */
- public static function formatHours($hours, $characters = '.0'): float
- {
- return (float)rtrim(number_format((float)$hours, 2, '.', ''), $characters);
- }
}
/**
diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php
index 4c9d52ee78..421ce0ebfe 100644
--- a/lib/dao/dao.class.php
+++ b/lib/dao/dao.class.php
@@ -262,6 +262,7 @@ class dao extends baseDAO
*/
public function checkExtend($fields)
{
+ global $lang;
if(!$fields) return $this;
foreach($fields as $field)
{
@@ -276,7 +277,7 @@ class dao extends baseDAO
if($rule->type != 'system' || $rule->rule != 'notempty') continue;
$files = !empty($_FILES[$field->field]) ? $_FILES[$field->field] : '';
- if(empty($files['size'][0])) dao::$errors[$field->field][] = sprintf($this->lang->error->notempty, $field->name);
+ if(empty($files['size'][0])) dao::$errors[$field->field][] = sprintf($lang->error->notempty, $field->name);
break;
}
continue;
diff --git a/lib/dbh/dbh.class.php b/lib/dbh/dbh.class.php
index 7e49aca8b5..da86c7a205 100644
--- a/lib/dbh/dbh.class.php
+++ b/lib/dbh/dbh.class.php
@@ -376,12 +376,8 @@ class dbh
{
$sql = trim($sql);
$sql = $this->formatFunction($sql);
-
- if(defined('IN_UPGRADE'))
- {
- $sql = $this->processDmChangeColumn($sql);
- $sql = $this->processDmTableIndex($sql);
- }
+ $sql = $this->processDmChangeColumn($sql);
+ $sql = $this->processDmTableIndex($sql);
$actionPos = strpos($sql, ' ');
$action = strtoupper(substr($sql, 0, $actionPos));
diff --git a/lib/trace/trace.class.php b/lib/trace/trace.class.php
index c351d3895b..e5c209c661 100644
--- a/lib/trace/trace.class.php
+++ b/lib/trace/trace.class.php
@@ -87,7 +87,7 @@ class trace
$profiling = $this->dao->dbh->query('SHOW PROFILES')->fetchAll(PDO::FETCH_ASSOC);
- foreach($profiling as $key => $profile) $profiling[$key]['Duration'] = number_format($profile['Duration'], 4);
+ foreach($profiling as $key => $profile) $profiling[$key]['Duration'] = round($profile['Duration'], 4);
$this->trace['profiles'] = $profiling;
}
diff --git a/lib/zin/func.php b/lib/zin/func.php
index 31cdbc4264..ba81d4f5f7 100644
--- a/lib/zin/func.php
+++ b/lib/zin/func.php
@@ -243,6 +243,7 @@ function queryFilterModal(): queryFilterModal {return createWg('queryFilterModal
function pivotTable(): pivotTable {return createWg('pivotTable', func_get_args());}
function pivotConfig(): pivotConfig {return createWg('pivotConfig', func_get_args());}
function iconPicker(): iconPicker {return createWg('iconPicker', func_get_args());}
+function relatedObjectList(): relatedObjectList {return createWg('relatedObjectList', func_get_args());}
if(is_dir(__DIR__ . DS . 'wg' . DS . 'schedule'))
{
diff --git a/lib/zin/wg/backbtn/v1.php b/lib/zin/wg/backbtn/v1.php
index 62075ccfea..b15d0281dd 100644
--- a/lib/zin/wg/backbtn/v1.php
+++ b/lib/zin/wg/backbtn/v1.php
@@ -78,8 +78,8 @@ class backBtn extends btn
'ai' => 'ai-models',
'api' => 'api-index',
'demand' => 'demand-browse,demand-view,my-work,my-contribute,feedback-adminview,feedback-admin,my-index,demandpool-track,product-dynamic',
- 'issue' => 'issue-browse,issue-view,my-index,project-dynamic,execution-dynamic,project-view,execution-view',
- 'risk' => 'risk-browse,risk-view,my-index,project-dynamic,execution-dynamic,project-view,execution-view',
+ 'issue' => 'issue-browse,issue-view,my-index,project-index,project-dynamic,execution-dynamic,project-view,execution-view',
+ 'risk' => 'risk-browse,risk-view,my-index,project-index,project-dynamic,execution-dynamic,project-view,execution-view',
'meeting' => 'meeting-browse,meeting-view,my-index,project-dynamic,execution-dynamic,project-view,execution-view',
'todo' => 'my-todo,my-effort',
'feedback' => 'my-effort,feedback-admin,feedback-browse,my-work,my-contribute',
@@ -92,7 +92,9 @@ class backBtn extends btn
'review' => 'review-browse,my-index,product-dynamic,project-dynamic,project-view,programplan-browse,project-execution',
'charter' => 'charter-browse',
'roadmap' => 'charter-view',
- 'approvalflow' => 'approvalflow-browse'
+ 'approvalflow' => 'approvalflow-browse',
+ 'host' => 'host-browse,my-index',
+ 'deploy' => 'deploy-browse',
);
$props = parent::getProps();
diff --git a/lib/zin/wg/bugrelatedlist/v1.php b/lib/zin/wg/bugrelatedlist/v1.php
index a91e1e754f..1bf28c70e1 100644
--- a/lib/zin/wg/bugrelatedlist/v1.php
+++ b/lib/zin/wg/bugrelatedlist/v1.php
@@ -20,7 +20,7 @@ class bugRelatedList extends relatedList
if(!$bug) $bug = data('bug');
if(!$bug) return;
- global $lang;
+ global $lang, $config;
$canViewCase = common::hasPriv('testcase', 'view');
$canViewStory = common::hasPriv('story', 'view');
@@ -31,24 +31,27 @@ class bugRelatedList extends relatedList
$data = array();
/* Related bugs. */
- $relatedBugList = isset($bug->relatedBugTitles) ? $bug->relatedBugTitles :array();
- $relatedBugItems = array();
- foreach($relatedBugList as $relatedBugID => $relatedBugTitle)
+ if($config->edition == 'open')
{
- $relatedBugItem = new stdclass();
- $relatedBugItem->id = $relatedBugID;
- $relatedBugItem->title = $relatedBugTitle;
- $relatedBugItems[] = $relatedBugItem;
- }
+ $relatedBugList = isset($bug->relatedBugTitles) ? $bug->relatedBugTitles :array();
+ $relatedBugItems = array();
+ foreach($relatedBugList as $relatedBugID => $relatedBugTitle)
+ {
+ $relatedBugItem = new stdclass();
+ $relatedBugItem->id = $relatedBugID;
+ $relatedBugItem->title = $relatedBugTitle;
+ $relatedBugItems[] = $relatedBugItem;
+ }
- $data['relatedBug'] = array
- (
- 'title' => $lang->bug->relatedBug,
- 'items' => $relatedBugItems,
- 'url' => createLink('bug', 'view', 'bugID={id}'),
- 'data-toggle' => 'modal',
- 'data-size' => 'lg'
- );
+ $data['relatedBug'] = array
+ (
+ 'title' => $lang->bug->relatedBug,
+ 'items' => $relatedBugItems,
+ 'url' => createLink('bug', 'view', 'bugID={id}'),
+ 'data-toggle' => 'modal',
+ 'data-size' => 'lg'
+ );
+ }
/* To cases. */
$toCaseList = isset($bug->toCases) ? $bug->toCases :array();
diff --git a/lib/zin/wg/caserelatedlist/v1.php b/lib/zin/wg/caserelatedlist/v1.php
index f2937c1b63..d189cd875c 100644
--- a/lib/zin/wg/caserelatedlist/v1.php
+++ b/lib/zin/wg/caserelatedlist/v1.php
@@ -13,7 +13,7 @@ class caseRelatedList extends relatedList
protected function created()
{
- global $app, $lang;
+ global $config, $lang;
$case = $this->prop('case', data('case'));
if(!$case) return array();
@@ -26,23 +26,26 @@ class caseRelatedList extends relatedList
'url' => hasPriv('bug', 'view') ? createLink('bug', 'view', 'bugID={id}') : false
);
- $linkCases = array();
- foreach($case->linkCaseTitles as $caseID => $linkCaseTitle)
+ if($config->edition == 'open')
{
- $linkCase = new \stdclass();
- $linkCase->id = $caseID;
- $linkCase->title = $linkCaseTitle;
+ $linkCases = array();
+ foreach($case->linkCaseTitles as $caseID => $linkCaseTitle)
+ {
+ $linkCase = new \stdclass();
+ $linkCase->id = $caseID;
+ $linkCase->title = $linkCaseTitle;
- $linkCases[] = $linkCase;
+ $linkCases[] = $linkCase;
+ }
+
+ $data['linkCases'] = array
+ (
+ 'title' => $lang->testcase->linkCase,
+ 'items' => $linkCases,
+ 'url' => hasPriv('testcase', 'view') ? createLink('testcase', 'view', 'caseID={id}') : false
+ );
}
- $data['linkCases'] = array
- (
- 'title' => $lang->testcase->linkCase,
- 'items' => $linkCases,
- 'url' => hasPriv('testcase', 'view') ? createLink('testcase', 'view', 'caseID={id}') : false
- );
-
$this->setProp('data', $data);
}
}
diff --git a/lib/zin/wg/docapp/css/v1.css b/lib/zin/wg/docapp/css/v1.css
new file mode 100644
index 0000000000..cf32c6ac4e
--- /dev/null
+++ b/lib/zin/wg/docapp/css/v1.css
@@ -0,0 +1,30 @@
+.doc-app-header > .nav {--nav-active-bg: var(--color-primary-100); --nav-active-color: var(--color-fore); --nav-item-height: 24px; --nav-divider-margin: 8px;}
+.doc-space-card-libs {min-height: 118px;}
+
+.icon-api {text-align: center; --api-color-rgb: var(--color-success-500-rgb); color: rgba(var(--api-color-rgb), 1); margin: 0 3px;}
+.icon-api::before {content: ' '; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background-color: currentColor; min-width: 0;}
+
+.api-list-item.is-GET, .icon-api.is-GET {--api-color-rgb: var(--color-success-500-rgb)}
+.api-list-item.is-POST, .icon-api.is-POST {--api-color-rgb: var(--color-important-500-rgb)}
+.api-list-item.is-DELETE, .icon-api.is-DELETE {--api-color-rgb: var(--color-danger-500-rgb)}
+.api-list-item.is-PUT, .icon-api.is-PUT {--api-color-rgb: var(--color-important-500-rgb)}
+.api-list-item.is-PATCH, .icon-api.is-PATCH {--api-color-rgb: var(--color-special-500-rgb)}
+.api-list-item.is-OPTIONS, .icon-api.is-OPTIONS {--api-color-rgb: var(--color-special-500-rgb)}
+.api-list-item.is-HEAD, .icon-api.is-HEAD {--api-color-rgb: var(--color-gray-500-rgb)}
+
+.api-list-item {background-color: rgba(var(--api-color-rgb), .1);}
+.api-list-item .api-method {background-color: rgba(var(--api-color-rgb), 1); color: var(--color-canvas)}
+.api-list-item .api-title {color: rgba(var(--api-color-rgb), 1)}
+
+.doc-app-mode-edit[data-lib-type="api"], .doc-app-mode-create[data-lib-type="api"] {--doc-view-max-width: 1100px}
+.doc-app-mode-edit[data-lib-type="api"] .doc-view-content,
+.doc-app-mode-create[data-lib-type="api"] .doc-view-content {padding: 0 24px;}
+.doc-app-mode-edit[data-lib-type="api"] form .form-actions,
+.doc-app-mode-create[data-lib-type="api"] form .form-actions {display: none;}
+
+.doc-tree .item-inner>.item-icon {margin-right: -4px;}
+.doc-list > .dtable {--dtable-border-color: transparent}
+.api-lib-menu + .doc-tree > .tree {padding-top: 0;}
+
+.dropdown-menu .divider + .divider {display: none;}
+.dropmenu-item .tree-item-inner[data-type="lib"] {padding-left: 8px;}
diff --git a/lib/zin/wg/docapp/js/v1.js b/lib/zin/wg/docapp/js/v1.js
index f7438d6a24..73ad6ace37 100644
--- a/lib/zin/wg/docapp/js/v1.js
+++ b/lib/zin/wg/docapp/js/v1.js
@@ -31,7 +31,7 @@ function getDocApp()
* @param {string} key
* @param {array|string|object} args
*/
-function getLang(key, args)
+window.getLang = function(key, args)
{
if(!docLangData)
{
@@ -61,6 +61,27 @@ function hasPriv(priv, value)
return value !== undefined ? setting === value : !!setting;
}
+function isApiLib(lib, docApp)
+{
+ if(typeof lib === 'number') lib = getDocApp().getLib(lib);
+ if(!lib)
+ {
+ docApp = docApp || getDocApp();
+ if(!docApp) return false;
+ lib = docApp.lib;
+ }
+ return lib && lib.data.type === 'api';
+}
+
+function isApiDoc(doc)
+{
+ const docApp = getDocApp();
+ if(typeof doc !== 'object' && docApp) doc = docApp.getDoc(doc);
+ if(doc && doc.api !== undefined) return doc.api;
+ const id = typeof doc === 'object' ? doc.id : doc;
+ return String(id).startsWith('api.');
+}
+
/**
* 处理对话框的操作,执行文档应用实例上的方法。
* Process dialog actions, execute methods on the doc app instance.
@@ -232,9 +253,22 @@ function submitNewDoc(doc, spaceID, libID, moduleID, formData)
keywords : doc.keywords,
acl : 'private',
space : spaceType,
- uid : doc.contentType === 'doc' ? '' : (doc.uid || `doc${doc.id}`),
+ uid : (doc.uid || `doc${doc.id}`),
};
if(formData) mergeDocFormData(docData, formData);
+ const getErrorMessage = (res) => {
+ if(typeof res.message === 'string') return res.message;
+ if(typeof res.message === 'object' && res.message && Object.values(res.message).length)
+ {
+ for(const x of Object.values(res.message))
+ {
+ if(typeof x === 'string') return x;
+ if(Array.isArray(x) && x.length) return x[0];
+ }
+ }
+ if(typeof data.error === 'string') return data.error;
+ return getLang('errorOccurred');
+ };
return new Promise((resolve, reject) =>
{
$.post(url, docData, (res) =>
@@ -244,9 +278,13 @@ function submitNewDoc(doc, spaceID, libID, moduleID, formData)
const data = JSON.parse(res);
if(typeof data !== 'object' || data.result === 'fail')
{
- throw new Error(data.message || data.error || getLang('errorOccurred'));
+ throw new Error(getErrorMessage(data));
}
- resolve($.extend(doc, {id: data.id}, docData, data.doc, {status: doc.status || data.status}));
+ const newDoc = $.extend(doc, {id: data.id}, docData, data.doc, {status: doc.status || data.status});
+ if (!newDoc.space.includes('.')) {
+ newDoc.space = `${spaceType}.${docData[spaceType]}`;
+ }
+ resolve(newDoc);
}
catch (error)
{
@@ -290,9 +328,12 @@ function handleSaveDoc(doc)
keywords : doc.keywords,
acl : doc.acl,
space : spaceType,
- uid : doc.contentType === 'doc' ? '' : (doc.uid || `doc${doc.id}`),
+ uid : (doc.uid || `doc${doc.id}`),
};
+ const docAppData = docApp.doc.data;
+ if (doc.id === docAppData.id) docData.mailto = docAppData.mailto;
+
if(savingDocData[doc.id])
{
mergeDocFormData(docData, savingDocData[doc.id]);
@@ -330,7 +371,7 @@ function handleSaveDoc(doc)
*/
function canMoveDoc(doc)
{
- return getDocApp().props.privs.moveDoc;
+ return !String(doc.id).startsWith('api.') && getDocApp().props.privs.moveDoc;
}
/**
@@ -455,7 +496,8 @@ const actionsMap =
const lang = getLang();
const doc = info.data;
const canModify = canModifySpace();
- const canEditDoc = canModify && hasPriv('edit');
+ const isApi = isApiDoc(doc);
+ const canEditDoc = canModify && hasPriv(isApi ? 'editApi' : 'edit');
/* 侧边栏上的文档操作按钮。Doc actions in sidebar. */
if(info.ui === 'sidebar')
@@ -475,14 +517,16 @@ const actionsMap =
const moreItems = [];
if(canModify && canMoveDoc(doc)) moreItems.push({icon: 'folder-move', text: lang.moveDoc, command: `moveDoc/${doc.id}`});
if(canModify && hasPriv('delete')) moreItems.push({icon: 'trash', text: lang.delete, command: `deleteDoc/${doc.id}`});
- if(canModify && hasPriv('effort')) moreItems.push({icon: 'time', text: lang.effort, command: `effortDoc/${doc.id}`});
- if(hasPriv('exportDoc')) moreItems.push({icon: 'export', text: lang.export, command: 'exportDoc'});
+ if(!isApi && canModify && hasPriv('effort')) moreItems.push({icon: 'time', text: lang.effort, command: `effortDoc/${doc.id}`});
+ if(!isApi && hasPriv('exportDoc')) moreItems.push({icon: 'export', text: lang.export, command: 'exportDoc'});
- return [
- hasPriv('collect', 'no') ? null : {icon: doc.isCollector ? 'star text-warning' : 'star-empty', text: doc.collects || null, hint: doc.isCollector ? lang.cancelCollection : lang.collect, rounded: 'lg', textClass: 'text-gray', type: 'ghost', command: hasPriv('collect') ? `collectDoc/${doc.id}` : null},
+ const actions = [
+ isApi ? null : (hasPriv('collect', 'no') ? null : {icon: doc.isCollector ? 'star text-warning' : 'star-empty', text: doc.collects || null, hint: doc.isCollector ? lang.cancelCollection : lang.collect, rounded: 'lg', textClass: 'text-gray', type: 'ghost', command: hasPriv('collect') ? `collectDoc/${doc.id}` : null}),
canEditDoc ? {icon: 'edit', type: 'ghost text-primary', hint: lang.edit, rounded: 'lg', command: 'startEditDoc'} : null,
moreItems.length ? {icon: 'icon-ellipsis-v', type: 'dropdown', rounded: 'lg', placement: 'bottom-end', caret: false, items: moreItems} : null,
];
+
+ return actions;
},
/**
@@ -503,9 +547,9 @@ const actionsMap =
return [{text: lang.actions.addModule, command: `addModule/${lib.id}/0/${lib.id}/child`, icon: 'plus', type: 'primary-pale'}];
}
- if(canAddModule && info.ui !== 'space-card' && info.ui !== 'sidebar' && info.ui !== 'sidebar-toolbar') items.push({text: lang.actions.addModule, command: `addModule/${lib.id}/0/${lib.id}/child`});
+ if(canAddModule && info.ui !== 'space-card' && info.ui !== 'sidebar') items.push({text: lang.actions.addModule, command: `addModule/${lib.id}/0/${lib.id}/child`});
if(canModify && hasPriv('editLib')) items.push({text: lang.actions.editLib, command: `editLib/${lib.id}`});
- if(canModify && hasPriv('moveLib') && info.ui !== 'space-card' && info.ui !== 'sidebar-toolbar') items.push({text: lang.moveTo, command: `moveLib/${lib.id}`});
+ if(canModify && lib.type !== 'api' && hasPriv('moveLib') && info.ui !== 'space-card' && info.ui !== 'sidebar-toolbar') items.push({text: lang.moveTo, command: `moveLib/${lib.id}`});
if(canModify && hasPriv('deleteLib')) items.push({text: lang.actions.deleteLib, command: `deleteLib/${lib.id}`});
if(!items.length) return;
@@ -580,9 +624,36 @@ const actionsMap =
*/
'doc-list': function(info)
{
- const lang = getLang();
- const docApp = getDocApp();
- const canModify = canModifySpace();
+ const docApp = this;
+ const lang = getLang();
+ const canModify = canModifySpace();
+ const libID = docApp.libID;
+
+ if(isApiLib(docApp.lib))
+ {
+ if(!canModify) return;
+
+ const canCreateApi = hasPriv('createApi');
+ if(info.ui === 'doc-list-empty')
+ {
+ return canCreateApi ? [{icon: 'plus', text: lang.createApi, btnType: 'primary', command: 'startCreateDoc'}] : null;
+ }
+
+ const canCreateLib = hasPriv('createLib');
+ const items =
+ [
+ canCreateApi ? {icon: 'plus', text: lang.createApi, command: 'startCreateDoc'} : null,
+ (canCreateApi && canCreateLib) ? {type: 'divider'} : null,
+ canCreateLib ? {icon: 'wiki-lib', text: lang.createLib, command: 'createLib'} : null,
+ ].filter(Boolean);
+ const canExportApi = hasPriv('exportApi') && libID;
+ return [
+ canExportApi ? {type: 'divider', style: {margin: '6px 0'}} : null,
+ canExportApi ? {icon: 'export', text: lang.export, command: 'exportApi'} : null,
+ items.length ? {icon: 'plus', type: 'dropdown', btnType: 'primary', size: 'md', text: lang.create, items: items} : null,
+ ];
+ }
+
const canCreateDoc = canModify && hasPriv('create');
const canCreateLib = canModify && hasPriv('createLib');
const canCreateSpace = canModify && hasPriv('createSpace');
@@ -608,8 +679,8 @@ const actionsMap =
canCreateLib ? {icon: 'wiki-lib', text: lang.createLib, command: 'createLib'} : null,
].filter(Boolean) : [];
return [
- ((canExportDoc && docApp.libID > 0 ) || canCreateDoc) ? {type: 'divider', style: {margin: '6px 0'}} : null,
- canExportDoc && docApp.libID > 0 ? {icon: 'export', text: lang.export, command: 'exportDoc'} : null, // 不在库中,无法导出
+ ((canExportDoc && libID > 0) || canCreateDoc) ? {type: 'divider', style: {margin: '6px 0'}} : null,
+ canExportDoc && libID > 0 ? {icon: 'export', text: lang.export, command: 'exportDoc'} : null, // 不在库中,无法导出
canUploadDoc ? {icon: 'import', text: lang.uploadDoc, command: 'uploadDoc'} : null,
items.length ? {icon: 'plus', type: 'dropdown', btnType: 'primary', size: 'md', text: lang.create, items: items} : null,
];
@@ -625,6 +696,15 @@ const actionsMap =
if(!doc) return;
const lang = getLang();
+
+ if(isApiLib())
+ {
+ return [
+ {text: lang.save, size: 'md', className: 'btn-wide', type: 'primary', command: 'saveApiDoc'},
+ {text: lang.cancel, size: 'md', className: 'btn-wide', type: 'primary-outline', command: 'cancelEditDoc'},
+ ];
+ }
+
return [
doc.status === 'draft' ? {text: lang.saveDraft, size: 'md', className: 'btn-wide', type: 'secondary', command: 'saveDoc/draft'} : null,
{text: lang.release, size: 'md', className: 'btn-wide', type: 'primary', command: 'saveDoc'},
@@ -640,6 +720,13 @@ const actionsMap =
'doc-create': function()
{
const lang = getLang();
+ if(isApiLib())
+ {
+ return [
+ {text: lang.save, size: 'md', className: 'btn-wide', type: 'primary', command: 'saveApiDoc'},
+ {text: lang.cancel, size: 'md', className: 'btn-wide', type: 'primary-outline', command: 'cancelCreateDoc'},
+ ];
+ }
return [
{text: lang.saveDraft, size: 'md', className: 'btn-wide', type: 'secondary', command: 'saveNewDoc/draft'},
{text: lang.release, size: 'md', className: 'btn-wide', type: 'primary', command: 'saveNewDoc'},
@@ -802,7 +889,7 @@ const commands =
libID: libID,
parentID: parentID,
objectID: objectID,
- moduleType: 'doc',
+ moduleType: isApiLib(libID) ? 'api' : 'doc',
isUpdate: false,
createType: createType,
};
@@ -910,11 +997,11 @@ const commands =
{
const docApp = getDocApp();
const docID = args[0] || docApp.docID;
-
+ const isApi = isApiDoc(docID);
$.ajaxSubmit(
{
confirm: getLang('confirmDelete'),
- url: $.createLink('doc', 'delete', `docID=${docID}`),
+ url: $.createLink(isApi ? 'api' : 'doc', 'delete', `${isApi ? 'apiID' : 'docID'}=${isApi ? getApiID(docID) : docID}`),
load: false,
onSuccess: function()
{
@@ -947,6 +1034,15 @@ const commands =
zui.Modal.open({url: url, size: 'sm'});
},
+ exportApi: function(_, args)
+ {
+ const docApp = getDocApp();
+ const libID = args[0] || docApp.libID;
+ const release = args[1] || docApp.signals.libReleaseMap.value[libID] || 0;
+ const moduleID = args[2] || docApp.moduleID;
+ const url = $.createLink('api', 'export', `libID=${libID}&version=0&release=${release}&moduleID=${moduleID}`);
+ zui.Modal.open({url: url, size: 'sm'});
+ },
showDocSettingModal: function(_, args)
{
const docApp = getDocApp();
@@ -975,6 +1071,323 @@ const commands =
$.post($.createLink('doc', 'edit', `docID=${docID}`), docData);
}
});
+ },
+
+ /**
+ * 保存 API 文档数据。
+ * Save the API doc data.
+ */
+ saveApiDoc: function()
+ {
+ /* 触发 API 表单的提交事件。 */
+ $('#docApp .doc-view form').trigger('submit');
+ },
+
+ /**
+ * 加载指定的 API 文档。
+ * Load the specified API doc.
+ */
+ loadApi: function(_, args)
+ {
+ const apiID = getApiID(args[0] || this.docID);
+ const version = args[1] || 0;
+ const release = args[2] || 0;
+ const select = !!args[3];
+ $.getJSON($.createLink('api', 'ajaxGetApi', `apiID=${apiID}&version=${version}&release=${release}`), function(result)
+ {
+ if(!result || typeof result !== 'object') return;
+ result.id = `api.${apiID}`;
+ const docApp = getDocApp();
+ docApp.update('doc', result);
+ if(select) docApp.selectDoc(result.id);
+ });
+ },
+
+ /**
+ * 选择 API 文档。
+ * Select the specified API doc.
+ */
+ selectApi: function(_, args)
+ {
+ const apiID = args[0];
+ getDocApp().selectDoc(`api.${getApiID(apiID)}`);
+ },
+
+ /**
+ * 显示结构列表。
+ * Show the struct list.
+ */
+ showStructs: function()
+ {
+ getDocApp().changeState(
+ {
+ mode: 'list',
+ moduleID: 0,
+ docID: 0,
+ listType: 'structs',
+ });
+ },
+
+ /**
+ * 显示版本列表。
+ * Show the release list.
+ */
+ showReleases: function()
+ {
+ getDocApp().changeState(
+ {
+ mode: 'list',
+ moduleID: 0,
+ docID: 0,
+ listType: 'releases',
+ });
+ },
+
+ /**
+ * 显示API 目录。
+ * Show the api catalog.
+ */
+ showModules: function()
+ {
+ getDocApp().changeState(
+ {
+ mode: 'list',
+ moduleID: 0,
+ docID: 0,
+ listType: '',
+ });
+ },
+
+ /**
+ * 获取库的 API 列表。
+ * Get the API list of the library.
+ */
+ loadLibApi: function(_, args)
+ {
+ const docApp = getDocApp();
+ const libReleaseMap = docApp.signals.libReleaseMap.value;
+ const libID = args[0] || docApp.libID;
+ if(!libID) return;
+
+ const releaseID = args[1] || libReleaseMap[libID] || 0;
+ const url = $.createLink('api', 'ajaxGetLibApiList', `libID=${libID}&releaseID=${releaseID}`);
+ $.getJSON(url, function(data)
+ {
+ const lib = docApp.getLib(libID);
+ if(lib && lib.docs && lib.docs.length) docApp.delete('doc', lib.docs.map(x => x.data.id));
+ data.forEach((x) => x.id = `api.${x.id}`);
+ docApp.update('doc', data);
+ });
+ },
+
+ /**
+ * 更改当前库的发布版本。
+ * Change the release of the current library.
+ */
+ changeLibRelease: function(_, args)
+ {
+ const docApp = getDocApp();
+ const libID = args[0];
+ const release = args[1];
+ const libReleaseMap = docApp.signals.libReleaseMap.value;
+ if(libReleaseMap[libID] === release) return;
+ libReleaseMap[libID] = release;
+ docApp.signals.libReleaseMap.value = $.extend({}, libReleaseMap);
+ docApp.executeCommand('loadLibApi', [libID, release]);
+ const doc = docApp.doc;
+ if(doc && doc.data.lib === libID) docApp.executeCommand('loadApi', [doc.data.id, 0, release]);
+ },
+
+ /**
+ * 加载懒加载内容。
+ * Load the lazy content.
+ */
+ loadLazyContent: function(_, args)
+ {
+ const selector = args[0];
+ if(!selector) return;
+ $(selector).closest('.lazy-content').trigger('loadContent');
+ },
+
+ /**
+ * 更新懒加载内容。
+ * Update the lazy content.
+ */
+ updateLazyContent: function(context, args)
+ {
+ const event = context.event;
+ const $element = $(event.currentTarget);
+ const selector = args[0] || $element.data('lazyTarget');
+ const $lazy = (selector ? $(selector) : $element).closest('.lazy-content');
+ const url = $element.data('url') || $element.attr('href');
+ if(url) $lazy.trigger('loadContent', url);
+ event.preventDefault();
+ event.stopPropagation();
+ },
+};
+
+function getApiID(id)
+{
+ if(typeof id === 'number') return id;
+ if(String(+id) === id) return +id;
+ return +id.replace('api.', '');
+}
+
+/**
+ * 定义页面上的自定义渲染器。
+ * Define the custom renderers on the page.
+ */
+const customRenders =
+{
+ /**
+ * 定义 API 文档编辑器渲染,包括查看、编辑和创建。
+ * Define the API doc editor render, including view, edit and create.
+ */
+ editor: function()
+ {
+ const mode = this.mode;
+ if(!isApiLib())
+ {
+ const docInfo = this.doc;
+ const doc = docInfo ? docInfo.data : null;
+ if(mode === 'view' && !hasPriv('view')) return {html: `
${doc ? doc.title : ''}
${getDocAppLang('accessDenied')}
`};
+ return;
+ }
+
+ if(mode === 'create')
+ {
+ const libID = this.libID;
+ const moduleID = this.moduleID;
+ return {fetcher: $.createLink('api', 'create', `libID=${libID}&moduleID=${moduleID}&space=api`), loadingText: getDocAppLang('loading')};
+ }
+ if(mode === 'edit')
+ {
+ const doc = this.doc.data;
+ return {fetcher: $.createLink('api', 'edit', `apiID=${getApiID(doc.id)}`), loadingText: getDocAppLang('loading')};
+ }
+ const doc = this.doc.data;
+ if(!hasPriv('viewApi')) return {html: `${doc ? doc.title : ''}
${getDocAppLang('accessDenied')}
`};
+
+ const release = this.signals.libReleaseMap.value[doc.lib] || 0;
+ const version = this.signals.docVersion.value || 0;
+ return {fetcher: $.createLink('api', 'view', `libID=${doc.lib}&apiID=${getApiID(doc.id)}&moduleID=${doc.module}&version=${version}&release=${release}`), loadingText: getDocAppLang('loadingDocsData'), className: 'doc-editor-content'};
+ },
+
+ /**
+ * 定义 API 文档列表渲染,包括结构和版本。
+ * Define the API doc list render, including structs and releases.
+ */
+ list: function()
+ {
+ if(!isApiLib()) return;
+ const listType = this.signals.listType.value;
+ const libID = getApiID(this.libID);
+ const releaseID = this.signals.libReleaseMap.value[libID] || 0;
+ if(listType === 'structs') return {fetcher: $.createLink('api', 'struct', `libID=${this.libID}&releaseID=${releaseID}`), loadingText: getDocAppLang('loading'), className: 'api-struct-list'};
+ if(listType === 'releases') return {fetcher: $.createLink('api', 'releases', `libID=${this.libID}`), loadingText: getDocAppLang('loading'), className: 'api-release-list'};
+ },
+
+ /**
+ * 定义 API 文档列表筛选菜单渲染,当展示结构和版本时不显示筛选菜单。
+ * Define the API doc list filter menu render, not show the filter menu when showing structs and releases.
+ */
+ filters: function()
+ {
+ if(!isApiLib(null, this)) return;
+ const listType = this.signals.listType.value;
+ if(this.mode !== 'list' || !listType) return;
+ return null;
+ },
+
+ /**
+ * 定义 API 文档列表工具栏渲染。
+ * Define the API doc list toolbar render.
+ */
+ toolbar: function()
+ {
+ if(!isApiLib()) return;
+ const listType = this.signals.listType.value;
+ if(this.mode === 'list' && listType)
+ {
+ const libID = getApiID(this.libID);
+ const items = [];
+ if(hasPriv('createStruct') && listType === 'structs') items.push({text: getDocAppLang('createStruct'), icon: 'plus', btnType: 'primary', 'data-toggle': 'modal', 'data-size': 'lg', url: $.createLink('api', 'createStruct', `libID=${libID}`)});
+ if(hasPriv('createRelease') && listType === 'releases') items.push({text: getDocAppLang('createRelease'), icon: 'plus', btnType: 'primary', 'data-toggle': 'modal', url: $.createLink('api', 'createRelease', `libID=${libID}`)});
+ if(!items.length) return null;
+ return {component: 'toolbar', props: {items: items}};
+ }
+ },
+
+ /**
+ * 定义顶部面包屑导航渲染。
+ * Define the top breadcrumb render.
+ */
+ 'app-nav': function(items)
+ {
+ const lib = this.lib;
+ if(!lib || !isApiLib(lib)) return items;
+ const versions = lib.data.versions;
+ if(versions && versions.length)
+ {
+ const viewIndex = items.findIndex(item => item[0] === 'lib');
+ if(viewIndex >= 0)
+ {
+ const libView = items[viewIndex][1];
+ const libID = getApiID(lib.data.id);
+ const release = this.signals.libReleaseMap.value[libID] || 0;
+ const options = [{text: getDocAppLang('latestVersion'), value: 0, selected: !release, command: `changeLibRelease/${libID}/0`}];
+ versions.forEach(version => options.push({selected: release === version.id, text: `v${version.version}`, value: version.id, command: `changeLibRelease/${libID}/${version.id}`}));
+ const currentVersion = versions.find(x => x.id === release);
+ const versionPicker = zui.renderCustomContent(
+ {
+ content:
+ {
+ component: 'DropdownButton',
+ props:
+ {
+ text : currentVersion ? currentVersion.version : getDocAppLang('latestVersion'),
+ size : 'xs',
+ type : 'gray-pale',
+ rounded : 'full',
+ className: 'h-4 gap-1 mr-2',
+ items : options,
+ }
+ }
+ });
+ items[viewIndex] = ['lib', [libView, versionPicker]];
+ }
+ }
+ const listType = this.signals.listType.value;
+ if(this.mode !== 'list' || !listType) return items;
+ if(listType === 'structs') items.push([listType, zui.renderCustomContent({className: 'mx-2', content: getDocAppLang('struct')})]);
+ if(listType === 'releases') items.push([listType, zui.renderCustomContent({className: 'mx-2', content: getDocAppLang('releases')})]);
+ return items;
+ },
+
+ /**
+ * 定义侧边栏渲染,显示结构、版本和模块。
+ * Define the sidebar render, show structs, releases and modules.
+ */
+ 'sidebar-before': function()
+ {
+ if(!isApiLib()) return;
+ const canViewStructs = docAppHasPriv('struct');
+ const canViewReleases = docAppHasPriv('releases');
+ if(!canViewStructs && !canViewReleases) return;
+
+ const isListMode = this.mode === 'list';
+ const lang = getDocAppLang();
+ const listType = this.signals.listType.value;
+ const items = [];
+ if(canViewStructs) items.push({text: lang.struct, selected: listType === 'structs' && isListMode, icon: 'treemap muted', command: 'showStructs'}, {type: 'divider', className: 'my-1'});
+ if(canViewReleases) items.push({text: lang.releases, selected: listType === 'releases' && isListMode, icon: 'version muted', command: 'showReleases'}, {type: 'divider', className: 'my-1'});
+ items.push({text: lang.module, icon: 'list muted', command: 'showModules'});
+
+ return {
+ component: 'tree',
+ className: 'p-2 pb-0 api-lib-menu',
+ props: {items: items, itemProps: {className: 'state'}}
+ };
}
};
@@ -1000,9 +1413,11 @@ function getTableOptions(options, info)
{
if(!canModify) col.actions = [];
const actionHints = {edit: lang.editDoc, move: lang.moveDoc, delete: lang.deleteDoc};
+ const privMap = {edit: hasPriv('edit'), move: hasPriv('moveDoc'), delete: hasPriv('delete')};
$.each(col.actionsMap, (key, value) =>
{
if(typeof actionHints[key] === 'string') value.hint = actionHints[key];
+ value.disabled = !privMap[key];
});
}
});
@@ -1038,7 +1453,12 @@ function getFilterTypes(mode)
if(currentSpaceType === 'product') return getLang('productFilterTypes');
return getLang('spaceFilterTypes');
}
- if(mode === 'list') return getLang('filterTypes');
+ if(mode === 'list')
+ {
+ const lib = this.lib;
+ if(lib && lib.data.type === 'api') return getLang('apifilterTypes');
+ return getLang('filterTypes');
+ }
if(mode === 'files') return getLang('fileFilterTypes');
}
@@ -1156,8 +1576,19 @@ function getSortableOptions(type)
*
* @param {object} doc
*/
-function getDocViewSidebarTabs(doc, info)
+window.getDocViewSidebarTabs = function(doc, info)
{
+ if(isApiLib())
+ {
+ const lang = getDocAppLang();
+ if(info.isNewDoc || info.mode === 'create') return [];
+ return [
+ {key: 'info', icon: 'info', title: lang.docInfo},
+ info.mode === 'edit' ? null : {key: 'outline', icon: 'list-box', title: lang.docOutline},
+ {key: 'history', icon: 'history', title: lang.history},
+ ].filter(Boolean);
+ }
+
if(info.isNewDoc) return [{key: 'outline', icon: 'list-box', title: getLang('docOutline')}];
return [
{key: 'info', icon: 'info', title: getLang('docInfo')},
@@ -1218,9 +1649,11 @@ window.setDocAppOptions = function(_, options)
return $.extend(
{
+ defaultState : {listType: '', libReleaseMap: {}},
commands : commands,
- onCreateDoc : userPrivs.create ? handleCreateDoc: null,
- onSaveDoc : userPrivs.edit ? handleSaveDoc : null,
+ customRenders : customRenders,
+ onCreateDoc : userPrivs.create ? handleCreateDoc : null,
+ onSaveDoc : userPrivs.edit ? handleSaveDoc : null,
canMoveDoc : canMoveDoc,
onSwitchView : handleSwitchView,
getActions : getActions,
@@ -1233,8 +1666,9 @@ window.setDocAppOptions = function(_, options)
}, window.docAppOptions, options);
};
-window.docAppActions = actionsMap;
-window.docAppCommands = commands;
-window.getDocApp = getDocApp;
-window.getDocAppLang = getLang;
-window.docAppHasPriv = hasPriv;
+window.docAppActions = actionsMap;
+window.docAppCommands = commands;
+window.docAppCustomRenders = customRenders;
+window.getDocApp = getDocApp;
+window.getDocAppLang = getLang;
+window.docAppHasPriv = hasPriv;
diff --git a/lib/zin/wg/docapp/v1.php b/lib/zin/wg/docapp/v1.php
index 01d805b460..5d8d2f0b8b 100644
--- a/lib/zin/wg/docapp/v1.php
+++ b/lib/zin/wg/docapp/v1.php
@@ -52,6 +52,7 @@ class docApp extends wg
'search' => '?string', // 搜索关键字。
'filterType' => '?string', // 过滤类型。
'pager' => '?PagerInfo', // 分页信息。
+ 'params' => '?string', // 额外参数信息。
'orderBy' => '?string', // 排序字段。
'langData' => '?array', // 语言数据。
'showLibFiles' => '?boolean|array|string',// 是否显示库文件。
@@ -78,6 +79,11 @@ class docApp extends wg
return file_get_contents(__DIR__ . DS . 'js' . DS . 'v1.js');
}
+ public static function getPageCSS(): ?string
+ {
+ return file_get_contents(__DIR__ . DS . 'css' . DS . 'v1.css');
+ }
+
protected function build()
{
global $app, $lang;
@@ -111,13 +117,26 @@ class docApp extends wg
* 设置前端语言数据。 在 js/app.ui.js 中使用 getLang('xxx') 来访问语言数据。
*/
$app->loadLang('file');
+ $app->loadLang('api');
$langData = $lang->doc->docLang;
- $langData->filePreview = $lang->file->preview;
- $langData->fileDownload = $lang->file->download;
- $langData->fileDelete = $lang->file->delete;
- $langData->fileRename = $lang->file->edit;
- $langData->fileConfirmDelete = $lang->file->confirmDelete;
- $langData->deleted = $lang->file->deleted;
+ $langData->filePreview = $lang->file->preview;
+ $langData->fileDownload = $lang->file->download;
+ $langData->fileDelete = $lang->file->delete;
+ $langData->fileRename = $lang->file->edit;
+ $langData->fileConfirmDelete = $lang->file->confirmDelete;
+ $langData->deleted = $lang->file->deleted;
+ $langData->createApi = $lang->api->createApi;
+ $langData->apifilterTypes = $lang->api->filterTypes;
+ $langData->module = $lang->api->module;
+ $langData->struct = $lang->api->struct;
+ $langData->releases = $lang->api->releases;
+ $langData->noApi = $lang->api->noApi;
+ $langData->version = $lang->api->version;
+ $langData->defaultVersion = $lang->api->defaultVersion;
+ $langData->createStruct = $lang->api->createStruct;
+ $langData->createRelease = $lang->api->createRelease;
+ $langData->libTypeList = $lang->api->libTypeList;
+ $langData->latestVersion = $lang->api->latestVersion;
/**
* 通过语言项定义文档表格列显示名称。
diff --git a/lib/zin/wg/filter/v1.php b/lib/zin/wg/filter/v1.php
index ebc22f3710..a463de43b0 100644
--- a/lib/zin/wg/filter/v1.php
+++ b/lib/zin/wg/filter/v1.php
@@ -38,7 +38,27 @@ class filter extends wg
set::items($items),
set::menu($menu),
set::multiple($multiple),
- on::change("$onChange(e, '$name')")
+ on::change()->do(<< \$this.zui().\$.props.items.hasOwnProperty('url');
+ if(hasUrl()) \$this.zui().\$.props.items.data.values = \$this.zui().\$.value;
+ $onChange(event, '$name');
+ JS),
+ on::inited()->do(<< \$this.zui().\$.state.items;
+ const hasUrl = () => \$this.zui().\$.state.items.hasOwnProperty('url');
+ const waitItems = () => {
+ if(!hasUrl())
+ {
+ const picker = \$this.zui().\$;
+ const itemValues = picker.state.items.map(item => item.value);
+ const values = picker.valueList.filter(value => itemValues.includes(value));
+ picker.setValue(values);
+ return;
+ }
+ setTimeout(waitItems, 100);
+ }
+ if(hasUrl()) waitItems();
+ JS)
);
}
diff --git a/lib/zin/wg/formbatch/v1.php b/lib/zin/wg/formbatch/v1.php
index 7d2d9d3a27..d8ca745d83 100644
--- a/lib/zin/wg/formbatch/v1.php
+++ b/lib/zin/wg/formbatch/v1.php
@@ -57,6 +57,10 @@ class formBatch extends formBase
'mode' => 'add'
);
+ protected static array $defineBlocks = array(
+ 'formBefore' => array()
+ );
+
/**
* Handle building inner items.
*
@@ -135,6 +139,7 @@ class formBatch extends formBase
div
(
setClass('form-batch-container relative'),
+ $this->block('formBefore'),
h::table
(
setClass('table form-batch-table'),
diff --git a/lib/zin/wg/gantt/js/v1.js b/lib/zin/wg/gantt/js/v1.js
index 308d80ddac..d940a6a363 100644
--- a/lib/zin/wg/gantt/js/v1.js
+++ b/lib/zin/wg/gantt/js/v1.js
@@ -647,7 +647,6 @@ function initGantt()
$(window).off('.gannt').on('resize.gannt', function(){resizeGanttView()});
gantt.init(ganttID);
- gantt.clearAll();
gantt.parse(ganttData);
gantt.showDate(new Date());
diff --git a/lib/zin/wg/productsbox/js/v1.js b/lib/zin/wg/productsbox/js/v1.js
index 43db3d3543..a88661672b 100644
--- a/lib/zin/wg/productsbox/js/v1.js
+++ b/lib/zin/wg/productsbox/js/v1.js
@@ -7,7 +7,7 @@ window.branchChange = function(e)
{
let $product = $(e.target).closest('.productBox').find("[name^='products']");
- if($('[name="charter"]').length && $('[name="charter"]').val())
+ if($('[name="charter"]').length && $('[name="charter"]').val() > 0)
{
loadRoadmaps($product, $(e.target));
}
@@ -49,7 +49,7 @@ window.loadBranches = function(e)
{
let branch = $(e.target).closest('.productBox').find("[name^='branch']");
- if($('[name="charter"]').length && $('[name="charter"]').val())
+ if($('[name="charter"]').length && $('[name="charter"]').val() > 0)
{
loadRoadmaps(e.target, branch.length > 0 ? branch[0] : branch);
}
@@ -63,7 +63,7 @@ window.loadBranches = function(e)
{
let branch = $(e.target).closest('.productBox').find("[name^='branch']");
- if($('[name="charter"]').length && $('[name="charter"]').val())
+ if($('[name="charter"]').length && $('[name="charter"]').val() > 0)
{
loadRoadmaps(e.target, branch.length > 0 ? branch[0] : branch);
}
@@ -79,7 +79,7 @@ window.addNewLine = function(e)
{
const obj = e.target
const newLine = $(obj).closest('.productBox').clone();
- const objectType = $('[name="charter"]').length && $('[name="charter"]').val() ? 'roadmap' : 'plan';
+ const objectType = $('[name="charter"]').length && $('[name="charter"]').val() > 0 ? 'roadmap' : 'plan';
let index = 0;
let chosenProducts = [];
@@ -128,7 +128,7 @@ window.addNewLine = function(e)
new zui.Picker(`#branch${index}`, {name: `branch[${index}]`, multiple: true, items: []});
new zui.Picker(`#${objectType}s${index}`, {items:[], multiple: true, name: `${objectType}s[${index}]`});
- if($('[name="charter"]').length && $('[name="charter"]').val())
+ if($('[name="charter"]').length && $('[name="charter"]').val() > 0)
{
if(options.items.length == $('.productBox').length) $('.addLine').addClass('hidden');
}
@@ -151,7 +151,7 @@ window.removeLine = function(e)
$(obj).closest('.productBox').remove();
if(typeof toggleStageBy == 'function') toggleStageBy();
- if($('[name="charter"]').length && $('[name="charter"]').val())
+ if($('[name="charter"]').length && $('[name="charter"]').val() > 0)
{
$('.addLine').removeClass('hidden');
}
diff --git a/lib/zin/wg/querybase/v1.php b/lib/zin/wg/querybase/v1.php
index de66812000..5dc10549a0 100644
--- a/lib/zin/wg/querybase/v1.php
+++ b/lib/zin/wg/querybase/v1.php
@@ -83,7 +83,7 @@ class queryBase extends wg
),
$formActionsBlock
),
- set::submitBtnText($lang->pivot->query),
+ set::submitBtnText($lang->bi->query),
formGroup
(
setID('querySql'),
diff --git a/lib/zin/wg/relatedlist/v1.php b/lib/zin/wg/relatedlist/v1.php
index 5599955a54..41005345f7 100644
--- a/lib/zin/wg/relatedlist/v1.php
+++ b/lib/zin/wg/relatedlist/v1.php
@@ -88,13 +88,15 @@ class relatedList extends wg
$title = isset($lang->$moduleName->$langName) ? $lang->$moduleName->$langName : $type;
}
- $groupItems = $this->getGroupItems($type, $group);
+ $groupItems = $this->getGroupItems((string)$type, $group);
+ $content = zget($group, 'content', '');
$items[] = array
(
- 'title' => $title,
- 'items' => $groupItems,
- 'content' => $showCount ? array('html' => '' . count($groupItems) . '') : null
+ 'title' => $title,
+ 'titleAttrs' => array('title' => $title),
+ 'items' => $groupItems,
+ 'content' => $showCount ? array('html' => '' . count($groupItems) . '' . $content) : null
);
}
diff --git a/lib/zin/wg/relatedobjectlist/v1.php b/lib/zin/wg/relatedobjectlist/v1.php
index 78b005a21e..c04e7af65a 100644
--- a/lib/zin/wg/relatedobjectlist/v1.php
+++ b/lib/zin/wg/relatedobjectlist/v1.php
@@ -14,6 +14,13 @@ class relatedObjectList extends relatedList
'browseType' => '?string="byRelation"' //浏览类型 byRelation|byObject
);
+ public static function getPageCSS(): ?string
+ {
+ return <<<'CSS'
+ li.objectItem div.listitem span.is-empty {display: none !important;}
+ CSS;
+ }
+
public static function getPageJS(): ?string
{
global $lang;
@@ -59,7 +66,7 @@ class relatedObjectList extends relatedList
$item->title = "#$relatedObjectID $title";
$item->type = $itemType;
$item->url = !empty($relatedObjectInfo['url']) ? $relatedObjectInfo['url'] : null;
- $item->titleAttrs = !empty($relatedObjectInfo['url']) && !in_array($relatedObjectType, array('repocommit', 'commit', 'mr')) ? array('data-toggle' => 'modal', 'data-size' => 'lg') : null;
+ $item->titleAttrs = !empty($relatedObjectInfo['url']) && !in_array($relatedObjectType, array('repocommit', 'commit', 'mr', 'release', 'build')) ? array('data-toggle' => 'modal', 'data-size' => 'lg') : null;
if(hasPriv('custom', 'removeObjects'))
{
@@ -92,8 +99,9 @@ class relatedObjectList extends relatedList
'title' => $title,
'hint' => $title,
'titleAttrs' => $item->titleAttrs,
- 'leading' => array('html' => wg(idLabel::create($item->type, array('class' => 'text-clip')))->render()),
+ 'leading' => array('html' => wg(idLabel::create($item->type, array('class' => 'text-clip text-left', 'style' => array('max-width' => '45px'))))->render()),
'url' => $item->url,
+ 'class' => 'objectItem',
'actions' => isset($item->actions) ? $item->actions : array()
);
return $info;
diff --git a/lib/zin/wg/stepseditor/js/v1.js b/lib/zin/wg/stepseditor/js/v1.js
index 39401e2d9f..715a1589da 100644
--- a/lib/zin/wg/stepseditor/js/v1.js
+++ b/lib/zin/wg/stepseditor/js/v1.js
@@ -39,6 +39,8 @@ class StepsEditor extends zui.Component
deleteStepTip: '',
dragNestedTip: '',
changeLevelByDrag: false,
+ expectDisabled: true,
+ postDataID: false
};
init()
@@ -262,6 +264,7 @@ class StepsEditor extends zui.Component
([
`