zentao21.3.sql 175 KB

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