zentao18.11.sql 167 KB

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