zentao21.5.sql 177 KB

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