zentao21.7.2.sql 179 KB

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