zentao20.8.sql 173 KB

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