zentao18.8.sql 164 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199
  1. CREATE TABLE `zt_account` (
  2. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  3. `name` varchar(255) NOT NULL DEFAULT '',
  4. `type` varchar(255) NOT NULL DEFAULT '',
  5. `provider` varchar(255) NOT NULL DEFAULT '',
  6. `adminURI` varchar(255) NOT NULL DEFAULT '',
  7. `account` varchar(255) NOT NULL DEFAULT '',
  8. `password` varchar(255) NOT NULL DEFAULT '',
  9. `email` varchar(255) NOT NULL DEFAULT '',
  10. `mobile` varchar(255) NOT NULL DEFAULT '',
  11. `extra` text DEFAULT NULL,
  12. `createdBy` varchar(30) NOT NULL DEFAULT '',
  13. `createdDate` datetime DEFAULT NULL,
  14. `editedBy` varchar(30) NOT NULL DEFAULT '',
  15. `editedDate` datetime DEFAULT NULL,
  16. `status` varchar(30) NOT NULL DEFAULT '',
  17. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  18. PRIMARY KEY (`id`),
  19. KEY `name` (`name`),
  20. KEY `provider` (`provider`),
  21. KEY `status` (`status`)
  22. ) ENGINE=InnoDB;
  23. CREATE TABLE `zt_acl` (
  24. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  25. `account` char(30) NOT NULL DEFAULT '',
  26. `objectType` char(30) NOT NULL DEFAULT '',
  27. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  28. `type` char(40) NOT NULL DEFAULT 'whitelist',
  29. `source` char(30) NOT NULL DEFAULT '',
  30. PRIMARY KEY (`id`)
  31. ) ENGINE=InnoDB;
  32. CREATE TABLE `zt_action` (
  33. `id` int(9) unsigned NOT NULL AUTO_INCREMENT,
  34. `objectType` varchar(30) NOT NULL DEFAULT '',
  35. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  36. `product` text DEFAULT NULL,
  37. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  38. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  39. `actor` varchar(100) NOT NULL DEFAULT '',
  40. `action` varchar(80) NOT NULL DEFAULT '',
  41. `date` datetime DEFAULT NULL,
  42. `comment` text DEFAULT NULL,
  43. `extra` text DEFAULT NULL,
  44. `read` enum('0','1') NOT NULL DEFAULT '0',
  45. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  46. `efforted` tinyint(1) NOT NULL DEFAULT 0,
  47. PRIMARY KEY (`id`),
  48. KEY `date` (`date`),
  49. KEY `actor` (`actor`),
  50. KEY `project` (`project`),
  51. KEY `action` (`action`),
  52. KEY `objectID` (`objectID`)
  53. ) ENGINE=InnoDB;
  54. CREATE TABLE `zt_actionrecent` (
  55. `id` int(9) unsigned NOT NULL AUTO_INCREMENT,
  56. `objectType` varchar(30) NOT NULL DEFAULT '',
  57. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  58. `product` text DEFAULT NULL,
  59. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  60. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  61. `actor` varchar(100) NOT NULL DEFAULT '',
  62. `action` varchar(80) NOT NULL DEFAULT '',
  63. `date` datetime DEFAULT NULL,
  64. `comment` text DEFAULT NULL,
  65. `extra` text DEFAULT NULL,
  66. `read` enum('0','1') NOT NULL DEFAULT '0',
  67. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  68. `efforted` tinyint(1) NOT NULL DEFAULT 0,
  69. PRIMARY KEY (`id`),
  70. KEY `date` (`date`),
  71. KEY `actor` (`actor`),
  72. KEY `project` (`project`),
  73. KEY `action` (`action`),
  74. KEY `objectID` (`objectID`)
  75. ) ENGINE=InnoDB;
  76. CREATE TABLE `zt_activity` (
  77. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  78. `process` mediumint(9) NOT NULL DEFAULT 0,
  79. `name` varchar(255) NOT NULL DEFAULT '',
  80. `optional` varchar(255) NOT NULL DEFAULT '',
  81. `tailorNorm` varchar(255) NOT NULL DEFAULT '',
  82. `content` mediumtext DEFAULT NULL,
  83. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  84. `status` varchar(30) NOT NULL DEFAULT '',
  85. `createdBy` varchar(30) NOT NULL DEFAULT '',
  86. `createdDate` datetime DEFAULT NULL,
  87. `editedBy` varchar(30) NOT NULL DEFAULT '',
  88. `editedDate` datetime DEFAULT NULL,
  89. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  90. `assignedDate` datetime DEFAULT NULL,
  91. `order` mediumint(8) DEFAULT 0,
  92. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  93. PRIMARY KEY (`id`)
  94. ) ENGINE=InnoDB;
  95. CREATE TABLE `zt_api` (
  96. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  97. `product` varchar(255) NOT NULL DEFAULT '',
  98. `lib` int(10) unsigned NOT NULL DEFAULT 0,
  99. `module` int(10) unsigned NOT NULL DEFAULT 0,
  100. `title` varchar(100) NOT NULL DEFAULT '',
  101. `path` varchar(255) NOT NULL DEFAULT '',
  102. `protocol` varchar(10) NOT NULL DEFAULT '',
  103. `method` varchar(10) NOT NULL DEFAULT '',
  104. `requestType` varchar(100) NOT NULL DEFAULT '',
  105. `responseType` varchar(100) NOT NULL DEFAULT '',
  106. `status` varchar(20) NOT NULL DEFAULT '',
  107. `owner` varchar(30) NOT NULL DEFAULT '0',
  108. `desc` mediumtext DEFAULT NULL,
  109. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  110. `params` text DEFAULT NULL,
  111. `paramsExample` text DEFAULT NULL,
  112. `responseExample` text DEFAULT NULL,
  113. `response` text DEFAULT NULL,
  114. `commonParams` text DEFAULT NULL,
  115. `addedBy` varchar(30) NOT NULL DEFAULT '0',
  116. `addedDate` datetime DEFAULT NULL,
  117. `editedBy` varchar(30) NOT NULL DEFAULT '',
  118. `editedDate` datetime DEFAULT NULL,
  119. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  120. PRIMARY KEY (`id`)
  121. ) ENGINE=InnoDB;
  122. CREATE TABLE `zt_apispec` (
  123. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  124. `doc` int(10) unsigned NOT NULL DEFAULT 0,
  125. `module` int(10) unsigned NOT NULL DEFAULT 0,
  126. `title` varchar(100) NOT NULL DEFAULT '',
  127. `path` varchar(255) NOT NULL DEFAULT '',
  128. `protocol` varchar(10) NOT NULL DEFAULT '',
  129. `method` varchar(10) NOT NULL DEFAULT '',
  130. `requestType` varchar(100) NOT NULL DEFAULT '',
  131. `responseType` varchar(100) NOT NULL DEFAULT '',
  132. `status` varchar(20) NOT NULL DEFAULT '',
  133. `owner` varchar(255) NOT NULL DEFAULT '0',
  134. `desc` mediumtext DEFAULT NULL,
  135. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  136. `params` text DEFAULT NULL,
  137. `paramsExample` text DEFAULT NULL,
  138. `responseExample` text DEFAULT NULL,
  139. `response` text DEFAULT NULL,
  140. `addedBy` varchar(30) NOT NULL DEFAULT '0',
  141. `addedDate` datetime DEFAULT NULL,
  142. PRIMARY KEY (`id`)
  143. ) ENGINE=InnoDB;
  144. CREATE TABLE `zt_apistruct` (
  145. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  146. `lib` int(10) unsigned NOT NULL DEFAULT 0,
  147. `name` varchar(30) NOT NULL DEFAULT '',
  148. `type` varchar(50) NOT NULL DEFAULT '',
  149. `desc` mediumtext DEFAULT NULL,
  150. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  151. `attribute` text DEFAULT NULL,
  152. `addedBy` varchar(30) NOT NULL DEFAULT '0',
  153. `addedDate` datetime DEFAULT NULL,
  154. `editedBy` varchar(30) NOT NULL DEFAULT '',
  155. `editedDate` datetime DEFAULT NULL,
  156. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  157. PRIMARY KEY (`id`)
  158. ) ENGINE=InnoDB;
  159. CREATE TABLE `zt_apistruct_spec` (
  160. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  161. `name` varchar(255) NOT NULL DEFAULT '',
  162. `type` varchar(50) NOT NULL DEFAULT '',
  163. `desc` varchar(255) NOT NULL DEFAULT '',
  164. `attribute` text DEFAULT NULL,
  165. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  166. `addedBy` varchar(30) NOT NULL DEFAULT '0',
  167. `addedDate` datetime DEFAULT NULL,
  168. PRIMARY KEY (`id`)
  169. ) ENGINE=InnoDB;
  170. CREATE TABLE `zt_api_lib_release` (
  171. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  172. `lib` int(10) unsigned NOT NULL DEFAULT 0,
  173. `desc` varchar(255) NOT NULL DEFAULT '',
  174. `version` varchar(255) NOT NULL DEFAULT '',
  175. `snap` mediumtext DEFAULT NULL,
  176. `addedBy` varchar(30) NOT NULL DEFAULT '0',
  177. `addedDate` datetime DEFAULT NULL,
  178. PRIMARY KEY (`id`)
  179. ) ENGINE=InnoDB;
  180. CREATE TABLE `zt_approval` (
  181. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  182. `flow` mediumint(8) NOT NULL DEFAULT 0,
  183. `objectType` varchar(30) NOT NULL DEFAULT '',
  184. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  185. `nodes` mediumtext DEFAULT NULL,
  186. `version` mediumint(9) NOT NULL DEFAULT 0,
  187. `status` varchar(20) NOT NULL DEFAULT 'doing',
  188. `result` varchar(20) NOT NULL DEFAULT '',
  189. `createdBy` char(30) NOT NULL DEFAULT '',
  190. `createdDate` datetime DEFAULT NULL,
  191. `deleted` tinyint(4) NOT NULL DEFAULT 0,
  192. PRIMARY KEY (`id`)
  193. ) ENGINE=InnoDB;
  194. CREATE TABLE `zt_approvalflow` (
  195. `id` int(8) NOT NULL AUTO_INCREMENT,
  196. `name` varchar(255) NOT NULL DEFAULT '',
  197. `code` varchar(100) NOT NULL DEFAULT '',
  198. `desc` mediumtext DEFAULT NULL,
  199. `version` mediumint(8) NOT NULL DEFAULT 1,
  200. `createdBy` varchar(30) NOT NULL DEFAULT '',
  201. `createdDate` datetime DEFAULT NULL,
  202. `type` varchar(30) NOT NULL DEFAULT '',
  203. `deleted` tinyint(4) NOT NULL DEFAULT 0,
  204. PRIMARY KEY (`id`)
  205. ) ENGINE=InnoDB;
  206. CREATE TABLE `zt_approvalflowobject` (
  207. `id` int(8) NOT NULL AUTO_INCREMENT,
  208. `root` int(8) NOT NULL DEFAULT 0,
  209. `flow` int(8) NOT NULL DEFAULT 0,
  210. `objectType` char(30) NOT NULL DEFAULT '',
  211. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  212. `extra` varchar(255) NOT NULL DEFAULT '',
  213. PRIMARY KEY (`id`)
  214. ) ENGINE=InnoDB;
  215. CREATE TABLE `zt_approvalflowspec` (
  216. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  217. `flow` mediumint(8) NOT NULL DEFAULT 0,
  218. `version` mediumint(8) NOT NULL DEFAULT 0,
  219. `nodes` mediumtext DEFAULT NULL,
  220. `createdBy` varchar(30) NOT NULL DEFAULT '',
  221. `createdDate` datetime DEFAULT NULL,
  222. PRIMARY KEY (`id`)
  223. ) ENGINE=InnoDB;
  224. CREATE TABLE `zt_approvalnode` (
  225. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  226. `approval` mediumint(8) NOT NULL DEFAULT 0,
  227. `type` enum('review','cc') NOT NULL DEFAULT 'review',
  228. `title` varchar(255) NOT NULL DEFAULT '',
  229. `account` char(30) NOT NULL DEFAULT '',
  230. `node` varchar(100) NOT NULL DEFAULT '',
  231. `reviewType` varchar(100) NOT NULL DEFAULT 'manual',
  232. `multipleType` enum('and','or') NOT NULL DEFAULT 'and',
  233. `prev` mediumtext DEFAULT NULL,
  234. `next` mediumtext DEFAULT NULL,
  235. `status` varchar(20) NOT NULL DEFAULT 'wait',
  236. `result` varchar(10) NOT NULL DEFAULT '',
  237. `date` date DEFAULT NULL,
  238. `opinion` mediumtext DEFAULT NULL,
  239. `extra` mediumtext DEFAULT NULL,
  240. `reviewedBy` char(30) NOT NULL DEFAULT '',
  241. `reviewedDate` datetime DEFAULT NULL,
  242. PRIMARY KEY (`id`),
  243. KEY `idx_reviewed_date` (`reviewedDate`)
  244. ) ENGINE=InnoDB;
  245. CREATE TABLE `zt_approvalobject` (
  246. `id` int(8) NOT NULL AUTO_INCREMENT,
  247. `approval` int(8) NOT NULL DEFAULT 0,
  248. `objectType` char(30) NOT NULL DEFAULT '',
  249. `objectID` mediumint(8) NOT NULL DEFAULT 0,
  250. `extra` varchar(255) NOT NULL DEFAULT '',
  251. PRIMARY KEY (`id`)
  252. ) ENGINE=InnoDB;
  253. CREATE TABLE `zt_approvalrole` (
  254. `id` int(8) NOT NULL AUTO_INCREMENT,
  255. `code` char(30) NOT NULL DEFAULT '',
  256. `name` varchar(255) NOT NULL DEFAULT '',
  257. `desc` text DEFAULT NULL,
  258. `users` longtext DEFAULT NULL,
  259. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  260. PRIMARY KEY (`id`)
  261. ) ENGINE=InnoDB;
  262. SET NAMES utf8mb4;
  263. CREATE TABLE `zt_artifactrepo` (
  264. `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
  265. `name` varchar(45) NOT NULL,
  266. `products` varchar(1000) NOT NULL,
  267. `serverID` smallint(8) NOT NULL,
  268. `repoName` varchar(45) NOT NULL,
  269. `format` varchar(10) NOT NULL,
  270. `type` char(7) NOT NULL,
  271. `status` varchar(10) NOT NULL,
  272. `createdBy` varchar(30) NOT NULL,
  273. `createdDate` datetime DEFAULT NULL,
  274. `editedBy` varchar(30) NOT NULL,
  275. `editedDate` datetime DEFAULT NULL,
  276. `deleted` tinyint(4) unsigned NOT NULL DEFAULT 0,
  277. PRIMARY KEY (`id`)
  278. ) ENGINE=InnoDB;
  279. CREATE TABLE `zt_assetlib` (
  280. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  281. `name` varchar(255) NOT NULL DEFAULT '',
  282. `type` varchar(255) NOT NULL DEFAULT '',
  283. `desc` mediumtext DEFAULT NULL,
  284. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  285. `createdBy` varchar(30) NOT NULL DEFAULT '',
  286. `createdDate` datetime DEFAULT NULL,
  287. `editedBy` varchar(30) NOT NULL DEFAULT '',
  288. `editedDate` datetime DEFAULT NULL,
  289. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  290. PRIMARY KEY (`id`)
  291. ) ENGINE=InnoDB;
  292. CREATE TABLE `zt_attend` (
  293. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  294. `account` char(30) NOT NULL DEFAULT '',
  295. `date` date DEFAULT NULL,
  296. `signIn` time DEFAULT NULL,
  297. `signOut` time DEFAULT NULL,
  298. `status` varchar(30) NOT NULL DEFAULT '',
  299. `ip` varchar(15) NOT NULL DEFAULT '',
  300. `device` varchar(30) NOT NULL DEFAULT '',
  301. `client` varchar(20) NOT NULL DEFAULT '',
  302. `manualIn` time DEFAULT NULL,
  303. `manualOut` time DEFAULT NULL,
  304. `reason` varchar(30) NOT NULL DEFAULT '',
  305. `desc` text DEFAULT NULL,
  306. `reviewStatus` varchar(30) DEFAULT NULL,
  307. `reviewedBy` char(30) NOT NULL DEFAULT '',
  308. `reviewedDate` datetime DEFAULT NULL,
  309. PRIMARY KEY (`id`),
  310. UNIQUE KEY `attend` (`date`,`account`),
  311. KEY `account` (`account`),
  312. KEY `date` (`date`),
  313. KEY `status` (`status`),
  314. KEY `reason` (`reason`),
  315. KEY `reviewStatus` (`reviewStatus`),
  316. KEY `reviewedBy` (`reviewedBy`)
  317. ) ENGINE=InnoDB;
  318. CREATE TABLE `zt_attendstat` (
  319. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  320. `account` char(30) NOT NULL DEFAULT '',
  321. `month` char(10) NOT NULL DEFAULT '',
  322. `normal` decimal(12,2) NOT NULL DEFAULT 0.00,
  323. `late` decimal(12,2) NOT NULL DEFAULT 0.00,
  324. `early` decimal(12,2) NOT NULL DEFAULT 0.00,
  325. `absent` decimal(12,2) NOT NULL DEFAULT 0.00,
  326. `trip` decimal(12,2) NOT NULL DEFAULT 0.00,
  327. `egress` decimal(12,2) NOT NULL DEFAULT 0.00,
  328. `lieu` decimal(12,2) NOT NULL DEFAULT 0.00,
  329. `paidLeave` decimal(12,2) NOT NULL DEFAULT 0.00,
  330. `unpaidLeave` decimal(12,2) NOT NULL DEFAULT 0.00,
  331. `timeOvertime` decimal(12,2) NOT NULL DEFAULT 0.00,
  332. `restOvertime` decimal(12,2) NOT NULL DEFAULT 0.00,
  333. `holidayOvertime` decimal(12,2) NOT NULL DEFAULT 0.00,
  334. `deserve` decimal(12,2) NOT NULL DEFAULT 0.00,
  335. `actual` decimal(12,2) NOT NULL DEFAULT 0.00,
  336. `status` char(30) NOT NULL DEFAULT '',
  337. PRIMARY KEY (`id`),
  338. UNIQUE KEY `attend` (`month`,`account`),
  339. KEY `account` (`account`),
  340. KEY `month` (`month`),
  341. KEY `status` (`status`)
  342. ) ENGINE=InnoDB;
  343. CREATE TABLE `zt_auditcl` (
  344. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  345. `model` char(30) NOT NULL DEFAULT 'waterfall',
  346. `practiceArea` char(30) NOT NULL DEFAULT '',
  347. `type` char(30) NOT NULL DEFAULT '',
  348. `title` varchar(255) NOT NULL DEFAULT '',
  349. `objectType` char(30) NOT NULL DEFAULT '',
  350. `objectID` int(10) NOT NULL DEFAULT 0,
  351. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  352. `status` varchar(30) NOT NULL DEFAULT '',
  353. `createdBy` varchar(30) NOT NULL DEFAULT '',
  354. `createdDate` datetime DEFAULT NULL,
  355. `editedBy` varchar(30) NOT NULL DEFAULT '',
  356. `editedDate` datetime DEFAULT NULL,
  357. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  358. `assignedDate` datetime DEFAULT NULL,
  359. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  360. PRIMARY KEY (`id`)
  361. ) ENGINE=InnoDB;
  362. CREATE TABLE `zt_auditplan` (
  363. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  364. `dateType` char(30) NOT NULL DEFAULT '',
  365. `config` text DEFAULT NULL,
  366. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  367. `objectType` char(30) NOT NULL DEFAULT '',
  368. `process` mediumint(9) NOT NULL DEFAULT 0,
  369. `processType` char(30) NOT NULL DEFAULT '',
  370. `checkDate` date DEFAULT NULL,
  371. `checkedBy` varchar(30) NOT NULL DEFAULT '',
  372. `realCheckDate` date DEFAULT NULL,
  373. `result` char(30) NOT NULL DEFAULT '',
  374. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  375. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  376. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  377. `status` varchar(30) NOT NULL DEFAULT '',
  378. `createdBy` varchar(30) NOT NULL DEFAULT '',
  379. `createdDate` datetime DEFAULT NULL,
  380. `editedBy` varchar(30) NOT NULL DEFAULT '',
  381. `editedDate` datetime DEFAULT NULL,
  382. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  383. `assignedDate` datetime DEFAULT NULL,
  384. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  385. `checkBy` varchar(30) NOT NULL DEFAULT '',
  386. PRIMARY KEY (`id`)
  387. ) ENGINE=InnoDB;
  388. CREATE TABLE `zt_auditresult` (
  389. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  390. `auditplan` mediumint(8) NOT NULL DEFAULT 0,
  391. `listID` mediumint(8) NOT NULL DEFAULT 0,
  392. `result` char(30) NOT NULL DEFAULT '',
  393. `checkedBy` varchar(30) NOT NULL DEFAULT '',
  394. `checkedDate` date DEFAULT NULL,
  395. `comment` text DEFAULT NULL,
  396. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  397. `status` varchar(30) NOT NULL DEFAULT '',
  398. `createdBy` varchar(30) NOT NULL DEFAULT '',
  399. `createdDate` datetime DEFAULT NULL,
  400. `editedBy` varchar(30) NOT NULL DEFAULT '',
  401. `editedDate` datetime DEFAULT NULL,
  402. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  403. `assignedDate` datetime DEFAULT NULL,
  404. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  405. PRIMARY KEY (`id`)
  406. ) ENGINE=InnoDB;
  407. CREATE TABLE `zt_automation` (
  408. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  409. `node` int(11) unsigned NOT NULL DEFAULT 0,
  410. `product` int(11) unsigned NOT NULL DEFAULT 0,
  411. `scriptPath` varchar(255) NOT NULL DEFAULT '',
  412. `shell` mediumtext DEFAULT NULL,
  413. `createdBy` varchar(30) NOT NULL DEFAULT '',
  414. `createdDate` datetime DEFAULT NULL,
  415. PRIMARY KEY (`id`)
  416. ) ENGINE=InnoDB;
  417. CREATE TABLE `zt_basicmeas` (
  418. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  419. `purpose` varchar(50) NOT NULL DEFAULT '',
  420. `scope` char(30) NOT NULL DEFAULT '',
  421. `object` char(30) NOT NULL DEFAULT '',
  422. `name` varchar(90) NOT NULL DEFAULT '',
  423. `code` char(30) NOT NULL DEFAULT '',
  424. `unit` varchar(10) NOT NULL DEFAULT '',
  425. `configure` text DEFAULT NULL,
  426. `params` text DEFAULT NULL,
  427. `definition` text DEFAULT NULL,
  428. `source` varchar(255) NOT NULL DEFAULT '',
  429. `collectType` varchar(30) NOT NULL DEFAULT '',
  430. `collectConf` text DEFAULT NULL,
  431. `execTime` varchar(30) NOT NULL DEFAULT '',
  432. `collectedBy` varchar(10) NOT NULL DEFAULT '',
  433. `createdBy` varchar(30) NOT NULL DEFAULT '',
  434. `createdDate` datetime DEFAULT NULL,
  435. `editedBy` varchar(30) NOT NULL DEFAULT '',
  436. `editedDate` datetime DEFAULT NULL,
  437. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  438. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  439. PRIMARY KEY (`id`),
  440. UNIQUE KEY `code` (`code`)
  441. ) ENGINE=InnoDB;
  442. CREATE TABLE `zt_block` (
  443. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  444. `account` char(30) NOT NULL DEFAULT '',
  445. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  446. `module` varchar(20) NOT NULL DEFAULT '',
  447. `type` char(30) NOT NULL DEFAULT '',
  448. `title` varchar(100) NOT NULL DEFAULT '',
  449. `source` varchar(20) NOT NULL DEFAULT '',
  450. `block` varchar(30) NOT NULL DEFAULT '',
  451. `params` text DEFAULT NULL,
  452. `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
  453. `grid` tinyint(3) unsigned NOT NULL DEFAULT 0,
  454. `height` smallint(5) unsigned NOT NULL DEFAULT 0,
  455. `hidden` tinyint(1) unsigned NOT NULL DEFAULT 0,
  456. PRIMARY KEY (`id`),
  457. UNIQUE KEY `account_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`),
  458. KEY `account` (`account`)
  459. ) ENGINE=InnoDB;
  460. CREATE TABLE `zt_branch` (
  461. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  462. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  463. `name` varchar(255) NOT NULL DEFAULT '',
  464. `default` enum('0','1') NOT NULL DEFAULT '0',
  465. `status` enum('active','closed') NOT NULL DEFAULT 'active',
  466. `desc` varchar(255) NOT NULL DEFAULT '',
  467. `createdDate` date DEFAULT NULL,
  468. `closedDate` date DEFAULT NULL,
  469. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  470. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  471. PRIMARY KEY (`id`),
  472. KEY `product` (`product`)
  473. ) ENGINE=InnoDB;
  474. CREATE TABLE `zt_budget` (
  475. `id` int(8) NOT NULL AUTO_INCREMENT,
  476. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  477. `stage` char(30) NOT NULL DEFAULT '',
  478. `subject` mediumint(8) NOT NULL DEFAULT 0,
  479. `amount` char(30) NOT NULL DEFAULT '',
  480. `name` varchar(255) NOT NULL DEFAULT '',
  481. `desc` mediumtext DEFAULT NULL,
  482. `createdBy` char(30) NOT NULL DEFAULT '',
  483. `createdDate` date DEFAULT NULL,
  484. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  485. `lastEditedDate` date DEFAULT NULL,
  486. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  487. PRIMARY KEY (`id`)
  488. ) ENGINE=InnoDB;
  489. CREATE TABLE `zt_bug` (
  490. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  491. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  492. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  493. `injection` mediumint(8) unsigned NOT NULL DEFAULT 0,
  494. `identify` mediumint(8) unsigned NOT NULL DEFAULT 0,
  495. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  496. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  497. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  498. `plan` mediumint(8) unsigned NOT NULL DEFAULT 0,
  499. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  500. `storyVersion` smallint(6) NOT NULL DEFAULT 1,
  501. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  502. `toTask` mediumint(8) unsigned NOT NULL DEFAULT 0,
  503. `toStory` mediumint(8) NOT NULL DEFAULT 0,
  504. `title` varchar(255) NOT NULL DEFAULT '',
  505. `keywords` varchar(255) NOT NULL DEFAULT '',
  506. `severity` tinyint(4) NOT NULL DEFAULT 0,
  507. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  508. `type` varchar(30) NOT NULL DEFAULT '',
  509. `os` varchar(255) NOT NULL DEFAULT '',
  510. `browser` varchar(255) NOT NULL DEFAULT '',
  511. `hardware` varchar(30) NOT NULL DEFAULT '',
  512. `found` varchar(30) NOT NULL DEFAULT '',
  513. `steps` mediumtext DEFAULT NULL,
  514. `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active',
  515. `subStatus` varchar(30) NOT NULL DEFAULT '',
  516. `color` char(7) NOT NULL DEFAULT '',
  517. `confirmed` tinyint(1) NOT NULL DEFAULT 0,
  518. `activatedCount` smallint(6) NOT NULL DEFAULT 0,
  519. `activatedDate` datetime DEFAULT NULL,
  520. `feedbackBy` varchar(100) NOT NULL DEFAULT '',
  521. `notifyEmail` varchar(100) NOT NULL DEFAULT '',
  522. `mailto` text DEFAULT NULL,
  523. `openedBy` varchar(30) NOT NULL DEFAULT '',
  524. `openedDate` datetime DEFAULT NULL,
  525. `openedBuild` varchar(255) NOT NULL DEFAULT '',
  526. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  527. `assignedDate` datetime DEFAULT NULL,
  528. `deadline` date DEFAULT NULL,
  529. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  530. `resolution` varchar(30) NOT NULL DEFAULT '',
  531. `resolvedBuild` varchar(30) NOT NULL DEFAULT '',
  532. `resolvedDate` datetime DEFAULT NULL,
  533. `closedBy` varchar(30) NOT NULL DEFAULT '',
  534. `closedDate` datetime DEFAULT NULL,
  535. `duplicateBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  536. `linkBug` varchar(255) NOT NULL DEFAULT '',
  537. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  538. `caseVersion` smallint(6) NOT NULL DEFAULT 1,
  539. `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
  540. `result` mediumint(8) unsigned NOT NULL DEFAULT 0,
  541. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  542. `mr` mediumint(8) unsigned NOT NULL DEFAULT 0,
  543. `entry` text DEFAULT NULL,
  544. `lines` varchar(10) NOT NULL DEFAULT '',
  545. `v1` varchar(40) NOT NULL DEFAULT '',
  546. `v2` varchar(40) NOT NULL DEFAULT '',
  547. `repoType` varchar(30) NOT NULL DEFAULT '',
  548. `issueKey` varchar(50) NOT NULL DEFAULT '',
  549. `testtask` mediumint(8) unsigned NOT NULL DEFAULT 0,
  550. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  551. `lastEditedDate` datetime DEFAULT NULL,
  552. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  553. PRIMARY KEY (`id`),
  554. KEY `product` (`product`),
  555. KEY `execution` (`execution`),
  556. KEY `status` (`status`),
  557. KEY `plan` (`plan`),
  558. KEY `story` (`story`),
  559. KEY `case` (`case`),
  560. KEY `toStory` (`toStory`),
  561. KEY `result` (`result`),
  562. KEY `assignedTo` (`assignedTo`),
  563. KEY `deleted` (`deleted`),
  564. KEY `project` (`project`),
  565. KEY `product_status_deleted` (`product`,`status`,`deleted`)
  566. ) ENGINE=InnoDB;
  567. CREATE TABLE `zt_build` (
  568. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  569. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  570. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  571. `branch` varchar(255) NOT NULL DEFAULT '0',
  572. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  573. `builds` varchar(255) NOT NULL DEFAULT '',
  574. `name` char(150) NOT NULL DEFAULT '',
  575. `scmPath` char(255) NOT NULL DEFAULT '',
  576. `filePath` char(255) NOT NULL DEFAULT '',
  577. `date` date DEFAULT NULL,
  578. `stories` text DEFAULT NULL,
  579. `bugs` text DEFAULT NULL,
  580. `artifactRepoID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  581. `builder` char(30) NOT NULL DEFAULT '',
  582. `desc` mediumtext DEFAULT NULL,
  583. `createdBy` varchar(30) NOT NULL DEFAULT '',
  584. `createdDate` datetime DEFAULT NULL,
  585. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  586. PRIMARY KEY (`id`),
  587. KEY `product` (`product`),
  588. KEY `execution` (`execution`)
  589. ) ENGINE=InnoDB;
  590. CREATE TABLE `zt_burn` (
  591. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  592. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  593. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  594. `date` date NOT NULL,
  595. `estimate` float NOT NULL DEFAULT 0,
  596. `left` float NOT NULL DEFAULT 0,
  597. `consumed` float NOT NULL DEFAULT 0,
  598. `storyPoint` float NOT NULL DEFAULT 0,
  599. PRIMARY KEY (`execution`,`date`,`task`)
  600. ) ENGINE=InnoDB;
  601. CREATE TABLE `zt_case` (
  602. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  603. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  604. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  605. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  606. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  607. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  608. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  609. `path` mediumint(8) unsigned NOT NULL DEFAULT 0,
  610. `story` mediumint(30) unsigned NOT NULL DEFAULT 0,
  611. `storyVersion` smallint(6) NOT NULL DEFAULT 1,
  612. `title` varchar(255) NOT NULL DEFAULT '',
  613. `precondition` text DEFAULT NULL,
  614. `keywords` varchar(255) NOT NULL DEFAULT '',
  615. `pri` tinyint(3) unsigned NOT NULL DEFAULT 3,
  616. `type` char(30) NOT NULL DEFAULT '1',
  617. `auto` varchar(10) NOT NULL DEFAULT 'no',
  618. `frame` varchar(10) NOT NULL DEFAULT '',
  619. `stage` varchar(255) NOT NULL DEFAULT '',
  620. `howRun` varchar(30) NOT NULL DEFAULT '',
  621. `script` longtext DEFAULT NULL,
  622. `scriptedBy` varchar(30) NOT NULL DEFAULT '',
  623. `scriptedDate` date DEFAULT NULL,
  624. `scriptStatus` varchar(30) NOT NULL DEFAULT '',
  625. `scriptLocation` varchar(255) NOT NULL DEFAULT '',
  626. `status` char(30) NOT NULL DEFAULT '1',
  627. `subStatus` varchar(30) NOT NULL DEFAULT '',
  628. `color` char(7) NOT NULL DEFAULT '',
  629. `frequency` enum('1','2','3') NOT NULL DEFAULT '1',
  630. `order` tinyint(30) unsigned NOT NULL DEFAULT 0,
  631. `openedBy` char(30) NOT NULL DEFAULT '',
  632. `openedDate` datetime DEFAULT NULL,
  633. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  634. `reviewedDate` date DEFAULT NULL,
  635. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  636. `lastEditedDate` datetime DEFAULT NULL,
  637. `version` tinyint(3) unsigned NOT NULL DEFAULT 0,
  638. `linkCase` varchar(255) NOT NULL DEFAULT '',
  639. `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  640. `fromCaseID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  641. `fromCaseVersion` mediumint(8) unsigned NOT NULL DEFAULT 1,
  642. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  643. `lastRunner` varchar(30) NOT NULL DEFAULT '',
  644. `lastRunDate` datetime DEFAULT NULL,
  645. `lastRunResult` char(30) NOT NULL DEFAULT '',
  646. `scene` int(11) NOT NULL DEFAULT 0,
  647. `sort` int(11) NOT NULL DEFAULT 0,
  648. PRIMARY KEY (`id`),
  649. KEY `product` (`product`),
  650. KEY `story` (`story`),
  651. KEY `fromBug` (`fromBug`),
  652. KEY `module` (`module`),
  653. KEY `scene` (`scene`)
  654. ) ENGINE=InnoDB;
  655. CREATE TABLE `zt_casestep` (
  656. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  657. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  658. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  659. `version` smallint(3) unsigned NOT NULL DEFAULT 0,
  660. `type` varchar(10) NOT NULL DEFAULT 'step',
  661. `desc` text DEFAULT NULL,
  662. `expect` text DEFAULT NULL,
  663. PRIMARY KEY (`id`),
  664. KEY `case` (`case`),
  665. KEY `version` (`version`)
  666. ) ENGINE=InnoDB;
  667. CREATE TABLE `zt_cfd` (
  668. `id` int(8) NOT NULL AUTO_INCREMENT,
  669. `execution` int(8) NOT NULL DEFAULT 0,
  670. `type` char(30) NOT NULL DEFAULT '',
  671. `name` char(30) NOT NULL DEFAULT '',
  672. `count` smallint(6) NOT NULL DEFAULT 0,
  673. `date` date DEFAULT NULL,
  674. PRIMARY KEY (`id`),
  675. UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`)
  676. ) ENGINE=InnoDB;
  677. CREATE TABLE `zt_chart` (
  678. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  679. `name` varchar(255) NOT NULL DEFAULT '',
  680. `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
  681. `type` varchar(30) NOT NULL DEFAULT '',
  682. `group` varchar(255) NOT NULL DEFAULT '',
  683. `dataset` varchar(30) NOT NULL DEFAULT '0',
  684. `desc` text DEFAULT NULL,
  685. `settings` mediumtext DEFAULT NULL,
  686. `filters` mediumtext DEFAULT NULL,
  687. `step` tinyint(1) unsigned NOT NULL DEFAULT 0,
  688. `fields` mediumtext DEFAULT NULL,
  689. `langs` text DEFAULT NULL,
  690. `sql` mediumtext DEFAULT NULL,
  691. `stage` enum('draft','published') NOT NULL DEFAULT 'draft',
  692. `builtin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  693. `objects` mediumtext DEFAULT NULL,
  694. `createdBy` char(30) NOT NULL DEFAULT '',
  695. `createdDate` datetime DEFAULT NULL,
  696. `editedBy` varchar(30) NOT NULL DEFAULT '',
  697. `editedDate` datetime DEFAULT NULL,
  698. `deleted` tinyint(4) NOT NULL DEFAULT 0,
  699. PRIMARY KEY (`id`)
  700. ) ENGINE=InnoDB;
  701. CREATE TABLE `zt_charter` (
  702. `id` int(8) NOT NULL AUTO_INCREMENT,
  703. `name` varchar(255) NOT NULL DEFAULT '',
  704. `level` int(8) NOT NULL DEFAULT 0,
  705. `category` char(30) NOT NULL DEFAULT '',
  706. `market` varchar(30) NOT NULL DEFAULT '',
  707. `check` enum('0','1') NOT NULL DEFAULT '0',
  708. `appliedBy` char(30) NOT NULL DEFAULT '',
  709. `appliedDate` datetime DEFAULT NULL,
  710. `budget` char(30) NOT NULL DEFAULT '',
  711. `budgetUnit` char(30) NOT NULL DEFAULT '',
  712. `product` mediumint(8) NOT NULL DEFAULT 0,
  713. `roadmap` mediumint(8) NOT NULL DEFAULT 0,
  714. `spec` mediumtext DEFAULT NULL,
  715. `status` char(30) NOT NULL DEFAULT '',
  716. `createdBy` char(30) NOT NULL DEFAULT '',
  717. `createdDate` datetime DEFAULT NULL,
  718. `charterFiles` text DEFAULT NULL,
  719. `closedBy` char(30) NOT NULL DEFAULT '',
  720. `closedDate` datetime DEFAULT NULL,
  721. `closedReason` varchar(255) NOT NULL DEFAULT '',
  722. `activatedBy` char(30) NOT NULL DEFAULT '',
  723. `activatedDate` datetime DEFAULT NULL,
  724. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  725. `reviewedResult` char(30) NOT NULL DEFAULT '',
  726. `reviewedDate` datetime DEFAULT NULL,
  727. `meetingDate` date DEFAULT NULL,
  728. `meetingLocation` varchar(255) NOT NULL DEFAULT '',
  729. `meetingMinutes` mediumtext DEFAULT NULL,
  730. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  731. PRIMARY KEY (`id`)
  732. ) ENGINE=InnoDB;
  733. CREATE TABLE `zt_cmcl` (
  734. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  735. `type` char(30) NOT NULL DEFAULT '',
  736. `projectType` varchar(255) NOT NULL DEFAULT '',
  737. `title` int(11) NOT NULL DEFAULT 0,
  738. `contents` text DEFAULT NULL,
  739. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  740. `status` varchar(30) NOT NULL DEFAULT '',
  741. `order` int(11) NOT NULL DEFAULT 0,
  742. `createdBy` varchar(30) NOT NULL DEFAULT '',
  743. `createdDate` datetime DEFAULT NULL,
  744. `editedBy` varchar(30) NOT NULL DEFAULT '',
  745. `editedDate` datetime DEFAULT NULL,
  746. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  747. PRIMARY KEY (`id`)
  748. ) ENGINE=InnoDB;
  749. CREATE TABLE `zt_company` (
  750. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  751. `name` char(120) DEFAULT NULL,
  752. `phone` char(20) DEFAULT NULL,
  753. `fax` char(20) DEFAULT NULL,
  754. `address` char(120) DEFAULT NULL,
  755. `zipcode` char(10) DEFAULT NULL,
  756. `website` char(120) DEFAULT NULL,
  757. `backyard` char(120) DEFAULT NULL,
  758. `guest` enum('1','0') NOT NULL DEFAULT '0',
  759. `admins` char(255) DEFAULT NULL,
  760. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  761. PRIMARY KEY (`id`)
  762. ) ENGINE=InnoDB;
  763. CREATE TABLE `zt_compile` (
  764. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  765. `name` varchar(50) NOT NULL DEFAULT '',
  766. `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
  767. `queue` mediumint(8) NOT NULL DEFAULT 0,
  768. `status` varchar(255) NOT NULL DEFAULT '',
  769. `logs` text DEFAULT NULL,
  770. `atTime` varchar(10) NOT NULL DEFAULT '',
  771. `testtask` mediumint(8) unsigned NOT NULL DEFAULT 0,
  772. `tag` varchar(255) NOT NULL DEFAULT '',
  773. `times` tinyint(3) unsigned NOT NULL DEFAULT 0,
  774. `createdBy` varchar(30) NOT NULL DEFAULT '',
  775. `createdDate` datetime DEFAULT NULL,
  776. `updateDate` datetime DEFAULT NULL,
  777. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  778. PRIMARY KEY (`id`)
  779. ) ENGINE=InnoDB;
  780. CREATE TABLE `zt_config` (
  781. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  782. `vision` varchar(10) NOT NULL DEFAULT '',
  783. `owner` char(30) NOT NULL DEFAULT '',
  784. `module` varchar(30) NOT NULL DEFAULT '',
  785. `section` char(30) NOT NULL DEFAULT '',
  786. `key` char(30) NOT NULL DEFAULT '',
  787. `value` longtext DEFAULT NULL,
  788. PRIMARY KEY (`id`),
  789. UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`),
  790. KEY `vision` (`vision`),
  791. KEY `owner` (`owner`),
  792. KEY `module` (`module`),
  793. KEY `key` (`key`)
  794. ) ENGINE=InnoDB;
  795. CREATE TABLE `zt_cron` (
  796. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  797. `m` varchar(20) NOT NULL DEFAULT '',
  798. `h` varchar(20) NOT NULL DEFAULT '',
  799. `dom` varchar(20) NOT NULL DEFAULT '',
  800. `mon` varchar(20) NOT NULL DEFAULT '',
  801. `dow` varchar(20) NOT NULL DEFAULT '',
  802. `command` text DEFAULT NULL,
  803. `remark` varchar(255) NOT NULL DEFAULT '',
  804. `type` varchar(20) NOT NULL DEFAULT '',
  805. `buildin` tinyint(1) NOT NULL DEFAULT 0,
  806. `status` varchar(20) NOT NULL DEFAULT '',
  807. `lastTime` datetime DEFAULT NULL,
  808. PRIMARY KEY (`id`),
  809. KEY `lastTime` (`lastTime`)
  810. ) ENGINE=InnoDB;
  811. CREATE TABLE `zt_dashboard` (
  812. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  813. `name` varchar(255) NOT NULL DEFAULT '',
  814. `dimension` int(8) NOT NULL DEFAULT 0,
  815. `module` mediumint(9) NOT NULL DEFAULT 0,
  816. `desc` mediumtext DEFAULT NULL,
  817. `layout` mediumtext DEFAULT NULL,
  818. `filters` mediumtext DEFAULT NULL,
  819. `createdBy` varchar(30) NOT NULL DEFAULT '',
  820. `createdDate` datetime DEFAULT NULL,
  821. `deleted` tinyint(4) NOT NULL DEFAULT 0,
  822. PRIMARY KEY (`id`)
  823. ) ENGINE=InnoDB;
  824. CREATE TABLE `zt_dataset` (
  825. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  826. `name` varchar(155) NOT NULL DEFAULT '',
  827. `sql` text DEFAULT NULL,
  828. `fields` mediumtext DEFAULT NULL,
  829. `objects` mediumtext DEFAULT NULL,
  830. `createdBy` varchar(30) NOT NULL DEFAULT '',
  831. `createdDate` datetime DEFAULT NULL,
  832. `deleted` tinyint(4) NOT NULL DEFAULT 0,
  833. PRIMARY KEY (`id`)
  834. ) ENGINE=InnoDB;
  835. CREATE TABLE `zt_dataview` (
  836. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  837. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  838. `name` varchar(155) NOT NULL DEFAULT '',
  839. `code` varchar(50) NOT NULL DEFAULT '',
  840. `view` varchar(57) NOT NULL DEFAULT '',
  841. `sql` text DEFAULT NULL,
  842. `fields` mediumtext DEFAULT NULL,
  843. `langs` text DEFAULT NULL,
  844. `objects` mediumtext DEFAULT NULL,
  845. `createdBy` varchar(30) NOT NULL DEFAULT '',
  846. `createdDate` datetime DEFAULT NULL,
  847. `editedBy` varchar(30) DEFAULT '',
  848. `editedDate` datetime DEFAULT NULL,
  849. `deleted` tinyint(4) NOT NULL DEFAULT 0,
  850. PRIMARY KEY (`id`)
  851. ) ENGINE=InnoDB;
  852. CREATE TABLE `zt_demand` (
  853. `id` int(8) NOT NULL AUTO_INCREMENT,
  854. `pool` int(8) NOT NULL DEFAULT 0,
  855. `module` int(8) NOT NULL DEFAULT 0,
  856. `product` mediumint(8) NOT NULL DEFAULT 0,
  857. `parent` mediumint(8) NOT NULL DEFAULT 0,
  858. `pri` char(30) NOT NULL DEFAULT '',
  859. `category` char(30) NOT NULL DEFAULT '',
  860. `source` char(30) NOT NULL DEFAULT '',
  861. `sourceNote` varchar(255) NOT NULL DEFAULT '',
  862. `title` varchar(255) NOT NULL DEFAULT '',
  863. `feedbackedBy` varchar(255) NOT NULL DEFAULT '',
  864. `email` varchar(255) NOT NULL DEFAULT '',
  865. `assignedTo` char(30) NOT NULL DEFAULT '',
  866. `assignedDate` datetime DEFAULT NULL,
  867. `reviewedBy` text DEFAULT NULL,
  868. `reviewedDate` datetime DEFAULT NULL,
  869. `status` char(30) NOT NULL DEFAULT '',
  870. `duration` char(30) NOT NULL DEFAULT '',
  871. `BSA` char(30) NOT NULL DEFAULT '',
  872. `story` mediumint(8) NOT NULL DEFAULT 0,
  873. `roadmap` mediumint(8) NOT NULL DEFAULT 0,
  874. `createdBy` char(30) NOT NULL DEFAULT '',
  875. `createdDate` datetime DEFAULT NULL,
  876. `mailto` text DEFAULT NULL,
  877. `duplicateDemand` mediumint(8) DEFAULT NULL,
  878. `childDemands` varchar(255) NOT NULL DEFAULT '',
  879. `version` varchar(255) NOT NULL DEFAULT '',
  880. `vision` varchar(255) NOT NULL DEFAULT 'or',
  881. `color` varchar(255) NOT NULL DEFAULT '',
  882. `changedBy` char(30) NOT NULL DEFAULT '',
  883. `changedDate` datetime DEFAULT NULL,
  884. `closedBy` char(30) NOT NULL DEFAULT '',
  885. `closedDate` datetime DEFAULT NULL,
  886. `closedReason` varchar(30) NOT NULL DEFAULT '',
  887. `submitedBy` varchar(30) NOT NULL DEFAULT '',
  888. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  889. `lastEditedDate` datetime DEFAULT NULL,
  890. `activatedDate` datetime DEFAULT NULL,
  891. `distributedBy` varchar(30) NOT NULL DEFAULT '',
  892. `distributedDate` datetime DEFAULT NULL,
  893. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  894. PRIMARY KEY (`id`)
  895. ) ENGINE=InnoDB;
  896. CREATE TABLE `zt_demandpool` (
  897. `id` int(8) NOT NULL AUTO_INCREMENT,
  898. `name` varchar(255) NOT NULL DEFAULT '',
  899. `desc` mediumtext DEFAULT NULL,
  900. `status` char(30) NOT NULL DEFAULT '',
  901. `createdBy` char(30) NOT NULL DEFAULT '',
  902. `createdDate` date DEFAULT NULL,
  903. `owner` text DEFAULT NULL,
  904. `reviewer` text DEFAULT NULL,
  905. `acl` char(30) DEFAULT NULL,
  906. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  907. PRIMARY KEY (`id`)
  908. ) ENGINE=InnoDB;
  909. CREATE TABLE `zt_demandreview` (
  910. `demand` mediumint(9) NOT NULL DEFAULT 0,
  911. `version` smallint(6) NOT NULL DEFAULT 0,
  912. `reviewer` varchar(30) NOT NULL DEFAULT '',
  913. `result` varchar(30) NOT NULL DEFAULT '',
  914. `reviewDate` datetime NOT NULL,
  915. UNIQUE KEY `demand` (`demand`,`version`,`reviewer`)
  916. ) ENGINE=InnoDB;
  917. CREATE TABLE `zt_demandspec` (
  918. `demand` mediumint(9) NOT NULL DEFAULT 0,
  919. `version` smallint(6) NOT NULL DEFAULT 0,
  920. `title` varchar(255) NOT NULL DEFAULT '',
  921. `spec` mediumtext DEFAULT NULL,
  922. `verify` mediumtext DEFAULT NULL,
  923. `files` text DEFAULT NULL,
  924. UNIQUE KEY `demand` (`demand`,`version`)
  925. ) ENGINE=InnoDB;
  926. CREATE TABLE `zt_deploy` (
  927. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  928. `begin` datetime DEFAULT NULL,
  929. `end` datetime DEFAULT NULL,
  930. `name` varchar(255) NOT NULL DEFAULT '',
  931. `desc` mediumtext DEFAULT NULL,
  932. `status` varchar(20) NOT NULL DEFAULT '',
  933. `owner` char(30) NOT NULL DEFAULT '',
  934. `members` text DEFAULT NULL,
  935. `notify` text DEFAULT NULL,
  936. `cases` text DEFAULT NULL,
  937. `createdBy` char(30) NOT NULL DEFAULT '',
  938. `createdDate` datetime DEFAULT NULL,
  939. `result` varchar(20) NOT NULL DEFAULT '',
  940. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  941. PRIMARY KEY (`id`)
  942. ) ENGINE=InnoDB;
  943. CREATE TABLE `zt_deployproduct` (
  944. `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
  945. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  946. `release` mediumint(8) unsigned NOT NULL DEFAULT 0,
  947. `package` varchar(255) NOT NULL DEFAULT '',
  948. UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`)
  949. ) ENGINE=InnoDB;
  950. CREATE TABLE `zt_deployscope` (
  951. `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
  952. `service` mediumint(8) unsigned NOT NULL DEFAULT 0,
  953. `hosts` text DEFAULT NULL,
  954. `remove` text DEFAULT NULL,
  955. `add` text DEFAULT NULL
  956. ) ENGINE=InnoDB;
  957. CREATE TABLE `zt_deploystep` (
  958. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  959. `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
  960. `title` varchar(255) NOT NULL DEFAULT '',
  961. `begin` datetime DEFAULT NULL,
  962. `end` datetime DEFAULT NULL,
  963. `stage` varchar(30) NOT NULL DEFAULT '',
  964. `content` text DEFAULT NULL,
  965. `status` varchar(30) NOT NULL DEFAULT '',
  966. `assignedTo` char(30) NOT NULL DEFAULT '',
  967. `assignedDate` datetime DEFAULT NULL,
  968. `finishedBy` char(30) NOT NULL DEFAULT '',
  969. `finishedDate` datetime DEFAULT NULL,
  970. `createdBy` char(30) NOT NULL DEFAULT '',
  971. `createdDate` datetime DEFAULT NULL,
  972. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  973. PRIMARY KEY (`id`)
  974. ) ENGINE=InnoDB;
  975. CREATE TABLE `zt_dept` (
  976. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  977. `name` char(60) NOT NULL DEFAULT '',
  978. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  979. `path` char(255) NOT NULL DEFAULT '',
  980. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  981. `order` smallint(4) unsigned NOT NULL DEFAULT 0,
  982. `position` char(30) NOT NULL DEFAULT '',
  983. `function` char(255) NOT NULL DEFAULT '',
  984. `manager` char(30) NOT NULL DEFAULT '',
  985. PRIMARY KEY (`id`),
  986. KEY `parent` (`parent`),
  987. KEY `path` (`path`)
  988. ) ENGINE=InnoDB;
  989. CREATE TABLE `zt_design` (
  990. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  991. `project` varchar(255) NOT NULL DEFAULT '',
  992. `product` varchar(255) NOT NULL DEFAULT '',
  993. `commit` text DEFAULT NULL,
  994. `commitedBy` varchar(30) NOT NULL DEFAULT '',
  995. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  996. `name` varchar(255) NOT NULL DEFAULT '',
  997. `status` varchar(30) NOT NULL DEFAULT '',
  998. `createdBy` varchar(30) NOT NULL DEFAULT '',
  999. `createdDate` datetime DEFAULT NULL,
  1000. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1001. `editedDate` datetime DEFAULT NULL,
  1002. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  1003. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  1004. `assignedDate` datetime DEFAULT NULL,
  1005. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1006. `story` char(30) NOT NULL DEFAULT '',
  1007. `desc` mediumtext DEFAULT NULL,
  1008. `version` smallint(6) NOT NULL DEFAULT 0,
  1009. `type` char(30) NOT NULL DEFAULT '',
  1010. PRIMARY KEY (`id`)
  1011. ) ENGINE=InnoDB;
  1012. CREATE TABLE `zt_designspec` (
  1013. `design` mediumint(8) NOT NULL DEFAULT 0,
  1014. `version` smallint(6) NOT NULL DEFAULT 0,
  1015. `name` varchar(255) NOT NULL DEFAULT '',
  1016. `desc` mediumtext DEFAULT NULL,
  1017. `files` varchar(255) NOT NULL DEFAULT '',
  1018. UNIQUE KEY `design` (`design`,`version`)
  1019. ) ENGINE=InnoDB;
  1020. CREATE TABLE `zt_dimension` (
  1021. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1022. `name` varchar(90) NOT NULL DEFAULT '',
  1023. `code` varchar(45) NOT NULL DEFAULT '',
  1024. `desc` text DEFAULT NULL,
  1025. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1026. `createdDate` datetime DEFAULT NULL,
  1027. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1028. `editedDate` datetime DEFAULT NULL,
  1029. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1030. PRIMARY KEY (`id`),
  1031. KEY `code` (`code`)
  1032. ) ENGINE=InnoDB;
  1033. CREATE TABLE `zt_doc` (
  1034. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1035. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  1036. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1037. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1038. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1039. `lib` varchar(30) NOT NULL DEFAULT '',
  1040. `template` varchar(30) NOT NULL DEFAULT '',
  1041. `templateType` varchar(30) NOT NULL DEFAULT '',
  1042. `chapterType` varchar(30) NOT NULL DEFAULT '',
  1043. `module` varchar(30) NOT NULL DEFAULT '',
  1044. `title` varchar(255) NOT NULL DEFAULT '',
  1045. `keywords` varchar(255) NOT NULL DEFAULT '',
  1046. `type` varchar(30) NOT NULL DEFAULT '',
  1047. `status` varchar(30) NOT NULL DEFAULT 'normal',
  1048. `parent` smallint(5) unsigned NOT NULL DEFAULT 0,
  1049. `path` char(255) NOT NULL DEFAULT '',
  1050. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  1051. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  1052. `views` smallint(5) unsigned NOT NULL DEFAULT 0,
  1053. `assetLib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1054. `assetLibType` varchar(30) NOT NULL DEFAULT '',
  1055. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1056. `fromVersion` smallint(6) NOT NULL DEFAULT 1,
  1057. `draft` longtext DEFAULT NULL,
  1058. `collects` smallint(5) unsigned NOT NULL DEFAULT 0,
  1059. `addedBy` varchar(30) NOT NULL DEFAULT '',
  1060. `addedDate` datetime DEFAULT NULL,
  1061. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  1062. `assignedDate` datetime DEFAULT NULL,
  1063. `approvedDate` date DEFAULT NULL,
  1064. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1065. `editedDate` datetime DEFAULT NULL,
  1066. `editingDate` text DEFAULT NULL,
  1067. `editedList` text DEFAULT NULL,
  1068. `mailto` text DEFAULT NULL,
  1069. `acl` varchar(10) NOT NULL DEFAULT 'open',
  1070. `groups` varchar(255) NOT NULL DEFAULT '',
  1071. `users` text DEFAULT NULL,
  1072. `version` smallint(5) unsigned NOT NULL DEFAULT 1,
  1073. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1074. PRIMARY KEY (`id`),
  1075. KEY `product` (`product`),
  1076. KEY `execution` (`execution`),
  1077. KEY `lib` (`lib`)
  1078. ) ENGINE=InnoDB;
  1079. CREATE TABLE `zt_docaction` (
  1080. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1081. `doc` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1082. `action` varchar(80) NOT NULL DEFAULT '',
  1083. `actor` char(30) NOT NULL DEFAULT '',
  1084. `date` datetime DEFAULT NULL,
  1085. PRIMARY KEY (`id`),
  1086. KEY `doc` (`doc`),
  1087. KEY `actor` (`actor`)
  1088. ) ENGINE=InnoDB;
  1089. CREATE TABLE `zt_doccontent` (
  1090. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1091. `doc` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1092. `title` varchar(255) NOT NULL DEFAULT '',
  1093. `digest` varchar(255) NOT NULL DEFAULT '',
  1094. `content` longtext DEFAULT NULL,
  1095. `files` text DEFAULT NULL,
  1096. `type` varchar(10) NOT NULL DEFAULT '',
  1097. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  1098. PRIMARY KEY (`id`),
  1099. UNIQUE KEY `doc_version` (`doc`,`version`)
  1100. ) ENGINE=InnoDB;
  1101. CREATE TABLE `zt_doclib` (
  1102. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  1103. `type` varchar(30) NOT NULL DEFAULT '',
  1104. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  1105. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1106. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1107. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1108. `name` varchar(60) NOT NULL DEFAULT '',
  1109. `baseUrl` varchar(255) NOT NULL DEFAULT '',
  1110. `acl` varchar(10) NOT NULL DEFAULT 'open',
  1111. `groups` varchar(255) NOT NULL DEFAULT '',
  1112. `users` text DEFAULT NULL,
  1113. `main` enum('0','1') NOT NULL DEFAULT '0',
  1114. `collector` text DEFAULT NULL,
  1115. `desc` mediumtext DEFAULT NULL,
  1116. `order` tinyint(5) unsigned NOT NULL DEFAULT 0,
  1117. `addedBy` varchar(30) NOT NULL DEFAULT '',
  1118. `addedDate` datetime DEFAULT NULL,
  1119. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1120. PRIMARY KEY (`id`),
  1121. KEY `product` (`product`),
  1122. KEY `execution` (`execution`)
  1123. ) ENGINE=InnoDB;
  1124. CREATE TABLE `zt_domain` (
  1125. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  1126. `domain` varchar(255) NOT NULL DEFAULT '',
  1127. `adminURI` varchar(255) NOT NULL DEFAULT '',
  1128. `resolverURI` varchar(255) NOT NULL DEFAULT '',
  1129. `register` varchar(255) NOT NULL DEFAULT '',
  1130. `expiredDate` datetime DEFAULT NULL,
  1131. `renew` varchar(255) NOT NULL DEFAULT '',
  1132. `account` varchar(255) NOT NULL DEFAULT '',
  1133. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1134. `createdDate` datetime DEFAULT NULL,
  1135. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1136. `editedDate` datetime DEFAULT NULL,
  1137. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1138. PRIMARY KEY (`id`),
  1139. KEY `domain` (`domain`)
  1140. ) ENGINE=InnoDB;
  1141. CREATE TABLE `zt_durationestimation` (
  1142. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1143. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1144. `stage` mediumint(9) NOT NULL DEFAULT 0,
  1145. `workload` varchar(255) NOT NULL DEFAULT '',
  1146. `worktimeRate` varchar(255) NOT NULL DEFAULT '',
  1147. `people` varchar(255) NOT NULL DEFAULT '',
  1148. `startDate` date DEFAULT NULL,
  1149. `endDate` date DEFAULT NULL,
  1150. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1151. `createdDate` datetime DEFAULT NULL,
  1152. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1153. `editedDate` datetime DEFAULT NULL,
  1154. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1155. PRIMARY KEY (`id`)
  1156. ) ENGINE=InnoDB;
  1157. CREATE TABLE `zt_effort` (
  1158. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1159. `objectType` varchar(30) NOT NULL DEFAULT '',
  1160. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1161. `product` text DEFAULT NULL,
  1162. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1163. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1164. `account` varchar(30) NOT NULL DEFAULT '',
  1165. `work` text DEFAULT NULL,
  1166. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  1167. `date` date DEFAULT NULL,
  1168. `left` float NOT NULL DEFAULT 0,
  1169. `consumed` float NOT NULL DEFAULT 0,
  1170. `begin` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  1171. `end` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  1172. `extra` text DEFAULT NULL,
  1173. `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
  1174. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1175. PRIMARY KEY (`id`),
  1176. KEY `execution` (`execution`),
  1177. KEY `objectID` (`objectID`),
  1178. KEY `date` (`date`),
  1179. KEY `account` (`account`)
  1180. ) ENGINE=InnoDB;
  1181. CREATE TABLE `zt_entry` (
  1182. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1183. `name` varchar(50) NOT NULL DEFAULT '',
  1184. `account` varchar(30) NOT NULL DEFAULT '',
  1185. `code` varchar(20) NOT NULL DEFAULT '',
  1186. `key` varchar(32) NOT NULL DEFAULT '',
  1187. `freePasswd` enum('0','1') NOT NULL DEFAULT '0',
  1188. `ip` varchar(100) NOT NULL DEFAULT '',
  1189. `desc` mediumtext DEFAULT NULL,
  1190. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1191. `createdDate` datetime DEFAULT NULL,
  1192. `calledTime` int(10) unsigned NOT NULL DEFAULT 0,
  1193. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1194. `editedDate` datetime DEFAULT NULL,
  1195. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1196. PRIMARY KEY (`id`)
  1197. ) ENGINE=InnoDB;
  1198. CREATE TABLE `zt_expect` (
  1199. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  1200. `userID` mediumint(8) NOT NULL DEFAULT 0,
  1201. `project` mediumint(8) NOT NULL DEFAULT 0,
  1202. `expect` text DEFAULT NULL,
  1203. `progress` text DEFAULT NULL,
  1204. `createdBy` char(30) NOT NULL DEFAULT '',
  1205. `createdDate` date DEFAULT NULL,
  1206. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1207. PRIMARY KEY (`id`)
  1208. ) ENGINE=InnoDB;
  1209. CREATE TABLE `zt_extension` (
  1210. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1211. `name` varchar(150) NOT NULL DEFAULT '',
  1212. `code` varchar(30) NOT NULL DEFAULT '',
  1213. `version` varchar(50) NOT NULL DEFAULT '',
  1214. `author` varchar(100) NOT NULL DEFAULT '',
  1215. `desc` mediumtext DEFAULT NULL,
  1216. `license` text DEFAULT NULL,
  1217. `type` varchar(20) NOT NULL DEFAULT 'extension',
  1218. `site` varchar(150) NOT NULL DEFAULT '',
  1219. `zentaoCompatible` varchar(100) NOT NULL DEFAULT '',
  1220. `installedTime` datetime DEFAULT NULL,
  1221. `depends` varchar(100) NOT NULL DEFAULT '',
  1222. `dirs` mediumtext DEFAULT NULL,
  1223. `files` mediumtext DEFAULT NULL,
  1224. `status` varchar(20) NOT NULL DEFAULT '',
  1225. PRIMARY KEY (`id`),
  1226. UNIQUE KEY `code` (`code`),
  1227. KEY `name` (`name`),
  1228. KEY `installedTime` (`installedTime`)
  1229. ) ENGINE=InnoDB;
  1230. CREATE TABLE `zt_faq` (
  1231. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  1232. `module` mediumint(9) NOT NULL DEFAULT 0,
  1233. `product` mediumint(9) NOT NULL DEFAULT 0,
  1234. `question` varchar(255) NOT NULL DEFAULT '',
  1235. `answer` text DEFAULT NULL,
  1236. `addedtime` datetime DEFAULT NULL,
  1237. PRIMARY KEY (`id`)
  1238. ) ENGINE=InnoDB;
  1239. CREATE TABLE `zt_feedback` (
  1240. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1241. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1242. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1243. `title` varchar(255) NOT NULL DEFAULT '',
  1244. `type` char(30) NOT NULL DEFAULT '',
  1245. `solution` char(30) NOT NULL DEFAULT '',
  1246. `desc` text DEFAULT NULL,
  1247. `pri` tinyint(3) unsigned NOT NULL DEFAULT 2,
  1248. `status` varchar(30) NOT NULL DEFAULT '',
  1249. `subStatus` varchar(30) NOT NULL DEFAULT '',
  1250. `public` enum('0','1') NOT NULL DEFAULT '0',
  1251. `notify` enum('0','1') NOT NULL DEFAULT '0',
  1252. `notifyEmail` varchar(100) NOT NULL DEFAULT '',
  1253. `source` varchar(255) NOT NULL DEFAULT '',
  1254. `likes` text DEFAULT NULL,
  1255. `result` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1256. `faq` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1257. `openedBy` char(30) NOT NULL DEFAULT '',
  1258. `openedDate` datetime DEFAULT NULL,
  1259. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  1260. `reviewedDate` datetime DEFAULT NULL,
  1261. `processedBy` char(30) NOT NULL DEFAULT '',
  1262. `processedDate` datetime DEFAULT NULL,
  1263. `closedBy` char(30) NOT NULL DEFAULT '',
  1264. `closedDate` datetime DEFAULT NULL,
  1265. `closedReason` varchar(30) NOT NULL DEFAULT '',
  1266. `editedBy` char(30) NOT NULL DEFAULT '',
  1267. `editedDate` datetime DEFAULT NULL,
  1268. `assignedTo` varchar(255) NOT NULL DEFAULT '',
  1269. `assignedDate` datetime DEFAULT NULL,
  1270. `activatedBy` varchar(30) NOT NULL DEFAULT '',
  1271. `activatedDate` datetime DEFAULT NULL,
  1272. `feedbackBy` varchar(100) NOT NULL DEFAULT '',
  1273. `repeatFeedback` mediumint(8) NOT NULL DEFAULT 0,
  1274. `mailto` varchar(255) NOT NULL DEFAULT '',
  1275. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1276. PRIMARY KEY (`id`)
  1277. ) ENGINE=InnoDB;
  1278. CREATE TABLE `zt_feedbackview` (
  1279. `account` char(30) NOT NULL DEFAULT '',
  1280. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1281. UNIQUE KEY `account_product` (`account`,`product`)
  1282. ) ENGINE=InnoDB;
  1283. CREATE TABLE `zt_file` (
  1284. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1285. `pathname` char(100) NOT NULL DEFAULT '',
  1286. `title` varchar(255) NOT NULL DEFAULT '',
  1287. `extension` char(30) NOT NULL DEFAULT '',
  1288. `size` int(10) unsigned NOT NULL DEFAULT 0,
  1289. `objectType` char(30) NOT NULL DEFAULT '',
  1290. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  1291. `addedBy` char(30) NOT NULL DEFAULT '',
  1292. `addedDate` datetime DEFAULT NULL,
  1293. `downloads` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1294. `extra` varchar(255) NOT NULL DEFAULT '',
  1295. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1296. PRIMARY KEY (`id`),
  1297. KEY `objectType` (`objectType`),
  1298. KEY `objectID` (`objectID`)
  1299. ) ENGINE=InnoDB;
  1300. CREATE TABLE `zt_gapanalysis` (
  1301. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1302. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1303. `account` varchar(30) NOT NULL DEFAULT '',
  1304. `role` varchar(20) NOT NULL DEFAULT '',
  1305. `analysis` mediumtext DEFAULT NULL,
  1306. `needTrain` enum('no','yes') NOT NULL DEFAULT 'no',
  1307. `createdBy` char(30) NOT NULL DEFAULT '',
  1308. `createdDate` datetime DEFAULT NULL,
  1309. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1310. `editedDate` datetime DEFAULT NULL,
  1311. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1312. PRIMARY KEY (`id`),
  1313. UNIQUE KEY `project_account` (`project`,`account`)
  1314. ) ENGINE=InnoDB;
  1315. CREATE TABLE `zt_group` (
  1316. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1317. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1318. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  1319. `name` char(30) NOT NULL DEFAULT '',
  1320. `role` char(30) NOT NULL DEFAULT '',
  1321. `desc` char(255) NOT NULL DEFAULT '',
  1322. `acl` text DEFAULT NULL,
  1323. `developer` enum('0','1') NOT NULL DEFAULT '1',
  1324. PRIMARY KEY (`id`)
  1325. ) ENGINE=InnoDB;
  1326. CREATE TABLE `zt_grouppriv` (
  1327. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1328. `module` char(30) NOT NULL DEFAULT '',
  1329. `method` char(30) NOT NULL DEFAULT '',
  1330. UNIQUE KEY `group` (`group`,`module`,`method`)
  1331. ) ENGINE=InnoDB;
  1332. CREATE TABLE `zt_history` (
  1333. `id` int(9) unsigned NOT NULL AUTO_INCREMENT,
  1334. `action` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1335. `field` varchar(30) NOT NULL DEFAULT '',
  1336. `old` text DEFAULT NULL,
  1337. `new` text DEFAULT NULL,
  1338. `diff` mediumtext DEFAULT NULL,
  1339. PRIMARY KEY (`id`),
  1340. KEY `action` (`action`)
  1341. ) ENGINE=InnoDB;
  1342. CREATE TABLE `zt_holiday` (
  1343. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1344. `name` varchar(30) NOT NULL DEFAULT '',
  1345. `type` enum('holiday','working') NOT NULL DEFAULT 'holiday',
  1346. `desc` text DEFAULT NULL,
  1347. `year` char(4) NOT NULL DEFAULT '',
  1348. `begin` date DEFAULT NULL,
  1349. `end` date DEFAULT NULL,
  1350. PRIMARY KEY (`id`),
  1351. KEY `year` (`year`),
  1352. KEY `name` (`name`)
  1353. ) ENGINE=InnoDB;
  1354. CREATE TABLE `zt_host` (
  1355. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1356. `name` varchar(255) NOT NULL DEFAULT '',
  1357. `type` varchar(30) NOT NULL DEFAULT 'normal',
  1358. `hostType` varchar(30) NOT NULL DEFAULT '',
  1359. `mac` varchar(128) NOT NULL DEFAULT '',
  1360. `memory` varchar(30) NOT NULL DEFAULT '',
  1361. `diskSize` varchar(30) NOT NULL DEFAULT '',
  1362. `status` varchar(50) NOT NULL DEFAULT '',
  1363. `secret` varchar(50) NOT NULL DEFAULT '',
  1364. `desc` text DEFAULT NULL,
  1365. `tokenSN` varchar(50) NOT NULL DEFAULT '',
  1366. `tokenTime` datetime DEFAULT NULL,
  1367. `oldTokenSN` varchar(50) NOT NULL DEFAULT '',
  1368. `vsoft` varchar(30) NOT NULL DEFAULT '',
  1369. `heartbeat` datetime DEFAULT NULL,
  1370. `zap` varchar(10) NOT NULL DEFAULT '',
  1371. `provider` varchar(255) NOT NULL DEFAULT '',
  1372. `vnc` int(11) NOT NULL DEFAULT 0,
  1373. `ztf` int(11) NOT NULL DEFAULT 0,
  1374. `zd` int(11) NOT NULL DEFAULT 0,
  1375. `ssh` int(11) NOT NULL DEFAULT 0,
  1376. `parent` int(11) unsigned NOT NULL DEFAULT 0,
  1377. `image` int(11) unsigned NOT NULL DEFAULT 0,
  1378. `admin` smallint(5) unsigned NOT NULL DEFAULT 0,
  1379. `serverRoom` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1380. `serverModel` varchar(256) NOT NULL DEFAULT '',
  1381. `hardwareType` varchar(64) NOT NULL DEFAULT '',
  1382. `cpuBrand` varchar(128) NOT NULL DEFAULT '',
  1383. `cpuModel` varchar(128) NOT NULL DEFAULT '',
  1384. `cpuNumber` varchar(16) NOT NULL DEFAULT '',
  1385. `cpuCores` varchar(30) NOT NULL DEFAULT '',
  1386. `intranet` varchar(128) NOT NULL DEFAULT '',
  1387. `extranet` varchar(128) NOT NULL DEFAULT '',
  1388. `osName` varchar(64) NOT NULL DEFAULT '',
  1389. `osVersion` varchar(64) NOT NULL DEFAULT '',
  1390. `group` varchar(128) NOT NULL DEFAULT '',
  1391. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1392. `createdDate` datetime DEFAULT NULL,
  1393. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1394. `editedDate` datetime DEFAULT NULL,
  1395. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1396. PRIMARY KEY (`id`)
  1397. ) ENGINE=InnoDB;
  1398. CREATE TABLE `zt_image` (
  1399. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1400. `host` int(11) unsigned NOT NULL DEFAULT 0,
  1401. `name` varchar(64) NOT NULL DEFAULT '',
  1402. `localName` varchar(64) NOT NULL DEFAULT '',
  1403. `address` varchar(64) NOT NULL DEFAULT '',
  1404. `path` varchar(64) NOT NULL DEFAULT '',
  1405. `status` varchar(20) NOT NULL DEFAULT '',
  1406. `osName` varchar(32) NOT NULL DEFAULT '',
  1407. `from` varchar(10) NOT NULL DEFAULT 'zentao',
  1408. `memory` float unsigned NOT NULL DEFAULT 0,
  1409. `disk` float unsigned NOT NULL DEFAULT 0,
  1410. `fileSize` float unsigned NOT NULL DEFAULT 0,
  1411. `md5` varchar(64) NOT NULL DEFAULT '',
  1412. `desc` text DEFAULT NULL,
  1413. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1414. `createdDate` datetime DEFAULT NULL,
  1415. `restoreDate` datetime DEFAULT NULL,
  1416. PRIMARY KEY (`id`)
  1417. ) ENGINE=InnoDB;
  1418. CREATE TABLE `zt_im_chat` (
  1419. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1420. `gid` char(40) NOT NULL DEFAULT '',
  1421. `name` varchar(60) NOT NULL DEFAULT '',
  1422. `type` varchar(20) NOT NULL DEFAULT 'group',
  1423. `admins` varchar(255) NOT NULL DEFAULT '',
  1424. `committers` varchar(255) NOT NULL DEFAULT '',
  1425. `subject` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1426. `public` enum('0','1') NOT NULL DEFAULT '0',
  1427. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1428. `createdDate` datetime DEFAULT NULL,
  1429. `ownedBy` varchar(30) NOT NULL DEFAULT '',
  1430. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1431. `editedDate` datetime DEFAULT NULL,
  1432. `mergedDate` datetime DEFAULT NULL,
  1433. `lastActiveTime` datetime DEFAULT NULL,
  1434. `lastMessage` int(11) unsigned NOT NULL DEFAULT 0,
  1435. `lastMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
  1436. `dismissDate` datetime DEFAULT NULL,
  1437. `pinnedMessages` text DEFAULT NULL,
  1438. `mergedChats` text DEFAULT NULL,
  1439. `adminInvite` enum('0','1') NOT NULL DEFAULT '0',
  1440. `avatar` text DEFAULT NULL,
  1441. `archiveDate` datetime DEFAULT NULL,
  1442. PRIMARY KEY (`id`),
  1443. KEY `gid` (`gid`),
  1444. KEY `name` (`name`),
  1445. KEY `type` (`type`),
  1446. KEY `public` (`public`),
  1447. KEY `createdBy` (`createdBy`),
  1448. KEY `editedBy` (`editedBy`)
  1449. ) ENGINE=InnoDB;
  1450. CREATE TABLE `zt_im_chatuser` (
  1451. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1452. `cgid` char(40) NOT NULL DEFAULT '',
  1453. `user` mediumint(8) NOT NULL DEFAULT 0,
  1454. `order` smallint(5) NOT NULL DEFAULT 0,
  1455. `star` enum('0','1') NOT NULL DEFAULT '0',
  1456. `hide` enum('0','1') NOT NULL DEFAULT '0',
  1457. `mute` enum('0','1') NOT NULL DEFAULT '0',
  1458. `freeze` enum('0','1') NOT NULL DEFAULT '0',
  1459. `join` datetime DEFAULT NULL,
  1460. `quit` datetime DEFAULT NULL,
  1461. `category` varchar(40) NOT NULL DEFAULT '',
  1462. `lastReadMessage` int(11) unsigned NOT NULL DEFAULT 0,
  1463. `lastReadMessageIndex` int(11) unsigned NOT NULL DEFAULT 0,
  1464. PRIMARY KEY (`id`),
  1465. UNIQUE KEY `chatuser` (`cgid`,`user`),
  1466. KEY `cgid` (`cgid`),
  1467. KEY `user` (`user`),
  1468. KEY `order` (`order`),
  1469. KEY `star` (`star`),
  1470. KEY `hide` (`hide`)
  1471. ) ENGINE=InnoDB;
  1472. CREATE TABLE `zt_im_chat_message_index` (
  1473. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1474. `gid` char(40) NOT NULL DEFAULT '',
  1475. `tableName` char(64) NOT NULL DEFAULT '',
  1476. `start` int(11) unsigned NOT NULL DEFAULT 0,
  1477. `end` int(11) unsigned NOT NULL DEFAULT 0,
  1478. `startIndex` int(11) unsigned NOT NULL DEFAULT 0,
  1479. `endIndex` int(11) unsigned NOT NULL DEFAULT 0,
  1480. `startDate` datetime DEFAULT NULL,
  1481. `endDate` datetime DEFAULT NULL,
  1482. `count` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1483. PRIMARY KEY (`id`),
  1484. UNIQUE KEY `chattable` (`gid`,`tableName`),
  1485. KEY `start` (`start`),
  1486. KEY `end` (`end`),
  1487. KEY `startDate` (`startDate`),
  1488. KEY `endDate` (`endDate`),
  1489. KEY `chatstartindex` (`gid`,`startIndex`),
  1490. KEY `chatendindex` (`gid`,`endIndex`)
  1491. ) ENGINE=InnoDB;
  1492. CREATE TABLE `zt_im_client` (
  1493. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1494. `version` char(30) NOT NULL DEFAULT '',
  1495. `desc` varchar(100) NOT NULL DEFAULT '',
  1496. `changeLog` text DEFAULT NULL,
  1497. `strategy` varchar(10) NOT NULL DEFAULT '',
  1498. `downloads` text DEFAULT NULL,
  1499. `createdDate` datetime DEFAULT NULL,
  1500. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1501. `editedDate` datetime DEFAULT NULL,
  1502. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1503. `status` enum('released','wait') NOT NULL DEFAULT 'wait',
  1504. PRIMARY KEY (`id`)
  1505. ) ENGINE=InnoDB;
  1506. CREATE TABLE `zt_im_conference` (
  1507. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1508. `rid` char(40) NOT NULL DEFAULT '',
  1509. `cgid` char(40) NOT NULL DEFAULT '',
  1510. `status` enum('closed','open','notStarted') NOT NULL DEFAULT 'closed',
  1511. `participants` text DEFAULT NULL,
  1512. `subscribers` text DEFAULT NULL,
  1513. `invitee` text DEFAULT NULL,
  1514. `openedBy` mediumint(8) NOT NULL DEFAULT 0,
  1515. `openedDate` datetime DEFAULT NULL,
  1516. `topic` text DEFAULT NULL,
  1517. `startTime` datetime DEFAULT NULL,
  1518. `endTime` datetime DEFAULT NULL,
  1519. `password` char(20) NOT NULL DEFAULT '',
  1520. `type` enum('default','periodic','scheduled') NOT NULL DEFAULT 'default',
  1521. `number` char(20) NOT NULL DEFAULT '',
  1522. `note` text DEFAULT NULL,
  1523. `sentNotify` tinyint(1) NOT NULL DEFAULT 0,
  1524. `reminderTime` int(11) NOT NULL DEFAULT 0,
  1525. PRIMARY KEY (`id`),
  1526. KEY `status` (`status`)
  1527. ) ENGINE=InnoDB;
  1528. CREATE TABLE `zt_im_conferenceaction` (
  1529. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1530. `rid` char(40) NOT NULL DEFAULT '',
  1531. `type` enum('create','invite','join','leave','close','publish') NOT NULL DEFAULT 'create',
  1532. `data` text DEFAULT NULL,
  1533. `user` mediumint(8) NOT NULL DEFAULT 0,
  1534. `date` datetime DEFAULT NULL,
  1535. `device` char(40) NOT NULL DEFAULT 'default',
  1536. PRIMARY KEY (`id`)
  1537. ) ENGINE=InnoDB;
  1538. CREATE TABLE `zt_im_conferenceuser` (
  1539. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1540. `conference` mediumint(8) NOT NULL DEFAULT 0,
  1541. `user` mediumint(8) NOT NULL DEFAULT 0,
  1542. `hide` enum('0','1') NOT NULL DEFAULT '0',
  1543. PRIMARY KEY (`id`),
  1544. UNIQUE KEY `conferenceuser` (`conference`,`user`)
  1545. ) ENGINE=InnoDB;
  1546. CREATE TABLE `zt_im_message` (
  1547. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1548. `gid` char(40) NOT NULL DEFAULT '',
  1549. `cgid` char(40) NOT NULL DEFAULT '',
  1550. `user` varchar(30) NOT NULL DEFAULT '',
  1551. `date` datetime DEFAULT NULL,
  1552. `index` int(11) unsigned NOT NULL DEFAULT 0,
  1553. `type` enum('normal','broadcast','notify','bulletin','botcommand') NOT NULL DEFAULT 'normal',
  1554. `content` text DEFAULT NULL,
  1555. `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
  1556. `data` text DEFAULT NULL,
  1557. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1558. PRIMARY KEY (`id`),
  1559. KEY `mgid` (`gid`),
  1560. KEY `mcgid` (`cgid`),
  1561. KEY `muser` (`user`),
  1562. KEY `mtype` (`type`)
  1563. ) ENGINE=InnoDB;
  1564. CREATE TABLE `zt_im_messagestatus` (
  1565. `user` mediumint(8) NOT NULL DEFAULT 0,
  1566. `message` int(11) unsigned NOT NULL DEFAULT 0,
  1567. `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting',
  1568. UNIQUE KEY `user` (`user`,`message`)
  1569. ) ENGINE=InnoDB;
  1570. CREATE TABLE `zt_im_message_backup` (
  1571. `id` int(11) unsigned NOT NULL DEFAULT 0,
  1572. `gid` char(40) NOT NULL DEFAULT '',
  1573. `cgid` char(40) NOT NULL DEFAULT '',
  1574. `user` varchar(30) NOT NULL DEFAULT '',
  1575. `date` datetime DEFAULT NULL,
  1576. `index` int(11) unsigned NOT NULL DEFAULT 0,
  1577. `type` enum('normal','broadcast','notify') NOT NULL DEFAULT 'normal',
  1578. `content` text DEFAULT NULL,
  1579. `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text',
  1580. `data` text DEFAULT NULL,
  1581. `deleted` enum('0','1') NOT NULL DEFAULT '0'
  1582. ) ENGINE=InnoDB;
  1583. CREATE TABLE `zt_im_message_index` (
  1584. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1585. `tableName` char(64) NOT NULL DEFAULT '',
  1586. `start` int(11) unsigned NOT NULL DEFAULT 0,
  1587. `end` int(11) unsigned NOT NULL DEFAULT 0,
  1588. `startDate` datetime DEFAULT NULL,
  1589. `endDate` datetime DEFAULT NULL,
  1590. `chats` text DEFAULT NULL,
  1591. PRIMARY KEY (`id`),
  1592. KEY `tableName` (`tableName`),
  1593. KEY `start` (`start`),
  1594. KEY `end` (`end`),
  1595. KEY `startDate` (`startDate`),
  1596. KEY `endDate` (`endDate`)
  1597. ) ENGINE=InnoDB;
  1598. CREATE TABLE `zt_im_queue` (
  1599. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1600. `type` char(30) NOT NULL DEFAULT '',
  1601. `content` text DEFAULT NULL,
  1602. `addDate` datetime DEFAULT NULL,
  1603. `processDate` datetime DEFAULT NULL,
  1604. `result` text DEFAULT NULL,
  1605. `status` char(30) NOT NULL DEFAULT '',
  1606. PRIMARY KEY (`id`)
  1607. ) ENGINE=InnoDB;
  1608. CREATE TABLE `zt_im_userdevice` (
  1609. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1610. `user` mediumint(8) NOT NULL DEFAULT 0,
  1611. `device` char(40) NOT NULL DEFAULT 'default',
  1612. `deviceID` char(40) NOT NULL DEFAULT '',
  1613. `token` char(64) NOT NULL DEFAULT '',
  1614. `validUntil` datetime DEFAULT NULL,
  1615. `lastLogin` datetime DEFAULT NULL,
  1616. `lastLogout` datetime DEFAULT NULL,
  1617. `online` tinyint(1) NOT NULL DEFAULT 0,
  1618. `version` char(10) NOT NULL DEFAULT '',
  1619. PRIMARY KEY (`id`),
  1620. UNIQUE KEY `userdevice` (`user`,`device`),
  1621. KEY `user` (`user`),
  1622. KEY `lastLogin` (`lastLogin`),
  1623. KEY `lastLogout` (`lastLogout`)
  1624. ) ENGINE=InnoDB;
  1625. CREATE TABLE `zt_instance` (
  1626. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1627. `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1628. `solution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1629. `name` char(50) DEFAULT '',
  1630. `appID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1631. `appName` char(50) NOT NULL DEFAULT '',
  1632. `appVersion` char(20) NOT NULL DEFAULT '',
  1633. `chart` char(50) NOT NULL DEFAULT '',
  1634. `logo` varchar(255) DEFAULT '',
  1635. `version` char(50) NOT NULL DEFAULT '',
  1636. `desc` text DEFAULT NULL,
  1637. `introduction` varchar(500) DEFAULT '',
  1638. `source` char(20) NOT NULL DEFAULT '',
  1639. `channel` char(20) DEFAULT '',
  1640. `k8name` char(64) NOT NULL DEFAULT '',
  1641. `status` char(20) NOT NULL DEFAULT '',
  1642. `pinned` enum('0','1') NOT NULL DEFAULT '0',
  1643. `domain` char(255) NOT NULL DEFAULT '',
  1644. `smtpSnippetName` char(30) DEFAULT '',
  1645. `ldapSnippetName` char(30) DEFAULT '',
  1646. `ldapSettings` text DEFAULT NULL,
  1647. `dbSettings` text DEFAULT NULL,
  1648. `autoBackup` tinyint(1) NOT NULL DEFAULT 0,
  1649. `backupKeepDays` int(10) unsigned NOT NULL DEFAULT 1,
  1650. `autoRestore` tinyint(1) NOT NULL DEFAULT 0,
  1651. `env` text DEFAULT NULL,
  1652. `createdBy` char(30) NOT NULL DEFAULT '',
  1653. `createdAt` datetime NOT NULL,
  1654. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  1655. PRIMARY KEY (`id`),
  1656. KEY `space` (`space`),
  1657. KEY `k8name` (`k8name`)
  1658. ) ENGINE=InnoDB;
  1659. CREATE TABLE `zt_intervention` (
  1660. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  1661. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1662. `activity` mediumint(8) NOT NULL DEFAULT 0,
  1663. `status` char(30) NOT NULL DEFAULT '',
  1664. `partake` text DEFAULT NULL,
  1665. `begin` date DEFAULT NULL,
  1666. `realBegin` date DEFAULT NULL,
  1667. `situation` varchar(255) NOT NULL DEFAULT '',
  1668. `createdBy` char(30) NOT NULL DEFAULT '',
  1669. `createdDate` date DEFAULT NULL,
  1670. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1671. PRIMARY KEY (`id`),
  1672. UNIQUE KEY `project` (`project`,`activity`)
  1673. ) ENGINE=InnoDB;
  1674. CREATE TABLE `zt_issue` (
  1675. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1676. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  1677. `project` varchar(255) NOT NULL DEFAULT '',
  1678. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1679. `title` varchar(255) NOT NULL DEFAULT '',
  1680. `desc` mediumtext DEFAULT NULL,
  1681. `pri` char(30) NOT NULL DEFAULT '',
  1682. `severity` char(30) NOT NULL DEFAULT '',
  1683. `type` char(30) NOT NULL DEFAULT '',
  1684. `activity` varchar(255) NOT NULL DEFAULT '',
  1685. `deadline` date DEFAULT NULL,
  1686. `resolution` char(30) NOT NULL DEFAULT '',
  1687. `resolutionComment` text DEFAULT NULL,
  1688. `objectID` varchar(255) NOT NULL DEFAULT '',
  1689. `resolvedDate` date DEFAULT NULL,
  1690. `status` varchar(30) NOT NULL DEFAULT '',
  1691. `owner` varchar(255) NOT NULL DEFAULT '',
  1692. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1693. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1694. `version` smallint(6) NOT NULL DEFAULT 1,
  1695. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1696. `createdDate` datetime DEFAULT NULL,
  1697. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1698. `editedDate` datetime DEFAULT NULL,
  1699. `activateBy` varchar(30) NOT NULL DEFAULT '',
  1700. `activateDate` date DEFAULT NULL,
  1701. `closedBy` varchar(30) NOT NULL DEFAULT '',
  1702. `closedDate` date DEFAULT NULL,
  1703. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  1704. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  1705. `assignedDate` datetime DEFAULT NULL,
  1706. `approvedDate` date DEFAULT NULL,
  1707. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1708. PRIMARY KEY (`id`)
  1709. ) ENGINE=InnoDB;
  1710. CREATE TABLE `zt_job` (
  1711. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1712. `name` varchar(50) NOT NULL DEFAULT '',
  1713. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1714. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1715. `frame` varchar(20) NOT NULL DEFAULT '',
  1716. `engine` varchar(20) NOT NULL DEFAULT '',
  1717. `server` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1718. `pipeline` varchar(500) NOT NULL DEFAULT '',
  1719. `triggerType` varchar(255) NOT NULL DEFAULT '',
  1720. `sonarqubeServer` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1721. `projectKey` varchar(255) NOT NULL DEFAULT '',
  1722. `svnDir` varchar(255) NOT NULL DEFAULT '',
  1723. `atDay` varchar(255) NOT NULL DEFAULT '',
  1724. `atTime` varchar(10) NOT NULL DEFAULT '',
  1725. `customParam` text DEFAULT NULL,
  1726. `comment` varchar(255) NOT NULL DEFAULT '',
  1727. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1728. `createdDate` datetime DEFAULT NULL,
  1729. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1730. `editedDate` datetime DEFAULT NULL,
  1731. `lastExec` datetime DEFAULT NULL,
  1732. `lastStatus` varchar(255) NOT NULL DEFAULT '',
  1733. `lastTag` varchar(255) NOT NULL DEFAULT '',
  1734. `lastSyncDate` datetime DEFAULT NULL,
  1735. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1736. PRIMARY KEY (`id`)
  1737. ) ENGINE=InnoDB;
  1738. CREATE TABLE `zt_kanban` (
  1739. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1740. `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1741. `name` varchar(255) NOT NULL DEFAULT '',
  1742. `owner` varchar(30) NOT NULL DEFAULT '',
  1743. `team` text DEFAULT NULL,
  1744. `desc` mediumtext DEFAULT NULL,
  1745. `acl` char(30) NOT NULL DEFAULT 'open',
  1746. `whitelist` text DEFAULT NULL,
  1747. `archived` enum('0','1') NOT NULL DEFAULT '1',
  1748. `performable` enum('0','1') NOT NULL DEFAULT '0',
  1749. `status` enum('active','closed') NOT NULL DEFAULT 'active',
  1750. `order` mediumint(8) NOT NULL DEFAULT 0,
  1751. `displayCards` smallint(6) NOT NULL DEFAULT 0,
  1752. `showWIP` enum('0','1') NOT NULL DEFAULT '1',
  1753. `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
  1754. `colWidth` smallint(4) NOT NULL DEFAULT 264,
  1755. `minColWidth` smallint(4) NOT NULL DEFAULT 200,
  1756. `maxColWidth` smallint(4) NOT NULL DEFAULT 384,
  1757. `object` varchar(255) NOT NULL DEFAULT '',
  1758. `alignment` varchar(10) NOT NULL DEFAULT 'center',
  1759. `createdBy` char(30) NOT NULL DEFAULT '',
  1760. `createdDate` datetime DEFAULT NULL,
  1761. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  1762. `lastEditedDate` datetime DEFAULT NULL,
  1763. `closedBy` char(30) NOT NULL DEFAULT '',
  1764. `closedDate` datetime DEFAULT NULL,
  1765. `activatedBy` char(30) NOT NULL DEFAULT '',
  1766. `activatedDate` datetime DEFAULT NULL,
  1767. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1768. PRIMARY KEY (`id`)
  1769. ) ENGINE=InnoDB;
  1770. CREATE TABLE `zt_kanbancard` (
  1771. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1772. `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1773. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1774. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1775. `fromID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1776. `fromType` varchar(30) NOT NULL DEFAULT '',
  1777. `name` varchar(255) NOT NULL DEFAULT '',
  1778. `status` varchar(30) NOT NULL DEFAULT 'doing',
  1779. `pri` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1780. `assignedTo` text DEFAULT NULL,
  1781. `desc` mediumtext DEFAULT NULL,
  1782. `begin` date DEFAULT NULL,
  1783. `end` date DEFAULT NULL,
  1784. `estimate` float unsigned NOT NULL DEFAULT 0,
  1785. `progress` float unsigned NOT NULL DEFAULT 0,
  1786. `color` char(7) NOT NULL DEFAULT '',
  1787. `acl` char(30) NOT NULL DEFAULT 'open',
  1788. `whitelist` text DEFAULT NULL,
  1789. `order` mediumint(8) NOT NULL DEFAULT 0,
  1790. `archived` enum('0','1') NOT NULL DEFAULT '0',
  1791. `createdBy` char(30) NOT NULL DEFAULT '',
  1792. `createdDate` datetime DEFAULT NULL,
  1793. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  1794. `lastEditedDate` datetime DEFAULT NULL,
  1795. `archivedBy` char(30) NOT NULL DEFAULT '',
  1796. `archivedDate` datetime DEFAULT NULL,
  1797. `assignedBy` char(30) NOT NULL DEFAULT '',
  1798. `assignedDate` datetime DEFAULT NULL,
  1799. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1800. PRIMARY KEY (`id`)
  1801. ) ENGINE=InnoDB;
  1802. CREATE TABLE `zt_kanbancell` (
  1803. `id` int(8) NOT NULL AUTO_INCREMENT,
  1804. `kanban` mediumint(8) NOT NULL DEFAULT 0,
  1805. `lane` mediumint(8) NOT NULL DEFAULT 0,
  1806. `column` mediumint(8) NOT NULL DEFAULT 0,
  1807. `type` char(30) NOT NULL DEFAULT '',
  1808. `cards` text DEFAULT NULL,
  1809. PRIMARY KEY (`id`),
  1810. UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`)
  1811. ) ENGINE=InnoDB;
  1812. CREATE TABLE `zt_kanbancolumn` (
  1813. `id` int(8) NOT NULL AUTO_INCREMENT,
  1814. `parent` mediumint(8) NOT NULL DEFAULT 0,
  1815. `type` char(30) NOT NULL DEFAULT '',
  1816. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1817. `group` mediumint(8) NOT NULL DEFAULT 0,
  1818. `name` varchar(255) NOT NULL DEFAULT '',
  1819. `color` char(30) NOT NULL DEFAULT '',
  1820. `limit` smallint(6) NOT NULL DEFAULT -1,
  1821. `order` mediumint(8) NOT NULL DEFAULT 0,
  1822. `archived` enum('0','1') NOT NULL DEFAULT '0',
  1823. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1824. PRIMARY KEY (`id`)
  1825. ) ENGINE=InnoDB;
  1826. CREATE TABLE `zt_kanbangroup` (
  1827. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1828. `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1829. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1830. `order` smallint(6) NOT NULL DEFAULT 0,
  1831. PRIMARY KEY (`id`)
  1832. ) ENGINE=InnoDB;
  1833. CREATE TABLE `zt_kanbanlane` (
  1834. `id` int(8) NOT NULL AUTO_INCREMENT,
  1835. `execution` mediumint(8) NOT NULL DEFAULT 0,
  1836. `type` char(30) NOT NULL DEFAULT '',
  1837. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1838. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1839. `groupby` char(30) NOT NULL DEFAULT '',
  1840. `extra` char(30) NOT NULL DEFAULT '',
  1841. `name` varchar(255) NOT NULL DEFAULT '',
  1842. `color` char(30) NOT NULL DEFAULT '',
  1843. `order` smallint(6) NOT NULL DEFAULT 0,
  1844. `lastEditedTime` datetime DEFAULT NULL,
  1845. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1846. PRIMARY KEY (`id`)
  1847. ) ENGINE=InnoDB;
  1848. CREATE TABLE `zt_kanbanregion` (
  1849. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1850. `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1851. `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1852. `name` varchar(255) NOT NULL DEFAULT '',
  1853. `order` mediumint(8) NOT NULL DEFAULT 0,
  1854. `createdBy` char(30) NOT NULL DEFAULT '',
  1855. `createdDate` datetime DEFAULT NULL,
  1856. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  1857. `lastEditedDate` datetime DEFAULT NULL,
  1858. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1859. PRIMARY KEY (`id`)
  1860. ) ENGINE=InnoDB;
  1861. CREATE TABLE `zt_kanbanspace` (
  1862. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1863. `name` varchar(255) NOT NULL DEFAULT '',
  1864. `type` varchar(50) NOT NULL DEFAULT '',
  1865. `owner` varchar(30) NOT NULL DEFAULT '',
  1866. `team` text DEFAULT NULL,
  1867. `desc` mediumtext DEFAULT NULL,
  1868. `acl` char(30) NOT NULL DEFAULT 'open',
  1869. `whitelist` text DEFAULT NULL,
  1870. `status` enum('active','closed') NOT NULL DEFAULT 'active',
  1871. `order` mediumint(8) NOT NULL DEFAULT 0,
  1872. `createdBy` char(30) NOT NULL DEFAULT '',
  1873. `createdDate` datetime DEFAULT NULL,
  1874. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  1875. `lastEditedDate` datetime DEFAULT NULL,
  1876. `closedBy` char(30) NOT NULL DEFAULT '',
  1877. `closedDate` datetime DEFAULT NULL,
  1878. `activatedBy` char(30) NOT NULL DEFAULT '',
  1879. `activatedDate` datetime DEFAULT NULL,
  1880. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1881. PRIMARY KEY (`id`)
  1882. ) ENGINE=InnoDB;
  1883. CREATE TABLE `zt_lang` (
  1884. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1885. `lang` varchar(30) NOT NULL DEFAULT '',
  1886. `module` varchar(30) NOT NULL DEFAULT '',
  1887. `section` varchar(50) NOT NULL DEFAULT '',
  1888. `key` varchar(60) NOT NULL DEFAULT '',
  1889. `value` text DEFAULT NULL,
  1890. `system` enum('0','1') NOT NULL DEFAULT '1',
  1891. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  1892. PRIMARY KEY (`id`),
  1893. UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`)
  1894. ) ENGINE=InnoDB;
  1895. CREATE TABLE `zt_leave` (
  1896. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1897. `year` char(4) NOT NULL DEFAULT '',
  1898. `begin` date DEFAULT NULL,
  1899. `end` date DEFAULT NULL,
  1900. `start` time DEFAULT NULL,
  1901. `finish` time DEFAULT NULL,
  1902. `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
  1903. `backDate` datetime DEFAULT NULL,
  1904. `type` varchar(30) NOT NULL DEFAULT '',
  1905. `desc` text DEFAULT NULL,
  1906. `status` varchar(30) NOT NULL DEFAULT '',
  1907. `createdBy` char(30) NOT NULL DEFAULT '',
  1908. `createdDate` datetime DEFAULT NULL,
  1909. `reviewedBy` char(30) NOT NULL DEFAULT '',
  1910. `reviewedDate` datetime DEFAULT NULL,
  1911. `level` tinyint(3) NOT NULL DEFAULT 0,
  1912. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  1913. `reviewers` text DEFAULT NULL,
  1914. `backReviewers` text DEFAULT NULL,
  1915. PRIMARY KEY (`id`),
  1916. KEY `year` (`year`),
  1917. KEY `type` (`type`),
  1918. KEY `status` (`status`),
  1919. KEY `createdBy` (`createdBy`)
  1920. ) ENGINE=InnoDB;
  1921. CREATE TABLE `zt_lieu` (
  1922. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1923. `year` char(4) NOT NULL DEFAULT '',
  1924. `begin` date DEFAULT NULL,
  1925. `end` date DEFAULT NULL,
  1926. `start` time DEFAULT NULL,
  1927. `finish` time DEFAULT NULL,
  1928. `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
  1929. `overtime` char(255) NOT NULL DEFAULT '',
  1930. `trip` char(255) NOT NULL DEFAULT '',
  1931. `desc` text DEFAULT NULL,
  1932. `status` varchar(30) NOT NULL DEFAULT '',
  1933. `createdBy` char(30) NOT NULL DEFAULT '',
  1934. `createdDate` datetime DEFAULT NULL,
  1935. `reviewedBy` char(30) NOT NULL DEFAULT '',
  1936. `reviewedDate` datetime DEFAULT NULL,
  1937. `level` tinyint(3) NOT NULL DEFAULT 0,
  1938. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  1939. `reviewers` text DEFAULT NULL,
  1940. PRIMARY KEY (`id`),
  1941. KEY `year` (`year`),
  1942. KEY `status` (`status`),
  1943. KEY `createdBy` (`createdBy`)
  1944. ) ENGINE=InnoDB;
  1945. CREATE TABLE `zt_log` (
  1946. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1947. `objectType` varchar(30) NOT NULL DEFAULT '',
  1948. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1949. `action` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1950. `date` datetime DEFAULT NULL,
  1951. `url` varchar(255) NOT NULL DEFAULT '',
  1952. `contentType` varchar(30) NOT NULL DEFAULT '',
  1953. `data` text DEFAULT NULL,
  1954. `result` text DEFAULT NULL,
  1955. PRIMARY KEY (`id`),
  1956. KEY `objectType` (`objectType`),
  1957. KEY `obejctID` (`objectID`)
  1958. ) ENGINE=InnoDB;
  1959. CREATE TABLE `zt_market` (
  1960. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1961. `name` varchar(255) NOT NULL DEFAULT '',
  1962. `industry` char(255) NOT NULL DEFAULT '',
  1963. `scale` decimal(10,2) NOT NULL DEFAULT 0.00,
  1964. `maturity` char(255) NOT NULL DEFAULT '',
  1965. `speed` varchar(255) NOT NULL DEFAULT '',
  1966. `competition` char(255) NOT NULL DEFAULT '',
  1967. `strategy` varchar(255) NOT NULL DEFAULT '',
  1968. `ppm` varchar(20) NOT NULL DEFAULT '',
  1969. `desc` mediumtext DEFAULT NULL,
  1970. `openedBy` varchar(30) NOT NULL DEFAULT '',
  1971. `openedDate` datetime DEFAULT NULL,
  1972. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  1973. `lastEditedDate` datetime DEFAULT NULL,
  1974. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1975. PRIMARY KEY (`id`)
  1976. ) ENGINE=InnoDB;
  1977. CREATE TABLE `zt_marketreport` (
  1978. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1979. `name` varchar(255) NOT NULL DEFAULT '',
  1980. `market` mediumint(8) NOT NULL DEFAULT 0,
  1981. `research` mediumint(8) NOT NULL DEFAULT 0,
  1982. `maturity` varchar(30) NOT NULL DEFAULT '',
  1983. `owner` varchar(30) NOT NULL DEFAULT '',
  1984. `participants` char(255) NOT NULL DEFAULT '',
  1985. `source` varchar(30) NOT NULL DEFAULT '',
  1986. `desc` mediumtext DEFAULT NULL,
  1987. `status` varchar(20) NOT NULL DEFAULT '',
  1988. `openedBy` varchar(30) NOT NULL DEFAULT '',
  1989. `openedDate` datetime DEFAULT NULL,
  1990. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  1991. `lastEditedDate` datetime DEFAULT NULL,
  1992. `publishedBy` varchar(30) NOT NULL DEFAULT '',
  1993. `publishedDate` datetime DEFAULT NULL,
  1994. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1995. PRIMARY KEY (`id`)
  1996. ) ENGINE=InnoDB;
  1997. CREATE TABLE `zt_measqueue` (
  1998. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1999. `type` varchar(30) NOT NULL DEFAULT '',
  2000. `mid` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2001. `status` varchar(255) NOT NULL DEFAULT '',
  2002. `logs` text DEFAULT NULL,
  2003. `execTime` varchar(10) NOT NULL DEFAULT '',
  2004. `params` text DEFAULT NULL,
  2005. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2006. `createdDate` datetime DEFAULT NULL,
  2007. `updateDate` datetime DEFAULT NULL,
  2008. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2009. PRIMARY KEY (`id`)
  2010. ) ENGINE=InnoDB;
  2011. CREATE TABLE `zt_measrecords` (
  2012. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2013. `type` varchar(30) NOT NULL DEFAULT '',
  2014. `mid` mediumint(8) NOT NULL DEFAULT 0,
  2015. `measCode` char(50) NOT NULL DEFAULT '',
  2016. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2017. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2018. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2019. `params` text DEFAULT NULL,
  2020. `year` char(4) NOT NULL DEFAULT '',
  2021. `month` char(6) NOT NULL DEFAULT '',
  2022. `week` char(8) NOT NULL DEFAULT '',
  2023. `day` char(8) NOT NULL DEFAULT '',
  2024. `value` varchar(255) NOT NULL DEFAULT '',
  2025. `date` date DEFAULT NULL,
  2026. PRIMARY KEY (`id`),
  2027. UNIQUE KEY `time` (`year`,`month`,`day`,`week`),
  2028. KEY `product` (`product`),
  2029. KEY `project` (`project`)
  2030. ) ENGINE=InnoDB;
  2031. CREATE TABLE `zt_meastemplate` (
  2032. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2033. `model` char(30) NOT NULL DEFAULT '',
  2034. `name` varchar(255) NOT NULL DEFAULT '',
  2035. `content` mediumtext DEFAULT NULL,
  2036. `createdBy` char(30) NOT NULL DEFAULT '',
  2037. `createdDate` date DEFAULT NULL,
  2038. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2039. PRIMARY KEY (`id`)
  2040. ) ENGINE=InnoDB;
  2041. CREATE TABLE `zt_meeting` (
  2042. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2043. `project` mediumint(8) NOT NULL DEFAULT 0,
  2044. `execution` mediumint(8) NOT NULL DEFAULT 0,
  2045. `name` varchar(255) NOT NULL DEFAULT '',
  2046. `type` varchar(255) NOT NULL DEFAULT '',
  2047. `begin` time DEFAULT NULL,
  2048. `end` time DEFAULT NULL,
  2049. `dept` mediumint(8) NOT NULL DEFAULT 0,
  2050. `mode` varchar(255) NOT NULL DEFAULT '',
  2051. `host` varchar(30) NOT NULL DEFAULT '',
  2052. `participant` text DEFAULT NULL,
  2053. `date` date DEFAULT NULL,
  2054. `room` int(11) NOT NULL DEFAULT 0,
  2055. `minutes` text DEFAULT NULL,
  2056. `minutedBy` varchar(30) NOT NULL DEFAULT '',
  2057. `minutedDate` datetime DEFAULT NULL,
  2058. `objectType` varchar(30) NOT NULL DEFAULT '',
  2059. `objectID` mediumint(8) NOT NULL DEFAULT 0,
  2060. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2061. `createdDate` datetime DEFAULT NULL,
  2062. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2063. `editedDate` datetime DEFAULT NULL,
  2064. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2065. PRIMARY KEY (`id`)
  2066. ) ENGINE=InnoDB;
  2067. CREATE TABLE `zt_meetingroom` (
  2068. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2069. `name` varchar(255) NOT NULL DEFAULT '',
  2070. `position` varchar(30) NOT NULL DEFAULT '',
  2071. `seats` int(11) NOT NULL DEFAULT 0,
  2072. `equipment` varchar(255) NOT NULL DEFAULT '',
  2073. `openTime` varchar(255) NOT NULL DEFAULT '',
  2074. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2075. `createdDate` datetime DEFAULT NULL,
  2076. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2077. `editedDate` datetime DEFAULT NULL,
  2078. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2079. PRIMARY KEY (`id`)
  2080. ) ENGINE=InnoDB;
  2081. CREATE TABLE `zt_metric` (
  2082. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2083. `purpose` varchar(50) NOT NULL DEFAULT '',
  2084. `scope` char(30) NOT NULL DEFAULT '',
  2085. `object` char(30) NOT NULL DEFAULT '',
  2086. `stage` enum('wait','released') DEFAULT 'wait',
  2087. `type` enum('php','sql') DEFAULT 'php',
  2088. `name` varchar(90) NOT NULL DEFAULT '',
  2089. `code` varchar(90) NOT NULL DEFAULT '',
  2090. `unit` varchar(10) NOT NULL DEFAULT '',
  2091. `collector` text DEFAULT NULL,
  2092. `desc` text DEFAULT NULL,
  2093. `definition` text DEFAULT NULL,
  2094. `when` varchar(30) NOT NULL DEFAULT '',
  2095. `event` varchar(30) NOT NULL DEFAULT '',
  2096. `cronCFG` varchar(30) NOT NULL DEFAULT '',
  2097. `time` varchar(30) NOT NULL DEFAULT '',
  2098. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2099. `createdDate` datetime DEFAULT NULL,
  2100. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2101. `editedDate` datetime DEFAULT NULL,
  2102. `implementedBy` varchar(30) NOT NULL DEFAULT '',
  2103. `implementedDate` datetime DEFAULT NULL,
  2104. `delistedBy` varchar(30) NOT NULL DEFAULT '',
  2105. `delistedDate` datetime DEFAULT NULL,
  2106. `builtin` enum('0','1') NOT NULL DEFAULT '0',
  2107. `fromID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2108. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2109. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2110. PRIMARY KEY (`id`),
  2111. UNIQUE KEY `code` (`code`)
  2112. ) ENGINE=InnoDB;
  2113. CREATE TABLE `zt_metriclib` (
  2114. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2115. `metricID` mediumint(9) NOT NULL DEFAULT 0,
  2116. `metricCode` varchar(100) NOT NULL DEFAULT '',
  2117. `system` char(30) NOT NULL DEFAULT '0',
  2118. `program` char(30) NOT NULL DEFAULT '',
  2119. `project` char(30) NOT NULL DEFAULT '',
  2120. `product` char(30) NOT NULL DEFAULT '',
  2121. `execution` char(30) NOT NULL DEFAULT '',
  2122. `user` text DEFAULT NULL,
  2123. `dept` char(30) NOT NULL DEFAULT '',
  2124. `year` char(4) NOT NULL DEFAULT '0',
  2125. `month` char(2) NOT NULL DEFAULT '0',
  2126. `week` char(2) NOT NULL DEFAULT '0',
  2127. `day` char(2) NOT NULL DEFAULT '0',
  2128. `value` varchar(100) NOT NULL DEFAULT '0',
  2129. `date` datetime DEFAULT NULL,
  2130. PRIMARY KEY (`id`)
  2131. ) ENGINE=InnoDB;
  2132. CREATE TABLE `zt_module` (
  2133. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2134. `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2135. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2136. `name` char(60) NOT NULL DEFAULT '',
  2137. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2138. `path` char(255) NOT NULL DEFAULT '',
  2139. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  2140. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  2141. `type` char(30) NOT NULL DEFAULT '',
  2142. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2143. `owner` varchar(30) NOT NULL DEFAULT '',
  2144. `collector` text DEFAULT NULL,
  2145. `short` varchar(30) NOT NULL DEFAULT '',
  2146. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2147. PRIMARY KEY (`id`),
  2148. KEY `root` (`root`),
  2149. KEY `type` (`type`),
  2150. KEY `path` (`path`)
  2151. ) ENGINE=InnoDB;
  2152. CREATE TABLE `zt_mr` (
  2153. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2154. `hostID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2155. `sourceProject` varchar(50) NOT NULL DEFAULT '',
  2156. `sourceBranch` varchar(100) NOT NULL DEFAULT '',
  2157. `targetProject` varchar(50) NOT NULL DEFAULT '',
  2158. `targetBranch` varchar(100) NOT NULL DEFAULT '',
  2159. `mriid` int(10) unsigned NOT NULL DEFAULT 0,
  2160. `title` varchar(255) NOT NULL DEFAULT '',
  2161. `description` text DEFAULT NULL,
  2162. `assignee` varchar(255) NOT NULL DEFAULT '',
  2163. `reviewer` varchar(255) NOT NULL DEFAULT '',
  2164. `approver` varchar(255) NOT NULL DEFAULT '',
  2165. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2166. `createdDate` datetime DEFAULT NULL,
  2167. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2168. `editedDate` datetime DEFAULT NULL,
  2169. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2170. `status` char(30) NOT NULL DEFAULT '',
  2171. `mergeStatus` char(30) NOT NULL DEFAULT '',
  2172. `approvalStatus` char(30) NOT NULL DEFAULT '',
  2173. `needApproved` enum('0','1') NOT NULL DEFAULT '0',
  2174. `needCI` enum('0','1') NOT NULL DEFAULT '0',
  2175. `repoID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2176. `jobID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2177. `compileID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2178. `compileStatus` char(30) NOT NULL DEFAULT '',
  2179. `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0',
  2180. `squash` enum('0','1') NOT NULL DEFAULT '0',
  2181. `synced` enum('0','1') NOT NULL DEFAULT '1',
  2182. `syncError` varchar(255) NOT NULL DEFAULT '',
  2183. `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0',
  2184. `diffs` longtext DEFAULT NULL,
  2185. PRIMARY KEY (`id`)
  2186. ) ENGINE=InnoDB;
  2187. CREATE TABLE `zt_mrapproval` (
  2188. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2189. `mrID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2190. `account` varchar(255) NOT NULL DEFAULT '',
  2191. `date` datetime DEFAULT NULL,
  2192. `action` char(30) NOT NULL DEFAULT '',
  2193. `comment` text DEFAULT NULL,
  2194. PRIMARY KEY (`id`)
  2195. ) ENGINE=InnoDB;
  2196. CREATE TABLE `zt_nc` (
  2197. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2198. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2199. `auditplan` mediumint(8) NOT NULL DEFAULT 0,
  2200. `listID` mediumint(8) NOT NULL DEFAULT 0,
  2201. `title` varchar(255) NOT NULL DEFAULT '',
  2202. `desc` mediumtext DEFAULT NULL,
  2203. `type` char(30) NOT NULL DEFAULT '',
  2204. `status` varchar(30) NOT NULL DEFAULT 'active',
  2205. `severity` char(30) NOT NULL DEFAULT '',
  2206. `deadline` date DEFAULT NULL,
  2207. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  2208. `resolution` char(30) NOT NULL DEFAULT '',
  2209. `resolvedDate` date DEFAULT NULL,
  2210. `closedBy` varchar(30) NOT NULL DEFAULT '',
  2211. `closedDate` date DEFAULT NULL,
  2212. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2213. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2214. `assignedDate` date DEFAULT NULL,
  2215. `activateDate` date DEFAULT NULL,
  2216. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2217. `createdDate` datetime DEFAULT NULL,
  2218. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2219. `editedDate` datetime DEFAULT NULL,
  2220. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2221. PRIMARY KEY (`id`)
  2222. ) ENGINE=InnoDB;
  2223. CREATE TABLE `zt_notify` (
  2224. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2225. `objectType` varchar(50) NOT NULL DEFAULT '',
  2226. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2227. `action` mediumint(9) NOT NULL DEFAULT 0,
  2228. `toList` text DEFAULT NULL,
  2229. `ccList` text DEFAULT NULL,
  2230. `subject` text DEFAULT NULL,
  2231. `data` text DEFAULT NULL,
  2232. `createdBy` char(30) NOT NULL DEFAULT '',
  2233. `createdDate` datetime DEFAULT NULL,
  2234. `sendTime` datetime DEFAULT NULL,
  2235. `status` varchar(10) NOT NULL DEFAULT 'wait',
  2236. `failReason` text DEFAULT NULL,
  2237. PRIMARY KEY (`id`),
  2238. KEY `objectType` (`objectType`),
  2239. KEY `status` (`status`)
  2240. ) ENGINE=InnoDB;
  2241. CREATE TABLE `zt_oauth` (
  2242. `account` varchar(30) NOT NULL DEFAULT '',
  2243. `openID` varchar(255) NOT NULL DEFAULT '',
  2244. `providerType` varchar(30) NOT NULL DEFAULT '',
  2245. `providerID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2246. KEY `account` (`account`),
  2247. KEY `providerType` (`providerType`),
  2248. KEY `providerID` (`providerID`)
  2249. ) ENGINE=InnoDB;
  2250. CREATE TABLE `zt_object` (
  2251. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2252. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2253. `product` mediumint(8) NOT NULL DEFAULT 0,
  2254. `from` mediumint(8) NOT NULL DEFAULT 0,
  2255. `title` varchar(255) NOT NULL DEFAULT '',
  2256. `category` char(30) NOT NULL DEFAULT '',
  2257. `version` varchar(255) NOT NULL DEFAULT '',
  2258. `type` enum('reviewed','taged') NOT NULL DEFAULT 'reviewed',
  2259. `range` text DEFAULT NULL,
  2260. `data` text DEFAULT NULL,
  2261. `storyEst` char(30) NOT NULL DEFAULT '',
  2262. `taskEst` char(30) NOT NULL DEFAULT '',
  2263. `requestEst` char(30) NOT NULL DEFAULT '',
  2264. `testEst` char(30) NOT NULL DEFAULT '',
  2265. `devEst` char(30) NOT NULL DEFAULT '',
  2266. `designEst` char(30) NOT NULL DEFAULT '',
  2267. `end` date DEFAULT NULL,
  2268. `createdBy` char(30) NOT NULL DEFAULT '',
  2269. `createdDate` date DEFAULT NULL,
  2270. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2271. PRIMARY KEY (`id`)
  2272. ) ENGINE=InnoDB;
  2273. CREATE TABLE `zt_opportunity` (
  2274. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2275. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2276. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2277. `name` varchar(255) NOT NULL DEFAULT '',
  2278. `source` char(30) NOT NULL DEFAULT '',
  2279. `type` char(30) NOT NULL DEFAULT '',
  2280. `strategy` char(30) NOT NULL DEFAULT '',
  2281. `status` varchar(30) NOT NULL DEFAULT 'active',
  2282. `impact` mediumint(8) NOT NULL DEFAULT 0,
  2283. `chance` mediumint(8) NOT NULL DEFAULT 0,
  2284. `ratio` mediumint(8) NOT NULL DEFAULT 0,
  2285. `pri` char(30) NOT NULL DEFAULT '',
  2286. `identifiedDate` date DEFAULT NULL,
  2287. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2288. `assignedDate` date DEFAULT NULL,
  2289. `approvedDate` date DEFAULT NULL,
  2290. `prevention` mediumtext DEFAULT NULL,
  2291. `plannedClosedDate` date DEFAULT NULL,
  2292. `actualClosedDate` date DEFAULT NULL,
  2293. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2294. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2295. `version` smallint(6) NOT NULL DEFAULT 1,
  2296. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2297. `createdDate` datetime DEFAULT NULL,
  2298. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2299. `editedDate` datetime DEFAULT NULL,
  2300. `activatedBy` varchar(30) NOT NULL DEFAULT '',
  2301. `activatedDate` datetime DEFAULT NULL,
  2302. `closedBy` varchar(30) NOT NULL DEFAULT '',
  2303. `closedDate` datetime DEFAULT NULL,
  2304. `canceledBy` varchar(30) NOT NULL DEFAULT '',
  2305. `canceledDate` datetime DEFAULT NULL,
  2306. `cancelReason` char(30) NOT NULL DEFAULT '',
  2307. `hangupedBy` varchar(30) NOT NULL DEFAULT '',
  2308. `hangupedDate` datetime DEFAULT NULL,
  2309. `resolution` mediumtext DEFAULT NULL,
  2310. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  2311. `resolvedDate` datetime DEFAULT NULL,
  2312. `lastCheckedBy` varchar(30) NOT NULL DEFAULT '',
  2313. `lastCheckedDate` datetime DEFAULT NULL,
  2314. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2315. PRIMARY KEY (`id`)
  2316. ) ENGINE=InnoDB;
  2317. CREATE TABLE `zt_overtime` (
  2318. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2319. `year` char(4) NOT NULL DEFAULT '',
  2320. `begin` date DEFAULT NULL,
  2321. `end` date DEFAULT NULL,
  2322. `start` time DEFAULT NULL,
  2323. `finish` time DEFAULT NULL,
  2324. `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
  2325. `leave` varchar(255) NOT NULL DEFAULT '',
  2326. `type` varchar(30) NOT NULL DEFAULT '',
  2327. `desc` text DEFAULT NULL,
  2328. `status` varchar(30) NOT NULL DEFAULT '',
  2329. `rejectReason` varchar(100) NOT NULL DEFAULT '',
  2330. `createdBy` char(30) NOT NULL DEFAULT '',
  2331. `createdDate` datetime DEFAULT NULL,
  2332. `reviewedBy` char(30) NOT NULL DEFAULT '',
  2333. `reviewedDate` datetime DEFAULT NULL,
  2334. `level` tinyint(3) NOT NULL DEFAULT 0,
  2335. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2336. `reviewers` text DEFAULT NULL,
  2337. PRIMARY KEY (`id`),
  2338. KEY `year` (`year`),
  2339. KEY `type` (`type`),
  2340. KEY `status` (`status`),
  2341. KEY `createdBy` (`createdBy`)
  2342. ) ENGINE=InnoDB;
  2343. CREATE TABLE `zt_pipeline` (
  2344. `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
  2345. `type` char(30) NOT NULL DEFAULT '',
  2346. `name` varchar(50) NOT NULL DEFAULT '',
  2347. `url` varchar(255) DEFAULT NULL,
  2348. `account` varchar(30) DEFAULT NULL,
  2349. `password` varchar(255) DEFAULT NULL,
  2350. `token` varchar(255) DEFAULT NULL,
  2351. `private` char(32) DEFAULT NULL,
  2352. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2353. `createdDate` datetime DEFAULT NULL,
  2354. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2355. `editedDate` datetime DEFAULT NULL,
  2356. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2357. PRIMARY KEY (`id`)
  2358. ) ENGINE=InnoDB;
  2359. CREATE TABLE `zt_pivot` (
  2360. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2361. `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2362. `group` varchar(255) NOT NULL DEFAULT '',
  2363. `name` text DEFAULT NULL,
  2364. `desc` text DEFAULT NULL,
  2365. `sql` mediumtext DEFAULT NULL,
  2366. `fields` mediumtext DEFAULT NULL,
  2367. `langs` mediumtext DEFAULT NULL,
  2368. `vars` mediumtext DEFAULT NULL,
  2369. `objects` mediumtext DEFAULT NULL,
  2370. `settings` mediumtext DEFAULT NULL,
  2371. `filters` mediumtext DEFAULT NULL,
  2372. `step` tinyint(1) unsigned NOT NULL DEFAULT 0,
  2373. `stage` enum('draft','published') NOT NULL DEFAULT 'draft',
  2374. `builtin` enum('0','1') NOT NULL DEFAULT '0',
  2375. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2376. `createdDate` datetime DEFAULT NULL,
  2377. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2378. `editedDate` datetime DEFAULT NULL,
  2379. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2380. PRIMARY KEY (`id`),
  2381. KEY `dimension` (`dimension`),
  2382. KEY `group` (`group`)
  2383. ) ENGINE=InnoDB;
  2384. CREATE TABLE `zt_planstory` (
  2385. `plan` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2386. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2387. `order` mediumint(9) NOT NULL DEFAULT 0,
  2388. UNIQUE KEY `plan_story` (`plan`,`story`)
  2389. ) ENGINE=InnoDB;
  2390. CREATE TABLE `zt_practice` (
  2391. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2392. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2393. `code` char(50) NOT NULL DEFAULT '',
  2394. `title` varchar(255) NOT NULL DEFAULT '',
  2395. `labels` varchar(255) NOT NULL DEFAULT '',
  2396. `summary` varchar(255) NOT NULL DEFAULT '',
  2397. `content` text DEFAULT NULL,
  2398. `contributor` varchar(255) NOT NULL DEFAULT '',
  2399. PRIMARY KEY (`id`),
  2400. UNIQUE KEY `code` (`code`)
  2401. ) ENGINE=InnoDB;
  2402. CREATE TABLE `zt_priv` (
  2403. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2404. `module` varchar(30) NOT NULL DEFAULT '',
  2405. `method` varchar(30) NOT NULL DEFAULT '',
  2406. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2407. `edition` varchar(30) NOT NULL DEFAULT ',open,biz,max,',
  2408. `vision` varchar(30) NOT NULL DEFAULT ',rnd,',
  2409. `system` enum('0','1') NOT NULL DEFAULT '0',
  2410. `order` mediumint(8) NOT NULL DEFAULT 0,
  2411. PRIMARY KEY (`id`),
  2412. UNIQUE KEY `priv` (`module`,`method`)
  2413. ) ENGINE=InnoDB;
  2414. CREATE TABLE `zt_privlang` (
  2415. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2416. `objectType` enum('priv','manager') NOT NULL DEFAULT 'priv',
  2417. `lang` varchar(30) NOT NULL DEFAULT '',
  2418. `key` varchar(100) NOT NULL DEFAULT '',
  2419. `value` varchar(255) NOT NULL DEFAULT '',
  2420. `desc` text DEFAULT NULL,
  2421. UNIQUE KEY `objectlang` (`objectID`,`objectType`,`lang`)
  2422. ) ENGINE=InnoDB;
  2423. CREATE TABLE `zt_privmanager` (
  2424. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2425. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2426. `code` varchar(100) NOT NULL DEFAULT '',
  2427. `type` enum('view','module','package') NOT NULL DEFAULT 'package',
  2428. `edition` varchar(30) NOT NULL DEFAULT ',open,biz,max,',
  2429. `vision` varchar(30) NOT NULL DEFAULT ',rnd,',
  2430. `order` mediumint(8) NOT NULL DEFAULT 0,
  2431. PRIMARY KEY (`id`)
  2432. ) ENGINE=InnoDB;
  2433. CREATE TABLE `zt_privrelation` (
  2434. `priv` varchar(100) NOT NULL DEFAULT '',
  2435. `type` varchar(30) NOT NULL DEFAULT '',
  2436. `relationPriv` varchar(100) NOT NULL DEFAULT '',
  2437. UNIQUE KEY `privrelation` (`priv`,`type`,`relationPriv`)
  2438. ) ENGINE=InnoDB;
  2439. CREATE TABLE `zt_process` (
  2440. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2441. `model` char(30) NOT NULL DEFAULT 'waterfall',
  2442. `name` varchar(255) NOT NULL DEFAULT '',
  2443. `type` char(30) NOT NULL DEFAULT '',
  2444. `abbr` char(30) NOT NULL DEFAULT '',
  2445. `desc` mediumtext DEFAULT NULL,
  2446. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2447. `status` varchar(30) NOT NULL DEFAULT '',
  2448. `order` mediumint(9) NOT NULL DEFAULT 0,
  2449. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2450. `createdDate` datetime DEFAULT NULL,
  2451. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2452. `editedDate` datetime DEFAULT NULL,
  2453. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  2454. `assignedDate` datetime DEFAULT NULL,
  2455. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2456. PRIMARY KEY (`id`)
  2457. ) ENGINE=InnoDB;
  2458. CREATE TABLE `zt_product` (
  2459. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2460. `program` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2461. `name` varchar(110) NOT NULL DEFAULT '',
  2462. `code` varchar(45) NOT NULL DEFAULT '',
  2463. `shadow` tinyint(1) unsigned NOT NULL DEFAULT 0,
  2464. `bind` enum('0','1') NOT NULL DEFAULT '0',
  2465. `line` mediumint(8) NOT NULL DEFAULT 0,
  2466. `type` varchar(30) NOT NULL DEFAULT 'normal',
  2467. `status` varchar(30) NOT NULL DEFAULT '',
  2468. `subStatus` varchar(30) NOT NULL DEFAULT '',
  2469. `desc` mediumtext DEFAULT NULL,
  2470. `PO` varchar(30) NOT NULL DEFAULT '',
  2471. `QD` varchar(30) NOT NULL DEFAULT '',
  2472. `RD` varchar(30) NOT NULL DEFAULT '',
  2473. `feedback` varchar(30) NOT NULL DEFAULT '',
  2474. `ticket` varchar(30) NOT NULL DEFAULT '',
  2475. `acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
  2476. `whitelist` text DEFAULT NULL,
  2477. `reviewer` text DEFAULT NULL,
  2478. `PMT` text DEFAULT NULL,
  2479. `draftStories` mediumint(8) NOT NULL DEFAULT 0,
  2480. `activeStories` mediumint(8) NOT NULL DEFAULT 0,
  2481. `changingStories` mediumint(8) NOT NULL DEFAULT 0,
  2482. `reviewingStories` mediumint(8) NOT NULL DEFAULT 0,
  2483. `finishedStories` mediumint(9) NOT NULL DEFAULT 0,
  2484. `closedStories` mediumint(8) NOT NULL DEFAULT 0,
  2485. `totalStories` mediumint(8) NOT NULL DEFAULT 0,
  2486. `unresolvedBugs` mediumint(8) NOT NULL DEFAULT 0,
  2487. `closedBugs` mediumint(8) NOT NULL DEFAULT 0,
  2488. `fixedBugs` mediumint(8) NOT NULL DEFAULT 0,
  2489. `totalBugs` mediumint(8) NOT NULL DEFAULT 0,
  2490. `plans` mediumint(8) NOT NULL DEFAULT 0,
  2491. `releases` mediumint(8) NOT NULL DEFAULT 0,
  2492. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2493. `createdDate` datetime DEFAULT NULL,
  2494. `createdVersion` varchar(20) NOT NULL DEFAULT '',
  2495. `closedDate` date DEFAULT NULL,
  2496. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2497. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  2498. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2499. PRIMARY KEY (`id`),
  2500. KEY `acl` (`acl`),
  2501. KEY `order` (`order`)
  2502. ) ENGINE=InnoDB;
  2503. CREATE TABLE `zt_productplan` (
  2504. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2505. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2506. `branch` varchar(255) NOT NULL DEFAULT '0',
  2507. `parent` mediumint(9) NOT NULL DEFAULT 0,
  2508. `title` varchar(90) NOT NULL DEFAULT '',
  2509. `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
  2510. `desc` mediumtext DEFAULT NULL,
  2511. `begin` date DEFAULT NULL,
  2512. `end` date DEFAULT NULL,
  2513. `finishedDate` datetime DEFAULT NULL,
  2514. `closedDate` datetime DEFAULT NULL,
  2515. `order` text DEFAULT NULL,
  2516. `closedReason` varchar(20) NOT NULL DEFAULT '',
  2517. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2518. `createdDate` datetime DEFAULT NULL,
  2519. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2520. PRIMARY KEY (`id`),
  2521. KEY `product` (`product`),
  2522. KEY `end` (`end`)
  2523. ) ENGINE=InnoDB;
  2524. CREATE TABLE `zt_programactivity` (
  2525. `id` int(8) NOT NULL AUTO_INCREMENT,
  2526. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2527. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2528. `process` mediumint(8) NOT NULL DEFAULT 0,
  2529. `activity` mediumint(8) NOT NULL DEFAULT 0,
  2530. `name` varchar(255) NOT NULL DEFAULT '',
  2531. `content` text DEFAULT NULL,
  2532. `reason` varchar(255) NOT NULL DEFAULT '',
  2533. `result` char(30) NOT NULL DEFAULT '',
  2534. `linkedBy` char(30) NOT NULL DEFAULT '',
  2535. `createdBy` char(30) NOT NULL DEFAULT '',
  2536. `createdDate` date DEFAULT NULL,
  2537. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2538. PRIMARY KEY (`id`)
  2539. ) ENGINE=InnoDB;
  2540. CREATE TABLE `zt_programoutput` (
  2541. `id` int(8) NOT NULL AUTO_INCREMENT,
  2542. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2543. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2544. `process` mediumint(8) NOT NULL DEFAULT 0,
  2545. `activity` mediumint(8) NOT NULL DEFAULT 0,
  2546. `output` mediumint(8) NOT NULL DEFAULT 0,
  2547. `content` text DEFAULT NULL,
  2548. `name` varchar(255) NOT NULL DEFAULT '',
  2549. `reason` varchar(255) NOT NULL DEFAULT '',
  2550. `result` char(30) NOT NULL DEFAULT '',
  2551. `linkedBy` char(30) NOT NULL DEFAULT '',
  2552. `createdBy` char(30) NOT NULL DEFAULT '',
  2553. `createdDate` date DEFAULT NULL,
  2554. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2555. PRIMARY KEY (`id`)
  2556. ) ENGINE=InnoDB;
  2557. CREATE TABLE `zt_programprocess` (
  2558. `id` int(8) NOT NULL AUTO_INCREMENT,
  2559. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2560. `process` mediumint(8) NOT NULL DEFAULT 0,
  2561. `name` varchar(255) NOT NULL DEFAULT '',
  2562. `type` char(30) NOT NULL DEFAULT '',
  2563. `abbr` char(30) NOT NULL DEFAULT '',
  2564. `desc` text DEFAULT NULL,
  2565. `reason` varchar(255) NOT NULL DEFAULT '',
  2566. `linkedBy` char(30) NOT NULL DEFAULT '',
  2567. `createdBy` char(30) NOT NULL DEFAULT '',
  2568. `createdDate` date DEFAULT NULL,
  2569. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2570. PRIMARY KEY (`id`)
  2571. ) ENGINE=InnoDB;
  2572. CREATE TABLE `zt_programreport` (
  2573. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2574. `template` mediumint(8) NOT NULL DEFAULT 0,
  2575. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2576. `name` varchar(255) NOT NULL DEFAULT '',
  2577. `params` text DEFAULT NULL,
  2578. `content` text DEFAULT NULL,
  2579. `createdBy` char(30) NOT NULL DEFAULT '',
  2580. `createdDate` date DEFAULT NULL,
  2581. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2582. PRIMARY KEY (`id`)
  2583. ) ENGINE=InnoDB;
  2584. CREATE TABLE `zt_project` (
  2585. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2586. `project` mediumint(8) NOT NULL DEFAULT 0,
  2587. `charter` mediumint(8) NOT NULL DEFAULT 0,
  2588. `model` char(30) NOT NULL DEFAULT '',
  2589. `type` char(30) NOT NULL DEFAULT 'sprint',
  2590. `category` char(30) NOT NULL DEFAULT '',
  2591. `lifetime` char(30) NOT NULL DEFAULT '',
  2592. `budget` varchar(30) NOT NULL DEFAULT '0',
  2593. `budgetUnit` char(30) NOT NULL DEFAULT 'CNY',
  2594. `attribute` varchar(30) NOT NULL DEFAULT '',
  2595. `percent` float unsigned NOT NULL DEFAULT 0,
  2596. `milestone` enum('0','1') NOT NULL DEFAULT '0',
  2597. `output` text DEFAULT NULL,
  2598. `auth` char(30) NOT NULL DEFAULT '',
  2599. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2600. `path` varchar(255) NOT NULL DEFAULT '',
  2601. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  2602. `name` varchar(90) NOT NULL DEFAULT '',
  2603. `code` varchar(45) NOT NULL DEFAULT '',
  2604. `hasProduct` tinyint(1) unsigned NOT NULL DEFAULT 1,
  2605. `begin` date DEFAULT NULL,
  2606. `end` date DEFAULT NULL,
  2607. `firstEnd` date DEFAULT NULL,
  2608. `realBegan` date DEFAULT NULL,
  2609. `realEnd` date DEFAULT NULL,
  2610. `days` smallint(5) unsigned NOT NULL DEFAULT 0,
  2611. `status` varchar(10) NOT NULL DEFAULT '',
  2612. `subStatus` varchar(30) NOT NULL DEFAULT '',
  2613. `pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
  2614. `desc` mediumtext DEFAULT NULL,
  2615. `version` smallint(6) NOT NULL DEFAULT 0,
  2616. `parentVersion` smallint(6) NOT NULL DEFAULT 0,
  2617. `planDuration` int(11) NOT NULL DEFAULT 0,
  2618. `realDuration` int(11) NOT NULL DEFAULT 0,
  2619. `progress` decimal(5,2) NOT NULL DEFAULT 0.00,
  2620. `estimate` float NOT NULL DEFAULT 0,
  2621. `left` float NOT NULL DEFAULT 0,
  2622. `consumed` float NOT NULL DEFAULT 0,
  2623. `teamCount` int(11) NOT NULL DEFAULT 0,
  2624. `market` mediumint(8) NOT NULL DEFAULT 0,
  2625. `openedBy` varchar(30) NOT NULL DEFAULT '',
  2626. `openedDate` datetime DEFAULT NULL,
  2627. `openedVersion` varchar(20) NOT NULL DEFAULT '',
  2628. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  2629. `lastEditedDate` datetime DEFAULT NULL,
  2630. `closedBy` varchar(30) NOT NULL DEFAULT '',
  2631. `closedDate` datetime DEFAULT NULL,
  2632. `closedReason` varchar(20) NOT NULL DEFAULT '',
  2633. `canceledBy` varchar(30) NOT NULL DEFAULT '',
  2634. `canceledDate` datetime DEFAULT NULL,
  2635. `suspendedDate` date DEFAULT NULL,
  2636. `PO` varchar(30) NOT NULL DEFAULT '',
  2637. `PM` varchar(30) NOT NULL DEFAULT '',
  2638. `QD` varchar(30) NOT NULL DEFAULT '',
  2639. `RD` varchar(30) NOT NULL DEFAULT '',
  2640. `team` varchar(90) NOT NULL DEFAULT '',
  2641. `acl` char(30) NOT NULL DEFAULT 'open',
  2642. `whitelist` text DEFAULT NULL,
  2643. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2644. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  2645. `division` enum('0','1') NOT NULL DEFAULT '1',
  2646. `displayCards` smallint(6) NOT NULL DEFAULT 0,
  2647. `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
  2648. `multiple` enum('0','1') NOT NULL DEFAULT '1',
  2649. `colWidth` smallint(4) NOT NULL DEFAULT 264,
  2650. `minColWidth` smallint(4) NOT NULL DEFAULT 200,
  2651. `maxColWidth` smallint(4) NOT NULL DEFAULT 384,
  2652. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2653. PRIMARY KEY (`id`),
  2654. KEY `parent` (`parent`),
  2655. KEY `begin` (`begin`),
  2656. KEY `end` (`end`),
  2657. KEY `status` (`status`),
  2658. KEY `acl` (`acl`),
  2659. KEY `order` (`order`),
  2660. KEY `project` (`project`),
  2661. KEY `type_order` (`type`,`order`)
  2662. ) ENGINE=InnoDB;
  2663. CREATE TABLE `zt_projectadmin` (
  2664. `group` smallint(6) NOT NULL DEFAULT 0,
  2665. `account` char(30) NOT NULL DEFAULT '',
  2666. `programs` text DEFAULT NULL,
  2667. `projects` text DEFAULT NULL,
  2668. `products` text DEFAULT NULL,
  2669. `executions` text DEFAULT NULL,
  2670. UNIQUE KEY `group_account` (`group`,`account`)
  2671. ) ENGINE=InnoDB;
  2672. CREATE TABLE `zt_projectcase` (
  2673. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2674. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2675. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2676. `count` mediumint(8) unsigned NOT NULL DEFAULT 1,
  2677. `version` smallint(6) NOT NULL DEFAULT 1,
  2678. `order` smallint(6) unsigned NOT NULL DEFAULT 0,
  2679. UNIQUE KEY `project` (`project`,`case`)
  2680. ) ENGINE=InnoDB;
  2681. CREATE TABLE `zt_projectproduct` (
  2682. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2683. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2684. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2685. `plan` varchar(255) NOT NULL DEFAULT '',
  2686. PRIMARY KEY (`project`,`product`,`branch`)
  2687. ) ENGINE=InnoDB;
  2688. CREATE TABLE `zt_projectspec` (
  2689. `project` mediumint(8) NOT NULL DEFAULT 0,
  2690. `version` smallint(6) NOT NULL DEFAULT 0,
  2691. `name` varchar(255) NOT NULL DEFAULT '',
  2692. `milestone` enum('0','1') NOT NULL DEFAULT '0',
  2693. `begin` date DEFAULT NULL,
  2694. `end` date DEFAULT NULL,
  2695. UNIQUE KEY `project` (`project`,`version`)
  2696. ) ENGINE=InnoDB;
  2697. CREATE TABLE `zt_projectstory` (
  2698. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2699. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2700. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2701. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2702. `version` smallint(6) NOT NULL DEFAULT 1,
  2703. `order` smallint(6) unsigned NOT NULL DEFAULT 0,
  2704. UNIQUE KEY `project` (`project`,`story`),
  2705. KEY `story` (`story`)
  2706. ) ENGINE=InnoDB;
  2707. CREATE TABLE `zt_prompt` (
  2708. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2709. `name` varchar(20) NOT NULL,
  2710. `desc` text DEFAULT NULL,
  2711. `model` mediumint(8) unsigned DEFAULT NULL,
  2712. `module` varchar(30) DEFAULT NULL,
  2713. `source` text DEFAULT NULL,
  2714. `targetForm` varchar(30) DEFAULT NULL,
  2715. `purpose` text DEFAULT NULL,
  2716. `elaboration` text DEFAULT NULL,
  2717. `role` text DEFAULT NULL,
  2718. `characterization` text DEFAULT NULL,
  2719. `status` enum('draft','active') NOT NULL DEFAULT 'draft',
  2720. `createdBy` varchar(30) NOT NULL,
  2721. `createdDate` datetime NOT NULL,
  2722. `editedBy` varchar(30) DEFAULT NULL,
  2723. `editedDate` datetime DEFAULT NULL,
  2724. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2725. PRIMARY KEY (`id`)
  2726. ) ENGINE=InnoDB;
  2727. CREATE TABLE `zt_promptrole` (
  2728. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2729. `name` varchar(30) DEFAULT NULL,
  2730. `desc` text DEFAULT NULL,
  2731. `model` mediumint(8) unsigned DEFAULT NULL,
  2732. `role` text DEFAULT NULL,
  2733. `characterization` text DEFAULT NULL,
  2734. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2735. PRIMARY KEY (`id`)
  2736. ) ENGINE=InnoDB;
  2737. CREATE TABLE `zt_relation` (
  2738. `id` int(8) NOT NULL AUTO_INCREMENT,
  2739. `project` mediumint(8) NOT NULL DEFAULT 0,
  2740. `product` mediumint(8) NOT NULL DEFAULT 0,
  2741. `execution` mediumint(8) NOT NULL DEFAULT 0,
  2742. `AType` char(30) NOT NULL DEFAULT '',
  2743. `AID` mediumint(8) NOT NULL DEFAULT 0,
  2744. `AVersion` char(30) NOT NULL DEFAULT '',
  2745. `relation` char(30) NOT NULL DEFAULT '',
  2746. `BType` char(30) NOT NULL DEFAULT '',
  2747. `BID` mediumint(8) NOT NULL DEFAULT 0,
  2748. `BVersion` char(30) NOT NULL DEFAULT '',
  2749. `extra` char(30) NOT NULL DEFAULT '',
  2750. PRIMARY KEY (`id`),
  2751. UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`)
  2752. ) ENGINE=InnoDB;
  2753. CREATE TABLE `zt_relationoftasks` (
  2754. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2755. `execution` mediumint(8) unsigned NOT NULL,
  2756. `pretask` mediumint(8) unsigned NOT NULL,
  2757. `condition` enum('begin','end') NOT NULL,
  2758. `task` mediumint(8) unsigned NOT NULL,
  2759. `action` enum('begin','end') NOT NULL,
  2760. PRIMARY KEY (`id`),
  2761. UNIQUE KEY `relationoftasks` (`execution`,`task`)
  2762. ) ENGINE=InnoDB;
  2763. CREATE TABLE `zt_release` (
  2764. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2765. `project` varchar(255) NOT NULL DEFAULT '0',
  2766. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2767. `branch` varchar(255) NOT NULL DEFAULT '0',
  2768. `shadow` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2769. `build` varchar(255) NOT NULL DEFAULT '',
  2770. `name` varchar(255) NOT NULL DEFAULT '',
  2771. `marker` enum('0','1') NOT NULL DEFAULT '0',
  2772. `date` date DEFAULT NULL,
  2773. `stories` text DEFAULT NULL,
  2774. `bugs` text DEFAULT NULL,
  2775. `leftBugs` text DEFAULT NULL,
  2776. `desc` mediumtext DEFAULT NULL,
  2777. `mailto` text DEFAULT NULL,
  2778. `notify` varchar(255) NOT NULL DEFAULT '',
  2779. `status` varchar(20) NOT NULL DEFAULT 'normal',
  2780. `subStatus` varchar(30) NOT NULL DEFAULT '',
  2781. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2782. `createdDate` datetime DEFAULT NULL,
  2783. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2784. PRIMARY KEY (`id`),
  2785. KEY `product` (`product`),
  2786. KEY `build` (`build`)
  2787. ) ENGINE=InnoDB;
  2788. CREATE TABLE `zt_repo` (
  2789. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  2790. `product` varchar(255) NOT NULL DEFAULT '',
  2791. `projects` varchar(255) NOT NULL DEFAULT '',
  2792. `name` varchar(255) NOT NULL DEFAULT '',
  2793. `path` varchar(255) NOT NULL DEFAULT '',
  2794. `prefix` varchar(100) NOT NULL DEFAULT '',
  2795. `encoding` varchar(20) NOT NULL DEFAULT '',
  2796. `SCM` varchar(10) NOT NULL DEFAULT '',
  2797. `client` varchar(100) NOT NULL DEFAULT '',
  2798. `serviceHost` varchar(50) NOT NULL DEFAULT '',
  2799. `serviceProject` varchar(100) NOT NULL DEFAULT '',
  2800. `commits` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2801. `account` varchar(30) NOT NULL DEFAULT '',
  2802. `password` varchar(30) NOT NULL DEFAULT '',
  2803. `encrypt` varchar(30) NOT NULL DEFAULT 'plain',
  2804. `acl` text DEFAULT NULL,
  2805. `synced` tinyint(1) NOT NULL DEFAULT 0,
  2806. `lastSync` datetime DEFAULT NULL,
  2807. `lastCommit` datetime DEFAULT NULL,
  2808. `desc` text DEFAULT NULL,
  2809. `extra` char(30) NOT NULL DEFAULT '',
  2810. `preMerge` enum('0','1') NOT NULL DEFAULT '0',
  2811. `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2812. `fileServerUrl` text DEFAULT NULL,
  2813. `fileServerAccount` varchar(40) NOT NULL DEFAULT '',
  2814. `fileServerPassword` varchar(100) NOT NULL DEFAULT '',
  2815. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  2816. PRIMARY KEY (`id`)
  2817. ) ENGINE=InnoDB;
  2818. CREATE TABLE `zt_repobranch` (
  2819. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2820. `revision` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2821. `branch` varchar(255) NOT NULL DEFAULT '',
  2822. UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
  2823. KEY `branch` (`branch`),
  2824. KEY `revision` (`revision`)
  2825. ) ENGINE=InnoDB;
  2826. CREATE TABLE `zt_repofiles` (
  2827. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  2828. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2829. `revision` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2830. `path` varchar(255) NOT NULL DEFAULT '',
  2831. `oldPath` varchar(255) NOT NULL DEFAULT '',
  2832. `parent` varchar(255) NOT NULL DEFAULT '',
  2833. `type` varchar(20) NOT NULL DEFAULT '',
  2834. `action` char(1) NOT NULL DEFAULT '',
  2835. PRIMARY KEY (`id`),
  2836. KEY `path` (`path`),
  2837. KEY `parent` (`parent`),
  2838. KEY `repo` (`repo`),
  2839. KEY `revision` (`revision`)
  2840. ) ENGINE=InnoDB;
  2841. CREATE TABLE `zt_repohistory` (
  2842. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  2843. `repo` mediumint(9) NOT NULL DEFAULT 0,
  2844. `revision` varchar(40) NOT NULL DEFAULT '',
  2845. `commit` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2846. `comment` text DEFAULT NULL,
  2847. `committer` varchar(100) NOT NULL DEFAULT '',
  2848. `time` datetime DEFAULT NULL,
  2849. PRIMARY KEY (`id`),
  2850. KEY `repo` (`repo`),
  2851. KEY `revision` (`revision`)
  2852. ) ENGINE=InnoDB;
  2853. CREATE TABLE `zt_report` (
  2854. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  2855. `code` varchar(100) NOT NULL DEFAULT '',
  2856. `name` text DEFAULT NULL,
  2857. `dimension` int(8) NOT NULL DEFAULT 0,
  2858. `module` varchar(100) NOT NULL DEFAULT '',
  2859. `sql` text DEFAULT NULL,
  2860. `vars` text DEFAULT NULL,
  2861. `langs` text DEFAULT NULL,
  2862. `params` text DEFAULT NULL,
  2863. `step` tinyint(1) NOT NULL DEFAULT 2,
  2864. `desc` text DEFAULT NULL,
  2865. `addedBy` char(30) NOT NULL DEFAULT '',
  2866. `addedDate` datetime DEFAULT NULL,
  2867. PRIMARY KEY (`id`),
  2868. UNIQUE KEY `code` (`code`)
  2869. ) ENGINE=InnoDB;
  2870. CREATE TABLE `zt_researchplan` (
  2871. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2872. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2873. `name` varchar(255) NOT NULL DEFAULT '',
  2874. `customer` varchar(255) NOT NULL DEFAULT '',
  2875. `stakeholder` varchar(255) NOT NULL DEFAULT '',
  2876. `objective` varchar(255) NOT NULL DEFAULT '',
  2877. `begin` datetime DEFAULT NULL,
  2878. `end` datetime DEFAULT NULL,
  2879. `location` varchar(255) NOT NULL DEFAULT '',
  2880. `team` varchar(255) NOT NULL DEFAULT '',
  2881. `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL DEFAULT '',
  2882. `outline` mediumtext DEFAULT NULL,
  2883. `schedule` mediumtext DEFAULT NULL,
  2884. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2885. `createdDate` datetime DEFAULT NULL,
  2886. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2887. `editedDate` datetime DEFAULT NULL,
  2888. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2889. PRIMARY KEY (`id`)
  2890. ) ENGINE=InnoDB;
  2891. CREATE TABLE `zt_researchreport` (
  2892. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2893. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2894. `relatedPlan` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2895. `title` varchar(255) NOT NULL DEFAULT '',
  2896. `author` varchar(30) NOT NULL DEFAULT '',
  2897. `content` mediumtext DEFAULT NULL,
  2898. `customer` varchar(255) NOT NULL DEFAULT '',
  2899. `researchObjects` varchar(255) NOT NULL DEFAULT '',
  2900. `begin` datetime DEFAULT NULL,
  2901. `end` datetime DEFAULT NULL,
  2902. `location` varchar(255) NOT NULL DEFAULT '',
  2903. `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL DEFAULT '',
  2904. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2905. `createdDate` datetime DEFAULT NULL,
  2906. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2907. `editedDate` datetime DEFAULT NULL,
  2908. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2909. PRIMARY KEY (`id`)
  2910. ) ENGINE=InnoDB;
  2911. CREATE TABLE `zt_review` (
  2912. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2913. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2914. `title` varchar(255) NOT NULL DEFAULT '',
  2915. `object` mediumint(8) NOT NULL DEFAULT 0,
  2916. `template` mediumint(8) NOT NULL DEFAULT 0,
  2917. `doc` varchar(255) NOT NULL DEFAULT '',
  2918. `docVersion` varchar(255) NOT NULL DEFAULT '',
  2919. `status` char(30) NOT NULL DEFAULT '',
  2920. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  2921. `auditedBy` varchar(255) NOT NULL DEFAULT '',
  2922. `createdBy` char(30) NOT NULL DEFAULT '',
  2923. `createdDate` date DEFAULT NULL,
  2924. `begin` date DEFAULT NULL,
  2925. `deadline` date DEFAULT NULL,
  2926. `lastReviewedBy` varchar(255) NOT NULL DEFAULT '',
  2927. `lastReviewedDate` date DEFAULT NULL,
  2928. `lastAuditedBy` varchar(255) NOT NULL DEFAULT '',
  2929. `lastAuditedDate` date DEFAULT NULL,
  2930. `lastEditedBy` varchar(255) NOT NULL DEFAULT '',
  2931. `lastEditedDate` date DEFAULT NULL,
  2932. `result` char(30) NOT NULL DEFAULT '',
  2933. `auditResult` char(30) NOT NULL DEFAULT '',
  2934. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2935. PRIMARY KEY (`id`)
  2936. ) ENGINE=InnoDB;
  2937. CREATE TABLE `zt_reviewcl` (
  2938. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2939. `title` varchar(255) NOT NULL DEFAULT '',
  2940. `object` char(30) NOT NULL DEFAULT '',
  2941. `category` char(30) NOT NULL DEFAULT '',
  2942. `type` varchar(255) NOT NULL DEFAULT '',
  2943. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2944. `order` mediumint(8) DEFAULT 0,
  2945. `status` varchar(30) NOT NULL DEFAULT '',
  2946. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2947. `createdDate` datetime DEFAULT NULL,
  2948. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2949. `editedDate` datetime DEFAULT NULL,
  2950. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  2951. `assignedDate` datetime DEFAULT NULL,
  2952. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2953. PRIMARY KEY (`id`)
  2954. ) ENGINE=InnoDB;
  2955. CREATE TABLE `zt_reviewissue` (
  2956. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2957. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2958. `review` mediumint(8) NOT NULL DEFAULT 0,
  2959. `approval` mediumint(8) NOT NULL DEFAULT 0,
  2960. `injection` mediumint(8) NOT NULL DEFAULT 0,
  2961. `identify` mediumint(8) NOT NULL DEFAULT 0,
  2962. `type` char(30) NOT NULL DEFAULT 'review',
  2963. `listID` mediumint(8) NOT NULL DEFAULT 0,
  2964. `title` varchar(255) NOT NULL DEFAULT '',
  2965. `opinion` mediumtext DEFAULT NULL,
  2966. `opinionDate` date DEFAULT NULL,
  2967. `status` char(30) NOT NULL DEFAULT '',
  2968. `resolution` char(30) NOT NULL DEFAULT '',
  2969. `resolutionBy` char(30) NOT NULL DEFAULT '',
  2970. `resolutionDate` date DEFAULT NULL,
  2971. `createdBy` char(30) NOT NULL DEFAULT '',
  2972. `createdDate` date DEFAULT NULL,
  2973. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2974. PRIMARY KEY (`id`)
  2975. ) ENGINE=InnoDB;
  2976. CREATE TABLE `zt_reviewlist` (
  2977. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2978. `title` varchar(255) NOT NULL DEFAULT '',
  2979. `object` char(30) NOT NULL DEFAULT '',
  2980. `category` char(30) NOT NULL DEFAULT '',
  2981. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2982. `status` varchar(30) NOT NULL DEFAULT '',
  2983. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2984. `createdDate` datetime DEFAULT NULL,
  2985. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2986. `editedDate` datetime DEFAULT NULL,
  2987. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  2988. `assignedDate` datetime DEFAULT NULL,
  2989. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2990. PRIMARY KEY (`id`)
  2991. ) ENGINE=InnoDB;
  2992. CREATE TABLE `zt_reviewresult` (
  2993. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2994. `review` mediumint(8) NOT NULL DEFAULT 0,
  2995. `type` char(30) NOT NULL DEFAULT 'review',
  2996. `result` char(30) NOT NULL DEFAULT '',
  2997. `opinion` text DEFAULT NULL,
  2998. `reviewer` char(30) NOT NULL DEFAULT '',
  2999. `remainIssue` char(30) NOT NULL DEFAULT '',
  3000. `createdDate` date DEFAULT NULL,
  3001. `consumed` float NOT NULL DEFAULT 0,
  3002. PRIMARY KEY (`id`),
  3003. UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`)
  3004. ) ENGINE=InnoDB;
  3005. CREATE TABLE `zt_risk` (
  3006. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3007. `project` varchar(255) NOT NULL DEFAULT '',
  3008. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3009. `name` varchar(255) NOT NULL DEFAULT '',
  3010. `source` char(30) NOT NULL DEFAULT '',
  3011. `category` char(30) NOT NULL DEFAULT '',
  3012. `strategy` char(30) NOT NULL DEFAULT '',
  3013. `status` varchar(30) NOT NULL DEFAULT 'active',
  3014. `impact` char(30) NOT NULL DEFAULT '',
  3015. `probability` char(30) NOT NULL DEFAULT '',
  3016. `rate` char(30) NOT NULL DEFAULT '',
  3017. `pri` char(30) NOT NULL DEFAULT '',
  3018. `identifiedDate` date DEFAULT NULL,
  3019. `prevention` mediumtext DEFAULT NULL,
  3020. `remedy` mediumtext DEFAULT NULL,
  3021. `plannedClosedDate` date DEFAULT NULL,
  3022. `actualClosedDate` date DEFAULT NULL,
  3023. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3024. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3025. `version` smallint(6) NOT NULL DEFAULT 1,
  3026. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3027. `createdDate` datetime DEFAULT NULL,
  3028. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3029. `editedDate` datetime DEFAULT NULL,
  3030. `resolution` mediumtext DEFAULT NULL,
  3031. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  3032. `activateBy` varchar(30) NOT NULL DEFAULT '',
  3033. `activateDate` date DEFAULT NULL,
  3034. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3035. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3036. `closedDate` date DEFAULT NULL,
  3037. `cancelBy` varchar(30) NOT NULL DEFAULT '',
  3038. `cancelDate` date DEFAULT NULL,
  3039. `cancelReason` char(30) NOT NULL DEFAULT '',
  3040. `hangupBy` varchar(30) NOT NULL DEFAULT '',
  3041. `hangupDate` date DEFAULT NULL,
  3042. `trackedBy` varchar(30) NOT NULL DEFAULT '',
  3043. `trackedDate` date DEFAULT NULL,
  3044. `assignedDate` date DEFAULT NULL,
  3045. `approvedDate` date DEFAULT NULL,
  3046. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3047. PRIMARY KEY (`id`)
  3048. ) ENGINE=InnoDB;
  3049. CREATE TABLE `zt_riskissue` (
  3050. `risk` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3051. `issue` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3052. UNIQUE KEY `risk_issue` (`risk`,`issue`)
  3053. ) ENGINE=InnoDB;
  3054. CREATE TABLE `zt_roadmap` (
  3055. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3056. `product` mediumint(8) NOT NULL DEFAULT 0,
  3057. `branch` mediumint(8) NOT NULL DEFAULT 0,
  3058. `name` varchar(255) NOT NULL DEFAULT '',
  3059. `status` char(30) NOT NULL DEFAULT '',
  3060. `begin` date DEFAULT NULL,
  3061. `end` date DEFAULT NULL,
  3062. `desc` longtext DEFAULT NULL,
  3063. `createdBy` char(30) NOT NULL DEFAULT '',
  3064. `createdDate` date DEFAULT NULL,
  3065. `closedBy` char(30) NOT NULL DEFAULT '',
  3066. `closedDate` datetime DEFAULT NULL,
  3067. `closedReason` enum('done','canceled') DEFAULT NULL,
  3068. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3069. PRIMARY KEY (`id`)
  3070. ) ENGINE=InnoDB;
  3071. CREATE TABLE `zt_roadmapstory` (
  3072. `roadmap` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3073. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3074. `order` mediumint(8) unsigned NOT NULL,
  3075. UNIQUE KEY `roadmap_story` (`roadmap`,`story`)
  3076. ) ENGINE=InnoDB;
  3077. CREATE TABLE `zt_scene` (
  3078. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3079. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3080. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3081. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3082. `title` varchar(255) NOT NULL DEFAULT '',
  3083. `sort` int(11) unsigned NOT NULL DEFAULT 0,
  3084. `openedBy` char(30) NOT NULL DEFAULT '',
  3085. `openedDate` datetime DEFAULT NULL,
  3086. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  3087. `lastEditedDate` datetime DEFAULT NULL,
  3088. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3089. `parent` int(11) NOT NULL DEFAULT 0,
  3090. `grade` tinyint(3) NOT NULL DEFAULT 0,
  3091. `path` varchar(1000) NOT NULL DEFAULT '',
  3092. PRIMARY KEY (`id`)
  3093. ) ENGINE=InnoDB;
  3094. CREATE TABLE `zt_score` (
  3095. `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
  3096. `account` varchar(30) NOT NULL DEFAULT '',
  3097. `module` varchar(30) NOT NULL DEFAULT '',
  3098. `method` varchar(30) NOT NULL DEFAULT '',
  3099. `desc` varchar(250) NOT NULL DEFAULT '',
  3100. `before` int(11) NOT NULL DEFAULT 0,
  3101. `score` int(11) NOT NULL DEFAULT 0,
  3102. `after` int(11) NOT NULL DEFAULT 0,
  3103. `time` datetime DEFAULT NULL,
  3104. PRIMARY KEY (`id`),
  3105. KEY `account` (`account`),
  3106. KEY `module` (`module`),
  3107. KEY `method` (`method`)
  3108. ) ENGINE=InnoDB;
  3109. CREATE TABLE `zt_screen` (
  3110. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3111. `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3112. `name` varchar(255) NOT NULL DEFAULT '',
  3113. `desc` mediumtext DEFAULT NULL,
  3114. `cover` mediumtext DEFAULT NULL,
  3115. `scheme` mediumtext DEFAULT NULL,
  3116. `status` enum('draft','published') NOT NULL DEFAULT 'draft',
  3117. `builtin` enum('0','1') NOT NULL DEFAULT '0',
  3118. `createdBy` char(30) NOT NULL DEFAULT '',
  3119. `createdDate` datetime DEFAULT NULL,
  3120. `editedBy` char(30) NOT NULL DEFAULT '',
  3121. `editedDate` datetime DEFAULT NULL,
  3122. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3123. PRIMARY KEY (`id`)
  3124. ) ENGINE=InnoDB;
  3125. CREATE TABLE `zt_searchdict` (
  3126. `key` smallint(5) unsigned NOT NULL DEFAULT 0,
  3127. `value` char(3) NOT NULL DEFAULT '',
  3128. PRIMARY KEY (`key`)
  3129. ) ENGINE=InnoDB;
  3130. CREATE TABLE `zt_searchindex` (
  3131. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  3132. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3133. `objectType` char(20) NOT NULL DEFAULT '',
  3134. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  3135. `title` text DEFAULT NULL,
  3136. `content` text DEFAULT NULL,
  3137. `addedDate` datetime DEFAULT NULL,
  3138. `editedDate` datetime DEFAULT NULL,
  3139. PRIMARY KEY (`id`),
  3140. UNIQUE KEY `object` (`objectType`,`objectID`),
  3141. KEY `addedDate` (`addedDate`),
  3142. FULLTEXT KEY `title_content` (`title`,`content`)
  3143. ) ENGINE=InnoDB;
  3144. CREATE TABLE `zt_serverroom` (
  3145. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3146. `name` varchar(128) NOT NULL DEFAULT '',
  3147. `city` varchar(128) NOT NULL DEFAULT '',
  3148. `line` varchar(20) NOT NULL DEFAULT '',
  3149. `bandwidth` varchar(128) NOT NULL DEFAULT '',
  3150. `provider` varchar(128) NOT NULL DEFAULT '',
  3151. `owner` varchar(30) NOT NULL DEFAULT '',
  3152. `createdBy` char(30) NOT NULL DEFAULT '',
  3153. `createdDate` datetime DEFAULT NULL,
  3154. `editedBy` char(30) NOT NULL DEFAULT '',
  3155. `editedDate` datetime DEFAULT NULL,
  3156. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3157. PRIMARY KEY (`id`)
  3158. ) ENGINE=InnoDB;
  3159. CREATE TABLE `zt_service` (
  3160. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3161. `name` varchar(255) NOT NULL DEFAULT '',
  3162. `external` enum('0','1') NOT NULL DEFAULT '0',
  3163. `port` smallint(5) unsigned NOT NULL DEFAULT 0,
  3164. `entry` varchar(255) NOT NULL DEFAULT '',
  3165. `deploy` varchar(255) NOT NULL DEFAULT '',
  3166. `version` varchar(64) NOT NULL DEFAULT '',
  3167. `color` char(7) NOT NULL DEFAULT '',
  3168. `desc` mediumtext DEFAULT NULL,
  3169. `dept` varchar(128) NOT NULL DEFAULT '',
  3170. `devel` varchar(30) NOT NULL DEFAULT '',
  3171. `qa` varchar(30) NOT NULL DEFAULT '',
  3172. `ops` varchar(30) NOT NULL DEFAULT '',
  3173. `hosts` text DEFAULT NULL,
  3174. `softName` varchar(128) NOT NULL DEFAULT '',
  3175. `softVersion` varchar(128) NOT NULL DEFAULT '',
  3176. `type` varchar(20) NOT NULL DEFAULT '',
  3177. `createdBy` char(30) NOT NULL DEFAULT '',
  3178. `createdDate` datetime DEFAULT NULL,
  3179. `editedBy` char(30) NOT NULL DEFAULT '',
  3180. `editedDate` datetime DEFAULT NULL,
  3181. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3182. `path` char(255) NOT NULL DEFAULT '',
  3183. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3184. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  3185. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3186. PRIMARY KEY (`id`)
  3187. ) ENGINE=InnoDB;
  3188. CREATE TABLE `zt_solution` (
  3189. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3190. `name` char(50) DEFAULT NULL,
  3191. `appID` mediumint(8) unsigned NOT NULL,
  3192. `appName` char(50) NOT NULL,
  3193. `appVersion` char(20) NOT NULL,
  3194. `version` char(50) NOT NULL,
  3195. `chart` char(50) NOT NULL,
  3196. `cover` varchar(255) DEFAULT NULL,
  3197. `desc` text DEFAULT NULL,
  3198. `introduction` varchar(500) DEFAULT NULL,
  3199. `source` char(20) NOT NULL,
  3200. `channel` char(20) DEFAULT NULL,
  3201. `components` text DEFAULT NULL,
  3202. `status` char(20) NOT NULL,
  3203. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  3204. `createdBy` char(30) NOT NULL,
  3205. `createdAt` datetime NOT NULL,
  3206. `updatedDate` datetime DEFAULT NULL,
  3207. PRIMARY KEY (`id`)
  3208. ) ENGINE=InnoDB;
  3209. CREATE TABLE `zt_solutions` (
  3210. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3211. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3212. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3213. `contents` text NOT NULL COMMENT '问题描述',
  3214. `support` text NOT NULL COMMENT '是否需要高层支持',
  3215. `measures` text NOT NULL COMMENT '解决建议',
  3216. `type` char(30) NOT NULL DEFAULT '',
  3217. `addedBy` varchar(30) NOT NULL DEFAULT '',
  3218. `addedDate` date DEFAULT NULL,
  3219. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3220. `editedDate` date DEFAULT NULL,
  3221. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3222. PRIMARY KEY (`id`)
  3223. ) ENGINE=InnoDB;
  3224. CREATE TABLE `zt_space` (
  3225. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3226. `name` varchar(200) NOT NULL,
  3227. `k8space` char(64) NOT NULL,
  3228. `owner` char(30) NOT NULL,
  3229. `default` tinyint(1) NOT NULL DEFAULT 0,
  3230. `createdAt` datetime NOT NULL,
  3231. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  3232. PRIMARY KEY (`id`),
  3233. KEY `name` (`name`)
  3234. ) ENGINE=InnoDB;
  3235. CREATE TABLE `zt_sqlview` (
  3236. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3237. `name` varchar(90) NOT NULL DEFAULT '',
  3238. `code` varchar(45) NOT NULL DEFAULT '',
  3239. `sql` text DEFAULT NULL,
  3240. `desc` text DEFAULT NULL,
  3241. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3242. `createdDate` datetime DEFAULT NULL,
  3243. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3244. `editedDate` datetime DEFAULT NULL,
  3245. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3246. PRIMARY KEY (`id`)
  3247. ) ENGINE=InnoDB;
  3248. CREATE TABLE `zt_stage` (
  3249. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3250. `name` varchar(255) NOT NULL DEFAULT '',
  3251. `percent` varchar(255) NOT NULL DEFAULT '',
  3252. `type` varchar(255) NOT NULL DEFAULT '',
  3253. `projectType` varchar(255) NOT NULL DEFAULT '',
  3254. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3255. `createdDate` datetime DEFAULT NULL,
  3256. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3257. `editedDate` datetime DEFAULT NULL,
  3258. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3259. PRIMARY KEY (`id`)
  3260. ) ENGINE=InnoDB;
  3261. CREATE TABLE `zt_stakeholder` (
  3262. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3263. `objectID` mediumint(8) NOT NULL DEFAULT 0,
  3264. `objectType` char(30) NOT NULL DEFAULT '',
  3265. `user` char(30) NOT NULL DEFAULT '',
  3266. `type` char(30) NOT NULL DEFAULT '',
  3267. `key` enum('0','1') NOT NULL DEFAULT '0',
  3268. `from` char(30) NOT NULL DEFAULT '',
  3269. `createdBy` char(30) NOT NULL DEFAULT '',
  3270. `createdDate` date DEFAULT NULL,
  3271. `editedBy` char(30) NOT NULL DEFAULT '',
  3272. `editedDate` date DEFAULT NULL,
  3273. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3274. PRIMARY KEY (`id`),
  3275. KEY `objectID` (`objectID`)
  3276. ) ENGINE=InnoDB;
  3277. CREATE TABLE `zt_story` (
  3278. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3279. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3280. `parent` mediumint(9) NOT NULL DEFAULT 0,
  3281. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3282. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3283. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3284. `plan` text DEFAULT NULL,
  3285. `source` varchar(20) NOT NULL DEFAULT '',
  3286. `sourceNote` varchar(255) NOT NULL DEFAULT '',
  3287. `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3288. `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3289. `title` varchar(255) NOT NULL DEFAULT '',
  3290. `keywords` varchar(255) NOT NULL DEFAULT '',
  3291. `type` varchar(30) NOT NULL DEFAULT 'story',
  3292. `category` varchar(30) NOT NULL DEFAULT 'feature',
  3293. `pri` tinyint(3) unsigned NOT NULL DEFAULT 3,
  3294. `estimate` float unsigned NOT NULL DEFAULT 0,
  3295. `status` enum('','changing','active','draft','closed','reviewing','launched','developing') NOT NULL DEFAULT '',
  3296. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3297. `color` char(7) NOT NULL DEFAULT '',
  3298. `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait',
  3299. `stagedBy` char(30) NOT NULL DEFAULT '',
  3300. `mailto` text DEFAULT NULL,
  3301. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3302. `fromStory` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3303. `fromVersion` smallint(6) NOT NULL DEFAULT 1,
  3304. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3305. `openedDate` datetime DEFAULT NULL,
  3306. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3307. `assignedDate` datetime DEFAULT NULL,
  3308. `approvedDate` date DEFAULT NULL,
  3309. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  3310. `lastEditedDate` datetime DEFAULT NULL,
  3311. `changedBy` varchar(30) NOT NULL DEFAULT '',
  3312. `changedDate` datetime DEFAULT NULL,
  3313. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  3314. `reviewedDate` datetime DEFAULT NULL,
  3315. `releasedDate` datetime DEFAULT NULL,
  3316. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3317. `closedDate` datetime DEFAULT NULL,
  3318. `closedReason` varchar(30) NOT NULL DEFAULT '',
  3319. `activatedDate` datetime DEFAULT NULL,
  3320. `toBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3321. `childStories` varchar(255) NOT NULL DEFAULT '',
  3322. `linkStories` varchar(255) NOT NULL DEFAULT '',
  3323. `linkRequirements` varchar(255) NOT NULL DEFAULT '',
  3324. `twins` varchar(255) NOT NULL DEFAULT '',
  3325. `duplicateStory` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3326. `version` smallint(6) NOT NULL DEFAULT 1,
  3327. `storyChanged` enum('0','1') NOT NULL DEFAULT '0',
  3328. `feedbackBy` varchar(100) NOT NULL DEFAULT '',
  3329. `notifyEmail` varchar(100) NOT NULL DEFAULT '',
  3330. `BSA` char(30) NOT NULL DEFAULT '',
  3331. `duration` char(30) NOT NULL DEFAULT '',
  3332. `demand` mediumint(8) NOT NULL DEFAULT 0,
  3333. `submitedBy` varchar(30) NOT NULL DEFAULT '',
  3334. `roadmap` varchar(255) NOT NULL DEFAULT '',
  3335. `URChanged` enum('0','1') NOT NULL DEFAULT '0',
  3336. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3337. PRIMARY KEY (`id`),
  3338. KEY `product` (`product`),
  3339. KEY `status` (`status`),
  3340. KEY `assignedTo` (`assignedTo`)
  3341. ) ENGINE=InnoDB;
  3342. CREATE TABLE `zt_storyestimate` (
  3343. `story` mediumint(9) NOT NULL DEFAULT 0,
  3344. `round` smallint(6) NOT NULL DEFAULT 0,
  3345. `estimate` text DEFAULT NULL,
  3346. `average` float NOT NULL DEFAULT 0,
  3347. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3348. `openedDate` datetime DEFAULT NULL,
  3349. UNIQUE KEY `story` (`story`,`round`)
  3350. ) ENGINE=InnoDB;
  3351. CREATE TABLE `zt_storyreview` (
  3352. `story` mediumint(9) NOT NULL DEFAULT 0,
  3353. `version` smallint(6) NOT NULL DEFAULT 0,
  3354. `reviewer` varchar(30) NOT NULL DEFAULT '',
  3355. `result` varchar(30) NOT NULL DEFAULT '',
  3356. `reviewDate` datetime DEFAULT NULL,
  3357. UNIQUE KEY `story` (`story`,`version`,`reviewer`)
  3358. ) ENGINE=InnoDB;
  3359. CREATE TABLE `zt_storyspec` (
  3360. `story` mediumint(9) NOT NULL DEFAULT 0,
  3361. `version` smallint(6) NOT NULL DEFAULT 0,
  3362. `title` varchar(255) NOT NULL DEFAULT '',
  3363. `spec` mediumtext DEFAULT NULL,
  3364. `verify` mediumtext DEFAULT NULL,
  3365. `files` text DEFAULT NULL,
  3366. UNIQUE KEY `story` (`story`,`version`)
  3367. ) ENGINE=InnoDB;
  3368. CREATE TABLE `zt_storystage` (
  3369. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3370. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3371. `stage` varchar(50) NOT NULL DEFAULT '',
  3372. `stagedBy` char(30) NOT NULL DEFAULT '',
  3373. UNIQUE KEY `story_branch` (`story`,`branch`),
  3374. KEY `story` (`story`)
  3375. ) ENGINE=InnoDB;
  3376. CREATE TABLE `zt_suitecase` (
  3377. `suite` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3378. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3379. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3380. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  3381. UNIQUE KEY `suitecase` (`suite`,`case`)
  3382. ) ENGINE=InnoDB;
  3383. CREATE TABLE `zt_task` (
  3384. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3385. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3386. `parent` mediumint(8) NOT NULL DEFAULT 0,
  3387. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3388. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3389. `design` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3390. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3391. `storyVersion` smallint(6) NOT NULL DEFAULT 1,
  3392. `designVersion` smallint(6) unsigned NOT NULL DEFAULT 1,
  3393. `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3394. `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3395. `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3396. `name` varchar(255) NOT NULL DEFAULT '',
  3397. `type` varchar(20) NOT NULL DEFAULT '',
  3398. `mode` varchar(10) NOT NULL DEFAULT '',
  3399. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3400. `estimate` float unsigned NOT NULL DEFAULT 0,
  3401. `consumed` float unsigned NOT NULL DEFAULT 0,
  3402. `left` float unsigned NOT NULL DEFAULT 0,
  3403. `deadline` date DEFAULT NULL,
  3404. `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
  3405. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3406. `color` char(7) NOT NULL DEFAULT '',
  3407. `mailto` text DEFAULT NULL,
  3408. `desc` mediumtext DEFAULT NULL,
  3409. `version` smallint(6) NOT NULL DEFAULT 0,
  3410. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3411. `openedDate` datetime DEFAULT NULL,
  3412. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3413. `assignedDate` datetime DEFAULT NULL,
  3414. `estStarted` date DEFAULT NULL,
  3415. `realStarted` datetime DEFAULT NULL,
  3416. `finishedBy` varchar(30) NOT NULL DEFAULT '',
  3417. `finishedDate` datetime DEFAULT NULL,
  3418. `finishedList` text DEFAULT NULL,
  3419. `canceledBy` varchar(30) NOT NULL DEFAULT '',
  3420. `canceledDate` datetime DEFAULT NULL,
  3421. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3422. `closedDate` datetime DEFAULT NULL,
  3423. `planDuration` int(11) NOT NULL DEFAULT 0,
  3424. `realDuration` int(11) NOT NULL DEFAULT 0,
  3425. `closedReason` varchar(30) NOT NULL DEFAULT '',
  3426. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  3427. `lastEditedDate` datetime DEFAULT NULL,
  3428. `activatedDate` datetime DEFAULT NULL,
  3429. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3430. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3431. `mr` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3432. `entry` varchar(255) NOT NULL DEFAULT '',
  3433. `lines` varchar(10) NOT NULL DEFAULT '',
  3434. `v1` varchar(40) NOT NULL DEFAULT '',
  3435. `v2` varchar(40) NOT NULL DEFAULT '',
  3436. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3437. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3438. PRIMARY KEY (`id`),
  3439. KEY `execution` (`execution`),
  3440. KEY `story` (`story`),
  3441. KEY `parent` (`parent`),
  3442. KEY `assignedTo` (`assignedTo`),
  3443. KEY `order` (`order`)
  3444. ) ENGINE=InnoDB;
  3445. CREATE TABLE `zt_taskestimate` (
  3446. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3447. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3448. `date` date DEFAULT NULL,
  3449. `left` float unsigned NOT NULL DEFAULT 0,
  3450. `consumed` float unsigned NOT NULL DEFAULT 0,
  3451. `account` char(30) NOT NULL DEFAULT '',
  3452. `work` text DEFAULT NULL,
  3453. `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3454. PRIMARY KEY (`id`),
  3455. KEY `task` (`task`)
  3456. ) ENGINE=InnoDB;
  3457. CREATE TABLE `zt_taskspec` (
  3458. `task` mediumint(8) NOT NULL DEFAULT 0,
  3459. `version` smallint(6) NOT NULL DEFAULT 0,
  3460. `name` varchar(255) NOT NULL DEFAULT '',
  3461. `estStarted` date DEFAULT NULL,
  3462. `deadline` date DEFAULT NULL,
  3463. UNIQUE KEY `task` (`task`,`version`)
  3464. ) ENGINE=InnoDB;
  3465. CREATE TABLE `zt_taskteam` (
  3466. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3467. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3468. `account` char(30) NOT NULL DEFAULT '',
  3469. `estimate` decimal(12,2) NOT NULL DEFAULT 0.00,
  3470. `consumed` decimal(12,2) NOT NULL DEFAULT 0.00,
  3471. `left` decimal(12,2) NOT NULL DEFAULT 0.00,
  3472. `transfer` char(30) NOT NULL DEFAULT '',
  3473. `status` enum('wait','doing','done') NOT NULL DEFAULT 'wait',
  3474. `order` tinyint(3) NOT NULL DEFAULT 0,
  3475. PRIMARY KEY (`id`),
  3476. KEY `task` (`task`)
  3477. ) ENGINE=InnoDB;
  3478. CREATE TABLE `zt_team` (
  3479. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3480. `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3481. `type` enum('project','task','execution') NOT NULL DEFAULT 'project',
  3482. `account` char(30) NOT NULL DEFAULT '',
  3483. `role` char(30) NOT NULL DEFAULT '',
  3484. `position` varchar(30) NOT NULL DEFAULT '',
  3485. `limited` char(8) NOT NULL DEFAULT 'no',
  3486. `join` date DEFAULT NULL,
  3487. `days` smallint(5) unsigned NOT NULL DEFAULT 0,
  3488. `hours` float(3,1) unsigned NOT NULL DEFAULT 0.0,
  3489. `estimate` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
  3490. `consumed` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
  3491. `left` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
  3492. `order` tinyint(3) NOT NULL DEFAULT 0,
  3493. PRIMARY KEY (`id`),
  3494. UNIQUE KEY `team` (`root`,`type`,`account`)
  3495. ) ENGINE=InnoDB;
  3496. CREATE TABLE `zt_testreport` (
  3497. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3498. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3499. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3500. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3501. `tasks` varchar(255) NOT NULL DEFAULT '',
  3502. `builds` varchar(255) NOT NULL DEFAULT '',
  3503. `title` varchar(255) NOT NULL DEFAULT '',
  3504. `begin` date DEFAULT NULL,
  3505. `end` date DEFAULT NULL,
  3506. `owner` char(30) NOT NULL DEFAULT '',
  3507. `members` text DEFAULT NULL,
  3508. `stories` text DEFAULT NULL,
  3509. `bugs` text DEFAULT NULL,
  3510. `cases` text DEFAULT NULL,
  3511. `report` text DEFAULT NULL,
  3512. `objectType` varchar(20) NOT NULL DEFAULT '',
  3513. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3514. `createdBy` char(30) NOT NULL DEFAULT '',
  3515. `createdDate` datetime DEFAULT NULL,
  3516. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3517. PRIMARY KEY (`id`)
  3518. ) ENGINE=InnoDB;
  3519. CREATE TABLE `zt_testresult` (
  3520. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3521. `run` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3522. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3523. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  3524. `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3525. `compile` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3526. `caseResult` char(30) NOT NULL DEFAULT '',
  3527. `stepResults` text DEFAULT NULL,
  3528. `ZTFResult` text DEFAULT NULL,
  3529. `node` int(8) unsigned NOT NULL DEFAULT 0,
  3530. `lastRunner` varchar(30) NOT NULL DEFAULT '',
  3531. `date` datetime DEFAULT NULL,
  3532. `duration` float NOT NULL DEFAULT 0,
  3533. `xml` text DEFAULT NULL,
  3534. `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3535. PRIMARY KEY (`id`),
  3536. KEY `case` (`case`),
  3537. KEY `version` (`version`),
  3538. KEY `run` (`run`)
  3539. ) ENGINE=InnoDB;
  3540. CREATE TABLE `zt_testrun` (
  3541. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3542. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3543. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3544. `version` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3545. `assignedTo` char(30) NOT NULL DEFAULT '',
  3546. `lastRunner` varchar(30) NOT NULL DEFAULT '',
  3547. `lastRunDate` datetime DEFAULT NULL,
  3548. `lastRunResult` char(30) NOT NULL DEFAULT '',
  3549. `status` char(30) NOT NULL DEFAULT '',
  3550. PRIMARY KEY (`id`),
  3551. UNIQUE KEY `task` (`task`,`case`)
  3552. ) ENGINE=InnoDB;
  3553. CREATE TABLE `zt_testsuite` (
  3554. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3555. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3556. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3557. `name` varchar(255) NOT NULL DEFAULT '',
  3558. `desc` mediumtext DEFAULT NULL,
  3559. `type` varchar(20) NOT NULL DEFAULT '',
  3560. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  3561. `addedBy` char(30) NOT NULL DEFAULT '',
  3562. `addedDate` datetime DEFAULT NULL,
  3563. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  3564. `lastEditedDate` datetime DEFAULT NULL,
  3565. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3566. PRIMARY KEY (`id`),
  3567. KEY `product` (`product`)
  3568. ) ENGINE=InnoDB;
  3569. CREATE TABLE `zt_testtask` (
  3570. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3571. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3572. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3573. `name` char(90) NOT NULL DEFAULT '',
  3574. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3575. `build` char(30) NOT NULL DEFAULT '',
  3576. `type` varchar(255) NOT NULL DEFAULT '',
  3577. `owner` varchar(30) NOT NULL DEFAULT '',
  3578. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3579. `begin` date DEFAULT NULL,
  3580. `end` date DEFAULT NULL,
  3581. `realFinishedDate` datetime DEFAULT NULL,
  3582. `mailto` text DEFAULT NULL,
  3583. `desc` mediumtext DEFAULT NULL,
  3584. `report` text DEFAULT NULL,
  3585. `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
  3586. `testreport` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3587. `auto` varchar(10) NOT NULL DEFAULT 'no',
  3588. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3589. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3590. `createdDate` datetime DEFAULT NULL,
  3591. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3592. PRIMARY KEY (`id`),
  3593. KEY `product` (`product`),
  3594. KEY `build` (`build`)
  3595. ) ENGINE=InnoDB;
  3596. CREATE TABLE `zt_ticket` (
  3597. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3598. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3599. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3600. `title` varchar(255) NOT NULL DEFAULT '',
  3601. `type` varchar(30) NOT NULL DEFAULT '',
  3602. `desc` text DEFAULT NULL,
  3603. `openedBuild` varchar(255) NOT NULL DEFAULT '',
  3604. `feedback` mediumint(8) NOT NULL DEFAULT 0,
  3605. `assignedTo` varchar(255) NOT NULL DEFAULT '',
  3606. `assignedDate` datetime DEFAULT NULL,
  3607. `realStarted` datetime DEFAULT NULL,
  3608. `startedBy` varchar(255) NOT NULL DEFAULT '',
  3609. `startedDate` datetime DEFAULT NULL,
  3610. `deadline` date DEFAULT NULL,
  3611. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3612. `estimate` float unsigned NOT NULL DEFAULT 0,
  3613. `left` float unsigned NOT NULL DEFAULT 0,
  3614. `status` varchar(30) NOT NULL DEFAULT '',
  3615. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3616. `openedDate` datetime DEFAULT NULL,
  3617. `activatedCount` int(10) NOT NULL DEFAULT 0,
  3618. `activatedBy` varchar(30) NOT NULL DEFAULT '',
  3619. `activatedDate` datetime DEFAULT NULL,
  3620. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3621. `closedDate` datetime DEFAULT NULL,
  3622. `closedReason` varchar(30) NOT NULL DEFAULT '',
  3623. `finishedBy` varchar(30) NOT NULL DEFAULT '',
  3624. `finishedDate` datetime DEFAULT NULL,
  3625. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  3626. `resolvedDate` datetime DEFAULT NULL,
  3627. `resolution` text DEFAULT NULL,
  3628. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3629. `editedDate` datetime DEFAULT NULL,
  3630. `keywords` varchar(255) NOT NULL DEFAULT '',
  3631. `repeatTicket` mediumint(8) NOT NULL DEFAULT 0,
  3632. `mailto` varchar(255) NOT NULL DEFAULT '',
  3633. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3634. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3635. PRIMARY KEY (`id`),
  3636. KEY `product` (`product`)
  3637. ) ENGINE=InnoDB;
  3638. CREATE TABLE `zt_ticketrelation` (
  3639. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3640. `ticketId` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3641. `objectId` mediumint(9) NOT NULL DEFAULT 0,
  3642. `objectType` varchar(100) NOT NULL DEFAULT '',
  3643. PRIMARY KEY (`id`),
  3644. KEY `ticketId` (`ticketId`)
  3645. ) ENGINE=InnoDB;
  3646. CREATE TABLE `zt_ticketsource` (
  3647. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3648. `ticketId` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3649. `customer` varchar(100) NOT NULL DEFAULT '',
  3650. `contact` varchar(100) NOT NULL DEFAULT '',
  3651. `notifyEmail` varchar(100) NOT NULL DEFAULT '',
  3652. `createdDate` datetime DEFAULT NULL,
  3653. PRIMARY KEY (`id`),
  3654. KEY `ticketId` (`ticketId`)
  3655. ) ENGINE=InnoDB;
  3656. CREATE TABLE `zt_todo` (
  3657. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3658. `account` char(30) NOT NULL DEFAULT '',
  3659. `date` date DEFAULT NULL,
  3660. `begin` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  3661. `end` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  3662. `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3663. `type` char(15) NOT NULL DEFAULT '',
  3664. `cycle` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3665. `idvalue` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3666. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3667. `name` char(150) NOT NULL DEFAULT '',
  3668. `desc` mediumtext DEFAULT NULL,
  3669. `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
  3670. `private` tinyint(1) NOT NULL DEFAULT 0,
  3671. `config` varchar(255) NOT NULL DEFAULT '',
  3672. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3673. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  3674. `assignedDate` datetime DEFAULT NULL,
  3675. `finishedBy` varchar(30) NOT NULL DEFAULT '',
  3676. `finishedDate` datetime DEFAULT NULL,
  3677. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3678. `closedDate` datetime DEFAULT NULL,
  3679. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3680. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3681. PRIMARY KEY (`id`),
  3682. KEY `account` (`account`),
  3683. KEY `assignedTo` (`assignedTo`),
  3684. KEY `finishedBy` (`finishedBy`),
  3685. KEY `date` (`date`)
  3686. ) ENGINE=InnoDB;
  3687. CREATE TABLE `zt_traincategory` (
  3688. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3689. `name` char(30) NOT NULL DEFAULT '',
  3690. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3691. `path` char(255) NOT NULL DEFAULT '',
  3692. `grade` tinyint(3) NOT NULL DEFAULT 0,
  3693. `order` mediumint(8) NOT NULL DEFAULT 0,
  3694. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3695. PRIMARY KEY (`id`),
  3696. KEY `parent` (`parent`),
  3697. KEY `path` (`path`)
  3698. ) ENGINE=InnoDB;
  3699. CREATE TABLE `zt_traincontents` (
  3700. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3701. `code` varchar(50) NOT NULL DEFAULT '',
  3702. `course` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3703. `name` varchar(255) NOT NULL DEFAULT '',
  3704. `type` varchar(30) NOT NULL DEFAULT '',
  3705. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3706. `path` char(255) NOT NULL DEFAULT '',
  3707. `desc` text DEFAULT NULL,
  3708. `order` mediumint(8) NOT NULL DEFAULT 0,
  3709. `createdBy` char(30) NOT NULL DEFAULT '',
  3710. `createdDate` datetime DEFAULT NULL,
  3711. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3712. `editedDate` datetime DEFAULT NULL,
  3713. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  3714. PRIMARY KEY (`id`)
  3715. ) ENGINE=InnoDB;
  3716. CREATE TABLE `zt_traincourse` (
  3717. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3718. `code` varchar(255) NOT NULL DEFAULT '',
  3719. `category` mediumint(8) NOT NULL DEFAULT 0,
  3720. `name` varchar(255) NOT NULL DEFAULT '',
  3721. `status` varchar(10) NOT NULL DEFAULT '',
  3722. `teacher` varchar(30) NOT NULL DEFAULT '',
  3723. `desc` mediumtext DEFAULT NULL,
  3724. `importedStatus` enum('','wait','doing','done') NOT NULL DEFAULT '',
  3725. `lastUpdatedTime` int(10) unsigned NOT NULL DEFAULT 0,
  3726. `createdBy` varchar(255) NOT NULL DEFAULT '',
  3727. `createdDate` date DEFAULT NULL,
  3728. `editedBy` varchar(255) NOT NULL DEFAULT '',
  3729. `editedDate` date DEFAULT NULL,
  3730. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3731. PRIMARY KEY (`id`)
  3732. ) ENGINE=InnoDB;
  3733. CREATE TABLE `zt_trainplan` (
  3734. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3735. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3736. `name` varchar(255) NOT NULL DEFAULT '',
  3737. `begin` date DEFAULT NULL,
  3738. `end` date DEFAULT NULL,
  3739. `place` varchar(255) NOT NULL DEFAULT '',
  3740. `trainee` text DEFAULT NULL,
  3741. `lecturer` varchar(20) NOT NULL DEFAULT '',
  3742. `type` enum('inside','outside') NOT NULL DEFAULT 'inside',
  3743. `status` varchar(20) NOT NULL DEFAULT '',
  3744. `summary` mediumtext DEFAULT NULL,
  3745. `createdBy` char(30) NOT NULL DEFAULT '',
  3746. `createdDate` datetime DEFAULT NULL,
  3747. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3748. `editedDate` datetime DEFAULT NULL,
  3749. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3750. PRIMARY KEY (`id`)
  3751. ) ENGINE=InnoDB;
  3752. CREATE TABLE `zt_trainrecords` (
  3753. `user` char(30) NOT NULL DEFAULT '',
  3754. `objectId` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3755. `objectType` varchar(10) NOT NULL DEFAULT '',
  3756. `status` varchar(10) NOT NULL DEFAULT '',
  3757. PRIMARY KEY (`user`,`objectId`,`objectType`)
  3758. ) ENGINE=InnoDB;
  3759. CREATE TABLE `zt_trip` (
  3760. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3761. `type` enum('trip','egress') NOT NULL DEFAULT 'trip',
  3762. `customers` varchar(20) NOT NULL DEFAULT '',
  3763. `name` char(30) NOT NULL DEFAULT '',
  3764. `desc` text DEFAULT NULL,
  3765. `year` char(4) NOT NULL DEFAULT '',
  3766. `begin` date DEFAULT NULL,
  3767. `end` date DEFAULT NULL,
  3768. `start` time DEFAULT NULL,
  3769. `finish` time DEFAULT NULL,
  3770. `from` char(50) NOT NULL DEFAULT '',
  3771. `to` char(50) NOT NULL DEFAULT '',
  3772. `createdBy` char(30) NOT NULL DEFAULT '',
  3773. `createdDate` datetime DEFAULT NULL,
  3774. PRIMARY KEY (`id`),
  3775. KEY `year` (`year`),
  3776. KEY `createdBy` (`createdBy`)
  3777. ) ENGINE=InnoDB;
  3778. CREATE TABLE `zt_user` (
  3779. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3780. `company` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3781. `type` char(30) NOT NULL DEFAULT 'inside',
  3782. `dept` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3783. `account` char(30) NOT NULL DEFAULT '',
  3784. `password` char(32) NOT NULL DEFAULT '',
  3785. `role` char(10) NOT NULL DEFAULT '',
  3786. `realname` varchar(100) NOT NULL DEFAULT '',
  3787. `pinyin` varchar(255) NOT NULL DEFAULT '',
  3788. `nickname` char(60) NOT NULL DEFAULT '',
  3789. `commiter` varchar(100) NOT NULL DEFAULT '',
  3790. `avatar` text DEFAULT NULL,
  3791. `birthday` date DEFAULT NULL,
  3792. `gender` enum('f','m') NOT NULL DEFAULT 'f',
  3793. `email` char(90) NOT NULL DEFAULT '',
  3794. `skype` char(90) NOT NULL DEFAULT '',
  3795. `qq` char(20) NOT NULL DEFAULT '',
  3796. `mobile` char(11) NOT NULL DEFAULT '',
  3797. `phone` char(20) NOT NULL DEFAULT '',
  3798. `weixin` varchar(90) NOT NULL DEFAULT '',
  3799. `dingding` varchar(90) NOT NULL DEFAULT '',
  3800. `slack` varchar(90) NOT NULL DEFAULT '',
  3801. `whatsapp` varchar(90) NOT NULL DEFAULT '',
  3802. `address` char(120) NOT NULL DEFAULT '',
  3803. `zipcode` char(10) NOT NULL DEFAULT '',
  3804. `nature` text DEFAULT NULL,
  3805. `analysis` text DEFAULT NULL,
  3806. `strategy` text DEFAULT NULL,
  3807. `join` date DEFAULT NULL,
  3808. `visits` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3809. `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite',
  3810. `ip` char(15) NOT NULL DEFAULT '',
  3811. `last` int(10) unsigned NOT NULL DEFAULT 0,
  3812. `fails` tinyint(5) NOT NULL DEFAULT 0,
  3813. `locked` datetime DEFAULT NULL,
  3814. `feedback` enum('0','1') NOT NULL DEFAULT '0',
  3815. `ranzhi` char(30) NOT NULL DEFAULT '',
  3816. `ldap` char(30) NOT NULL DEFAULT '',
  3817. `score` int(11) NOT NULL DEFAULT 0,
  3818. `scoreLevel` int(11) NOT NULL DEFAULT 0,
  3819. `resetToken` varchar(50) NOT NULL DEFAULT '',
  3820. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3821. `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline',
  3822. `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn',
  3823. PRIMARY KEY (`id`),
  3824. UNIQUE KEY `account` (`account`),
  3825. KEY `dept` (`dept`),
  3826. KEY `email` (`email`),
  3827. KEY `commiter` (`commiter`),
  3828. KEY `deleted` (`deleted`)
  3829. ) ENGINE=InnoDB;
  3830. CREATE TABLE `zt_usercontact` (
  3831. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3832. `account` char(30) NOT NULL DEFAULT '',
  3833. `listName` varchar(60) NOT NULL DEFAULT '',
  3834. `userList` text DEFAULT NULL,
  3835. PRIMARY KEY (`id`),
  3836. KEY `account` (`account`)
  3837. ) ENGINE=InnoDB;
  3838. CREATE TABLE `zt_usergroup` (
  3839. `account` char(30) NOT NULL DEFAULT '',
  3840. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3841. `project` text DEFAULT NULL,
  3842. UNIQUE KEY `account` (`account`,`group`)
  3843. ) ENGINE=InnoDB;
  3844. CREATE TABLE `zt_userquery` (
  3845. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3846. `account` char(30) NOT NULL DEFAULT '',
  3847. `module` varchar(30) NOT NULL DEFAULT '',
  3848. `title` varchar(90) NOT NULL DEFAULT '',
  3849. `form` text DEFAULT NULL,
  3850. `sql` text DEFAULT NULL,
  3851. `shortcut` enum('0','1') NOT NULL DEFAULT '0',
  3852. `common` enum('0','1') NOT NULL DEFAULT '0',
  3853. PRIMARY KEY (`id`),
  3854. KEY `account` (`account`),
  3855. KEY `module` (`module`)
  3856. ) ENGINE=InnoDB;
  3857. CREATE TABLE `zt_usertpl` (
  3858. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3859. `account` char(30) NOT NULL DEFAULT '',
  3860. `type` char(30) NOT NULL DEFAULT '',
  3861. `title` varchar(150) NOT NULL DEFAULT '',
  3862. `content` text DEFAULT NULL,
  3863. `public` enum('0','1') NOT NULL DEFAULT '0',
  3864. PRIMARY KEY (`id`),
  3865. KEY `account` (`account`)
  3866. ) ENGINE=InnoDB;
  3867. CREATE TABLE `zt_userview` (
  3868. `account` char(30) NOT NULL DEFAULT '',
  3869. `programs` mediumtext DEFAULT NULL,
  3870. `products` mediumtext DEFAULT NULL,
  3871. `projects` mediumtext DEFAULT NULL,
  3872. `sprints` mediumtext DEFAULT NULL,
  3873. UNIQUE KEY `account` (`account`)
  3874. ) ENGINE=InnoDB;
  3875. CREATE TABLE `zt_webhook` (
  3876. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3877. `type` varchar(15) NOT NULL DEFAULT 'default',
  3878. `name` varchar(50) NOT NULL DEFAULT '',
  3879. `url` varchar(255) NOT NULL DEFAULT '',
  3880. `domain` varchar(255) NOT NULL DEFAULT '',
  3881. `secret` varchar(255) NOT NULL DEFAULT '',
  3882. `contentType` varchar(30) NOT NULL DEFAULT 'application/json',
  3883. `sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
  3884. `products` text DEFAULT NULL,
  3885. `executions` text DEFAULT NULL,
  3886. `params` varchar(100) NOT NULL DEFAULT '',
  3887. `actions` text DEFAULT NULL,
  3888. `desc` text DEFAULT NULL,
  3889. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3890. `createdDate` datetime DEFAULT NULL,
  3891. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3892. `editedDate` datetime DEFAULT NULL,
  3893. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3894. PRIMARY KEY (`id`)
  3895. ) ENGINE=InnoDB;
  3896. CREATE TABLE `zt_weeklyreport` (
  3897. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3898. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3899. `weekStart` date DEFAULT NULL,
  3900. `pv` float(9,2) NOT NULL DEFAULT 0.00,
  3901. `ev` float(9,2) NOT NULL DEFAULT 0.00,
  3902. `ac` float(9,2) NOT NULL DEFAULT 0.00,
  3903. `sv` float(9,2) NOT NULL DEFAULT 0.00,
  3904. `cv` float(9,2) NOT NULL DEFAULT 0.00,
  3905. `staff` smallint(5) unsigned NOT NULL DEFAULT 0,
  3906. `progress` varchar(255) NOT NULL DEFAULT '',
  3907. `workload` varchar(255) NOT NULL DEFAULT '',
  3908. PRIMARY KEY (`id`),
  3909. UNIQUE KEY `week` (`project`,`weekStart`)
  3910. ) ENGINE=InnoDB;
  3911. CREATE TABLE `zt_workestimation` (
  3912. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3913. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3914. `scale` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  3915. `productivity` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  3916. `duration` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  3917. `unitLaborCost` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  3918. `totalLaborCost` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  3919. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3920. `createdDate` datetime DEFAULT NULL,
  3921. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3922. `editedDate` datetime DEFAULT NULL,
  3923. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3924. `assignedDate` datetime DEFAULT NULL,
  3925. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3926. `dayHour` decimal(10,2) NOT NULL DEFAULT 0.00,
  3927. PRIMARY KEY (`id`)
  3928. ) ENGINE=InnoDB;
  3929. CREATE TABLE `zt_workflow` (
  3930. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3931. `parent` varchar(30) NOT NULL DEFAULT '',
  3932. `child` varchar(30) NOT NULL DEFAULT '',
  3933. `type` varchar(10) NOT NULL DEFAULT 'flow',
  3934. `navigator` varchar(10) NOT NULL DEFAULT '',
  3935. `app` varchar(20) NOT NULL DEFAULT '',
  3936. `position` varchar(30) NOT NULL DEFAULT '',
  3937. `module` varchar(30) NOT NULL DEFAULT '',
  3938. `table` varchar(50) NOT NULL DEFAULT '',
  3939. `name` varchar(30) NOT NULL DEFAULT '',
  3940. `titleField` varchar(30) NOT NULL DEFAULT '',
  3941. `contentField` text DEFAULT NULL,
  3942. `flowchart` text DEFAULT NULL,
  3943. `js` text DEFAULT NULL,
  3944. `css` text DEFAULT NULL,
  3945. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  3946. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  3947. `administrator` text DEFAULT NULL,
  3948. `desc` text DEFAULT NULL,
  3949. `version` varchar(10) NOT NULL DEFAULT '1.0',
  3950. `status` varchar(10) NOT NULL DEFAULT 'wait',
  3951. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3952. `approval` enum('enabled','disabled') NOT NULL DEFAULT 'disabled',
  3953. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3954. `createdDate` datetime DEFAULT NULL,
  3955. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3956. `editedDate` datetime DEFAULT NULL,
  3957. PRIMARY KEY (`id`),
  3958. UNIQUE KEY `unique` (`app`,`module`,`vision`),
  3959. KEY `type` (`type`),
  3960. KEY `app` (`app`),
  3961. KEY `module` (`module`),
  3962. KEY `order` (`order`)
  3963. ) ENGINE=InnoDB;
  3964. CREATE TABLE `zt_workflowaction` (
  3965. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3966. `module` varchar(30) NOT NULL DEFAULT '',
  3967. `action` varchar(50) NOT NULL DEFAULT '',
  3968. `method` varchar(50) NOT NULL DEFAULT '',
  3969. `name` varchar(50) NOT NULL DEFAULT '',
  3970. `type` enum('single','batch') NOT NULL DEFAULT 'single',
  3971. `batchMode` enum('same','different') NOT NULL DEFAULT 'different',
  3972. `extensionType` varchar(10) NOT NULL DEFAULT 'override' COMMENT 'none | extend | override',
  3973. `open` varchar(20) NOT NULL DEFAULT '',
  3974. `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview',
  3975. `layout` char(20) NOT NULL DEFAULT '',
  3976. `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist',
  3977. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  3978. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  3979. `role` varchar(10) NOT NULL DEFAULT 'custom',
  3980. `virtual` tinyint(1) unsigned NOT NULL DEFAULT 0,
  3981. `conditions` text DEFAULT NULL,
  3982. `verifications` text DEFAULT NULL,
  3983. `hooks` text DEFAULT NULL,
  3984. `linkages` text DEFAULT NULL,
  3985. `js` text DEFAULT NULL,
  3986. `css` text DEFAULT NULL,
  3987. `toList` char(255) NOT NULL DEFAULT '',
  3988. `blocks` text DEFAULT NULL,
  3989. `desc` text DEFAULT NULL,
  3990. `status` varchar(10) NOT NULL DEFAULT 'enable',
  3991. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3992. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3993. `createdDate` datetime DEFAULT NULL,
  3994. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3995. `editedDate` datetime DEFAULT NULL,
  3996. PRIMARY KEY (`id`),
  3997. UNIQUE KEY `unique` (`module`,`action`,`vision`),
  3998. KEY `module` (`module`),
  3999. KEY `action` (`action`),
  4000. KEY `order` (`order`)
  4001. ) ENGINE=InnoDB;
  4002. CREATE TABLE `zt_workflowdatasource` (
  4003. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4004. `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option',
  4005. `name` varchar(30) NOT NULL DEFAULT '',
  4006. `code` varchar(30) NOT NULL DEFAULT '',
  4007. `datasource` text DEFAULT NULL,
  4008. `view` varchar(20) NOT NULL DEFAULT '',
  4009. `keyField` varchar(50) NOT NULL DEFAULT '',
  4010. `valueField` varchar(50) NOT NULL DEFAULT '',
  4011. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4012. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  4013. `createdBy` char(30) NOT NULL DEFAULT '',
  4014. `createdDate` datetime DEFAULT NULL,
  4015. `editedBy` char(30) NOT NULL DEFAULT '',
  4016. `editedDate` datetime DEFAULT NULL,
  4017. PRIMARY KEY (`id`),
  4018. KEY `type` (`type`)
  4019. ) ENGINE=InnoDB;
  4020. CREATE TABLE `zt_workflowfield` (
  4021. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4022. `module` varchar(30) NOT NULL DEFAULT '',
  4023. `field` varchar(50) NOT NULL DEFAULT '',
  4024. `type` varchar(20) NOT NULL DEFAULT 'varchar',
  4025. `length` varchar(10) NOT NULL DEFAULT '',
  4026. `name` varchar(50) NOT NULL DEFAULT '',
  4027. `control` varchar(20) NOT NULL DEFAULT '',
  4028. `expression` text DEFAULT NULL,
  4029. `options` text DEFAULT NULL,
  4030. `default` varchar(100) NOT NULL DEFAULT '',
  4031. `rules` varchar(255) NOT NULL DEFAULT '',
  4032. `placeholder` varchar(100) NOT NULL DEFAULT '',
  4033. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4034. `searchOrder` smallint(5) unsigned NOT NULL DEFAULT 0,
  4035. `exportOrder` smallint(5) unsigned NOT NULL DEFAULT 0,
  4036. `canExport` enum('0','1') NOT NULL DEFAULT '0',
  4037. `canSearch` enum('0','1') NOT NULL DEFAULT '0',
  4038. `isValue` enum('0','1') NOT NULL DEFAULT '0',
  4039. `readonly` enum('0','1') NOT NULL DEFAULT '0',
  4040. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4041. `role` varchar(10) NOT NULL DEFAULT 'custom',
  4042. `desc` text DEFAULT NULL,
  4043. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4044. `createdDate` datetime DEFAULT NULL,
  4045. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4046. `editedDate` datetime DEFAULT NULL,
  4047. PRIMARY KEY (`id`),
  4048. UNIQUE KEY `unique` (`module`,`field`),
  4049. KEY `module` (`module`),
  4050. KEY `field` (`field`),
  4051. KEY `order` (`order`)
  4052. ) ENGINE=InnoDB;
  4053. CREATE TABLE `zt_workflowlabel` (
  4054. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4055. `module` varchar(30) NOT NULL DEFAULT '',
  4056. `action` varchar(30) NOT NULL DEFAULT 'browse',
  4057. `code` varchar(30) NOT NULL DEFAULT '',
  4058. `label` varchar(255) NOT NULL DEFAULT '',
  4059. `params` text DEFAULT NULL,
  4060. `orderBy` text DEFAULT NULL,
  4061. `order` tinyint(3) NOT NULL DEFAULT 0,
  4062. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4063. `role` varchar(10) NOT NULL DEFAULT 'custom',
  4064. `createdBy` char(30) NOT NULL DEFAULT '',
  4065. `createdDate` datetime DEFAULT NULL,
  4066. `editedBy` char(30) NOT NULL DEFAULT '',
  4067. `editedDate` datetime DEFAULT NULL,
  4068. PRIMARY KEY (`id`),
  4069. KEY `module` (`module`)
  4070. ) ENGINE=InnoDB;
  4071. CREATE TABLE `zt_workflowlayout` (
  4072. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4073. `module` varchar(30) NOT NULL DEFAULT '',
  4074. `action` varchar(50) NOT NULL DEFAULT '',
  4075. `field` varchar(50) NOT NULL DEFAULT '',
  4076. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4077. `width` varchar(50) NOT NULL DEFAULT '0',
  4078. `position` text DEFAULT NULL,
  4079. `readonly` enum('0','1') NOT NULL DEFAULT '0',
  4080. `mobileShow` enum('0','1') NOT NULL DEFAULT '1',
  4081. `summary` varchar(20) NOT NULL DEFAULT '',
  4082. `defaultValue` text DEFAULT NULL,
  4083. `layoutRules` varchar(255) NOT NULL DEFAULT '',
  4084. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  4085. PRIMARY KEY (`id`),
  4086. UNIQUE KEY `unique` (`module`,`action`,`field`,`vision`),
  4087. KEY `module` (`module`),
  4088. KEY `action` (`action`),
  4089. KEY `order` (`order`)
  4090. ) ENGINE=InnoDB;
  4091. CREATE TABLE `zt_workflowlinkdata` (
  4092. `objectType` varchar(30) NOT NULL DEFAULT '',
  4093. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4094. `linkedType` varchar(30) NOT NULL DEFAULT '',
  4095. `linkedID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4096. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4097. `createdDate` datetime DEFAULT NULL,
  4098. UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`)
  4099. ) ENGINE=InnoDB;
  4100. CREATE TABLE `zt_workflowrelation` (
  4101. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4102. `prev` varchar(30) NOT NULL DEFAULT '',
  4103. `next` varchar(30) NOT NULL DEFAULT '',
  4104. `field` varchar(50) NOT NULL DEFAULT '',
  4105. `actions` varchar(20) NOT NULL DEFAULT '',
  4106. `actionCodes` text DEFAULT NULL,
  4107. `buildin` enum('0','1') NOT NULL DEFAULT '0',
  4108. `createdBy` char(30) NOT NULL DEFAULT '',
  4109. `createdDate` datetime DEFAULT NULL,
  4110. PRIMARY KEY (`id`)
  4111. ) ENGINE=InnoDB;
  4112. CREATE TABLE `zt_workflowrelationlayout` (
  4113. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4114. `prev` varchar(30) NOT NULL DEFAULT '',
  4115. `next` varchar(30) NOT NULL DEFAULT '',
  4116. `action` varchar(50) NOT NULL DEFAULT '',
  4117. `field` varchar(50) NOT NULL DEFAULT '',
  4118. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4119. PRIMARY KEY (`id`),
  4120. UNIQUE KEY `unique` (`prev`,`next`,`action`,`field`),
  4121. KEY `prev` (`prev`),
  4122. KEY `next` (`next`),
  4123. KEY `action` (`action`),
  4124. KEY `order` (`order`)
  4125. ) ENGINE=InnoDB;
  4126. CREATE TABLE `zt_workflowreport` (
  4127. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4128. `module` varchar(30) NOT NULL COMMENT 'module name',
  4129. `name` varchar(100) NOT NULL COMMENT 'report name',
  4130. `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie' COMMENT 'report type',
  4131. `countType` enum('sum','count') NOT NULL DEFAULT 'sum' COMMENT 'report count method',
  4132. `displayType` enum('value','percent') NOT NULL DEFAULT 'value' COMMENT 'report display method',
  4133. `dimension` varchar(130) NOT NULL COMMENT 'dimension field code of zt_workflowfield',
  4134. `fields` text NOT NULL COMMENT 'count fileds code of zt_workflowfield,use comma split',
  4135. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4136. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4137. `createdDate` datetime DEFAULT NULL,
  4138. PRIMARY KEY (`id`)
  4139. ) ENGINE=InnoDB;
  4140. CREATE TABLE `zt_workflowrule` (
  4141. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4142. `type` enum('system','regex','func') NOT NULL DEFAULT 'regex',
  4143. `name` varchar(30) NOT NULL DEFAULT '',
  4144. `rule` text DEFAULT NULL,
  4145. `createdBy` char(30) NOT NULL DEFAULT '',
  4146. `createdDate` datetime DEFAULT NULL,
  4147. `editedBy` char(30) NOT NULL DEFAULT '',
  4148. `editedDate` datetime DEFAULT NULL,
  4149. PRIMARY KEY (`id`),
  4150. KEY `type` (`type`)
  4151. ) ENGINE=InnoDB;
  4152. CREATE TABLE `zt_workflowsql` (
  4153. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4154. `module` varchar(30) NOT NULL DEFAULT '',
  4155. `field` varchar(50) NOT NULL DEFAULT '',
  4156. `action` varchar(50) NOT NULL DEFAULT '',
  4157. `sql` text DEFAULT NULL,
  4158. `vars` text DEFAULT NULL,
  4159. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4160. `createdDate` datetime DEFAULT NULL,
  4161. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4162. `editedDate` datetime DEFAULT NULL,
  4163. PRIMARY KEY (`id`),
  4164. KEY `module` (`module`),
  4165. KEY `field` (`field`),
  4166. KEY `action` (`action`)
  4167. ) ENGINE=InnoDB;
  4168. CREATE TABLE `zt_workflowversion` (
  4169. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4170. `module` varchar(30) NOT NULL DEFAULT '',
  4171. `version` varchar(10) NOT NULL DEFAULT '',
  4172. `fields` text DEFAULT NULL,
  4173. `actions` text DEFAULT NULL,
  4174. `layouts` text DEFAULT NULL,
  4175. `sqls` text DEFAULT NULL,
  4176. `labels` text DEFAULT NULL,
  4177. `table` text DEFAULT NULL,
  4178. `datas` text DEFAULT NULL,
  4179. PRIMARY KEY (`id`),
  4180. UNIQUE KEY `moduleversion` (`module`,`version`),
  4181. KEY `module` (`module`),
  4182. KEY `version` (`version`)
  4183. ) ENGINE=InnoDB;
  4184. CREATE TABLE `zt_zoutput` (
  4185. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4186. `activity` mediumint(8) NOT NULL DEFAULT 0,
  4187. `name` varchar(255) NOT NULL DEFAULT '',
  4188. `content` mediumtext DEFAULT NULL,
  4189. `optional` char(20) NOT NULL DEFAULT '',
  4190. `tailorNorm` varchar(255) NOT NULL DEFAULT '',
  4191. `status` varchar(30) NOT NULL DEFAULT '',
  4192. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4193. `createdDate` datetime DEFAULT NULL,
  4194. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4195. `editedDate` datetime DEFAULT NULL,
  4196. `order` mediumint(8) DEFAULT 0,
  4197. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  4198. PRIMARY KEY (`id`)
  4199. ) ENGINE=InnoDB;