zentao21.0.sql 174 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467
  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. `orderBy` varchar(30) NOT NULL DEFAULT 'id_asc',
  1466. PRIMARY KEY (`id`),
  1467. KEY `product` (`product`),
  1468. KEY `execution` (`execution`)
  1469. ) ENGINE=InnoDB;
  1470. CREATE TABLE `zt_domain` (
  1471. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  1472. `domain` varchar(255) NOT NULL DEFAULT '',
  1473. `adminURI` varchar(255) NOT NULL DEFAULT '',
  1474. `resolverURI` varchar(255) NOT NULL DEFAULT '',
  1475. `register` varchar(255) NOT NULL DEFAULT '',
  1476. `expiredDate` datetime DEFAULT NULL,
  1477. `renew` varchar(255) NOT NULL DEFAULT '',
  1478. `account` varchar(255) NOT NULL DEFAULT '',
  1479. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1480. `createdDate` datetime DEFAULT NULL,
  1481. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1482. `editedDate` datetime DEFAULT NULL,
  1483. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1484. PRIMARY KEY (`id`),
  1485. KEY `domain` (`domain`)
  1486. ) ENGINE=InnoDB;
  1487. CREATE TABLE `zt_duckdbqueue` (
  1488. `object` varchar(255) NOT NULL DEFAULT '',
  1489. `updatedTime` datetime DEFAULT NULL,
  1490. `syncTime` datetime DEFAULT NULL,
  1491. UNIQUE KEY `object` (`object`)
  1492. ) ENGINE=InnoDB;
  1493. CREATE TABLE `zt_durationestimation` (
  1494. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1495. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1496. `stage` mediumint(9) NOT NULL DEFAULT 0,
  1497. `workload` varchar(255) NOT NULL DEFAULT '',
  1498. `worktimeRate` varchar(255) NOT NULL DEFAULT '',
  1499. `people` varchar(255) NOT NULL DEFAULT '',
  1500. `startDate` date DEFAULT NULL,
  1501. `endDate` date DEFAULT NULL,
  1502. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1503. `createdDate` datetime DEFAULT NULL,
  1504. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1505. `editedDate` datetime DEFAULT NULL,
  1506. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1507. PRIMARY KEY (`id`)
  1508. ) ENGINE=InnoDB;
  1509. CREATE TABLE `zt_effort` (
  1510. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1511. `objectType` varchar(30) NOT NULL DEFAULT '',
  1512. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1513. `product` text DEFAULT NULL,
  1514. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1515. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1516. `account` varchar(30) NOT NULL DEFAULT '',
  1517. `work` text DEFAULT NULL,
  1518. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  1519. `date` date DEFAULT NULL,
  1520. `left` float NOT NULL DEFAULT 0,
  1521. `consumed` float NOT NULL DEFAULT 0,
  1522. `begin` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  1523. `end` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  1524. `extra` text DEFAULT NULL,
  1525. `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
  1526. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1527. PRIMARY KEY (`id`),
  1528. KEY `execution` (`execution`),
  1529. KEY `objectID` (`objectID`),
  1530. KEY `date` (`date`),
  1531. KEY `account` (`account`)
  1532. ) ENGINE=InnoDB;
  1533. CREATE TABLE `zt_entry` (
  1534. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1535. `name` varchar(50) NOT NULL DEFAULT '',
  1536. `account` varchar(30) NOT NULL DEFAULT '',
  1537. `code` varchar(20) NOT NULL DEFAULT '',
  1538. `key` varchar(32) NOT NULL DEFAULT '',
  1539. `freePasswd` enum('0','1') NOT NULL DEFAULT '0',
  1540. `ip` varchar(100) NOT NULL DEFAULT '',
  1541. `desc` mediumtext DEFAULT NULL,
  1542. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1543. `createdDate` datetime DEFAULT NULL,
  1544. `calledTime` int(11) unsigned NOT NULL DEFAULT 0,
  1545. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1546. `editedDate` datetime DEFAULT NULL,
  1547. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1548. PRIMARY KEY (`id`)
  1549. ) ENGINE=InnoDB;
  1550. CREATE TABLE `zt_expect` (
  1551. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  1552. `userID` mediumint(8) NOT NULL DEFAULT 0,
  1553. `project` mediumint(8) NOT NULL DEFAULT 0,
  1554. `expect` text DEFAULT NULL,
  1555. `progress` text DEFAULT NULL,
  1556. `createdBy` char(30) NOT NULL DEFAULT '',
  1557. `createdDate` date DEFAULT NULL,
  1558. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1559. PRIMARY KEY (`id`)
  1560. ) ENGINE=InnoDB;
  1561. CREATE TABLE `zt_extension` (
  1562. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1563. `name` varchar(150) NOT NULL DEFAULT '',
  1564. `code` varchar(30) NOT NULL DEFAULT '',
  1565. `version` varchar(50) NOT NULL DEFAULT '',
  1566. `author` varchar(100) NOT NULL DEFAULT '',
  1567. `desc` mediumtext DEFAULT NULL,
  1568. `license` text DEFAULT NULL,
  1569. `type` varchar(20) NOT NULL DEFAULT 'extension',
  1570. `site` varchar(150) NOT NULL DEFAULT '',
  1571. `zentaoCompatible` text DEFAULT NULL,
  1572. `installedTime` datetime DEFAULT NULL,
  1573. `depends` varchar(100) NOT NULL DEFAULT '',
  1574. `dirs` mediumtext DEFAULT NULL,
  1575. `files` mediumtext DEFAULT NULL,
  1576. `status` varchar(20) NOT NULL DEFAULT '',
  1577. PRIMARY KEY (`id`),
  1578. UNIQUE KEY `code` (`code`),
  1579. KEY `name` (`name`),
  1580. KEY `installedTime` (`installedTime`)
  1581. ) ENGINE=InnoDB;
  1582. CREATE TABLE `zt_faq` (
  1583. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  1584. `module` mediumint(9) NOT NULL DEFAULT 0,
  1585. `product` mediumint(9) NOT NULL DEFAULT 0,
  1586. `question` varchar(255) NOT NULL DEFAULT '',
  1587. `answer` text DEFAULT NULL,
  1588. `addedtime` datetime DEFAULT NULL,
  1589. PRIMARY KEY (`id`)
  1590. ) ENGINE=InnoDB;
  1591. CREATE TABLE `zt_feedback` (
  1592. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1593. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1594. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1595. `title` varchar(255) NOT NULL DEFAULT '',
  1596. `type` char(30) NOT NULL DEFAULT '',
  1597. `solution` char(30) NOT NULL DEFAULT '',
  1598. `desc` text DEFAULT NULL,
  1599. `pri` tinyint(3) unsigned NOT NULL DEFAULT 2,
  1600. `status` varchar(30) NOT NULL DEFAULT '',
  1601. `subStatus` varchar(30) NOT NULL DEFAULT '',
  1602. `public` enum('0','1') NOT NULL DEFAULT '0',
  1603. `notify` enum('0','1') NOT NULL DEFAULT '0',
  1604. `notifyEmail` varchar(100) NOT NULL DEFAULT '',
  1605. `source` varchar(255) NOT NULL DEFAULT '',
  1606. `likes` text DEFAULT NULL,
  1607. `result` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1608. `faq` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1609. `openedBy` char(30) NOT NULL DEFAULT '',
  1610. `openedDate` datetime DEFAULT NULL,
  1611. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  1612. `reviewedDate` datetime DEFAULT NULL,
  1613. `processedBy` char(30) NOT NULL DEFAULT '',
  1614. `processedDate` datetime DEFAULT NULL,
  1615. `closedBy` char(30) NOT NULL DEFAULT '',
  1616. `closedDate` datetime DEFAULT NULL,
  1617. `closedReason` varchar(30) NOT NULL DEFAULT '',
  1618. `editedBy` char(30) NOT NULL DEFAULT '',
  1619. `editedDate` datetime DEFAULT NULL,
  1620. `assignedTo` varchar(255) NOT NULL DEFAULT '',
  1621. `assignedDate` datetime DEFAULT NULL,
  1622. `activatedBy` varchar(30) NOT NULL DEFAULT '',
  1623. `activatedDate` datetime DEFAULT NULL,
  1624. `feedbackBy` varchar(100) NOT NULL DEFAULT '',
  1625. `repeatFeedback` mediumint(8) NOT NULL DEFAULT 0,
  1626. `mailto` varchar(255) NOT NULL DEFAULT '',
  1627. `keywords` varchar(255) NOT NULL DEFAULT '',
  1628. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1629. PRIMARY KEY (`id`)
  1630. ) ENGINE=InnoDB;
  1631. CREATE TABLE `zt_feedbackview` (
  1632. `account` char(30) NOT NULL DEFAULT '',
  1633. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1634. UNIQUE KEY `account_product` (`account`,`product`)
  1635. ) ENGINE=InnoDB;
  1636. CREATE TABLE `zt_file` (
  1637. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1638. `pathname` char(100) NOT NULL DEFAULT '',
  1639. `title` varchar(255) NOT NULL DEFAULT '',
  1640. `extension` char(30) NOT NULL DEFAULT '',
  1641. `size` int(11) unsigned NOT NULL DEFAULT 0,
  1642. `objectType` char(30) NOT NULL DEFAULT '',
  1643. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  1644. `addedBy` char(30) NOT NULL DEFAULT '',
  1645. `addedDate` datetime DEFAULT NULL,
  1646. `downloads` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1647. `extra` varchar(255) NOT NULL DEFAULT '',
  1648. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1649. PRIMARY KEY (`id`),
  1650. KEY `objectType` (`objectType`),
  1651. KEY `objectID` (`objectID`)
  1652. ) ENGINE=InnoDB;
  1653. CREATE TABLE `zt_gapanalysis` (
  1654. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1655. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1656. `account` varchar(30) NOT NULL DEFAULT '',
  1657. `role` varchar(20) NOT NULL DEFAULT '',
  1658. `analysis` mediumtext DEFAULT NULL,
  1659. `needTrain` enum('no','yes') NOT NULL DEFAULT 'no',
  1660. `createdBy` char(30) NOT NULL DEFAULT '',
  1661. `createdDate` datetime DEFAULT NULL,
  1662. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1663. `editedDate` datetime DEFAULT NULL,
  1664. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1665. PRIMARY KEY (`id`),
  1666. UNIQUE KEY `project_account` (`project`,`account`)
  1667. ) ENGINE=InnoDB;
  1668. CREATE TABLE `zt_group` (
  1669. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1670. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1671. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  1672. `name` char(30) NOT NULL DEFAULT '',
  1673. `role` char(30) NOT NULL DEFAULT '',
  1674. `desc` char(255) NOT NULL DEFAULT '',
  1675. `acl` text DEFAULT NULL,
  1676. `developer` enum('0','1') NOT NULL DEFAULT '1',
  1677. PRIMARY KEY (`id`)
  1678. ) ENGINE=InnoDB;
  1679. CREATE TABLE `zt_grouppriv` (
  1680. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1681. `module` char(30) NOT NULL DEFAULT '',
  1682. `method` char(30) NOT NULL DEFAULT '',
  1683. UNIQUE KEY `group` (`group`,`module`,`method`)
  1684. ) ENGINE=InnoDB;
  1685. CREATE TABLE `zt_history` (
  1686. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1687. `action` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1688. `field` varchar(30) NOT NULL DEFAULT '',
  1689. `old` text DEFAULT NULL,
  1690. `oldValue` text DEFAULT NULL,
  1691. `new` text DEFAULT NULL,
  1692. `newValue` text DEFAULT NULL,
  1693. `diff` mediumtext DEFAULT NULL,
  1694. PRIMARY KEY (`id`),
  1695. KEY `action` (`action`)
  1696. ) ENGINE=InnoDB;
  1697. CREATE TABLE `zt_holiday` (
  1698. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1699. `name` varchar(30) NOT NULL DEFAULT '',
  1700. `type` enum('holiday','working') NOT NULL DEFAULT 'holiday',
  1701. `desc` text DEFAULT NULL,
  1702. `year` char(4) NOT NULL DEFAULT '',
  1703. `begin` date DEFAULT NULL,
  1704. `end` date DEFAULT NULL,
  1705. PRIMARY KEY (`id`),
  1706. KEY `year` (`year`),
  1707. KEY `name` (`name`)
  1708. ) ENGINE=InnoDB;
  1709. CREATE TABLE `zt_host` (
  1710. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1711. `name` varchar(255) NOT NULL DEFAULT '',
  1712. `type` varchar(30) NOT NULL DEFAULT 'normal',
  1713. `hostType` varchar(30) NOT NULL DEFAULT '',
  1714. `mac` varchar(128) NOT NULL DEFAULT '',
  1715. `memory` varchar(30) NOT NULL DEFAULT '',
  1716. `diskSize` varchar(30) NOT NULL DEFAULT '',
  1717. `status` varchar(50) NOT NULL DEFAULT '',
  1718. `secret` varchar(50) NOT NULL DEFAULT '',
  1719. `desc` text DEFAULT NULL,
  1720. `tokenSN` varchar(50) NOT NULL DEFAULT '',
  1721. `tokenTime` datetime DEFAULT NULL,
  1722. `oldTokenSN` varchar(50) NOT NULL DEFAULT '',
  1723. `vsoft` varchar(30) NOT NULL DEFAULT '',
  1724. `heartbeat` datetime DEFAULT NULL,
  1725. `zap` varchar(10) NOT NULL DEFAULT '',
  1726. `provider` varchar(255) NOT NULL DEFAULT '',
  1727. `vnc` int(11) NOT NULL DEFAULT 0,
  1728. `ztf` int(11) NOT NULL DEFAULT 0,
  1729. `zd` int(11) NOT NULL DEFAULT 0,
  1730. `ssh` int(11) NOT NULL DEFAULT 0,
  1731. `parent` int(11) unsigned NOT NULL DEFAULT 0,
  1732. `image` int(11) unsigned NOT NULL DEFAULT 0,
  1733. `admin` smallint(5) unsigned NOT NULL DEFAULT 0,
  1734. `serverRoom` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1735. `serverModel` varchar(256) NOT NULL DEFAULT '',
  1736. `hardwareType` varchar(64) NOT NULL DEFAULT '',
  1737. `cpuBrand` varchar(128) NOT NULL DEFAULT '',
  1738. `cpuModel` varchar(128) NOT NULL DEFAULT '',
  1739. `cpuNumber` varchar(16) NOT NULL DEFAULT '',
  1740. `cpuCores` varchar(30) NOT NULL DEFAULT '',
  1741. `intranet` varchar(128) NOT NULL DEFAULT '',
  1742. `extranet` varchar(128) NOT NULL DEFAULT '',
  1743. `osName` varchar(64) NOT NULL DEFAULT '',
  1744. `osVersion` varchar(64) NOT NULL DEFAULT '',
  1745. `group` varchar(128) NOT NULL DEFAULT '',
  1746. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1747. `createdDate` datetime DEFAULT NULL,
  1748. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1749. `editedDate` datetime DEFAULT NULL,
  1750. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1751. PRIMARY KEY (`id`)
  1752. ) ENGINE=InnoDB;
  1753. CREATE TABLE `zt_image` (
  1754. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1755. `host` int(11) unsigned NOT NULL DEFAULT 0,
  1756. `name` varchar(64) NOT NULL DEFAULT '',
  1757. `localName` varchar(64) NOT NULL DEFAULT '',
  1758. `address` varchar(64) NOT NULL DEFAULT '',
  1759. `path` varchar(64) NOT NULL DEFAULT '',
  1760. `status` varchar(20) NOT NULL DEFAULT '',
  1761. `osName` varchar(32) NOT NULL DEFAULT '',
  1762. `from` varchar(10) NOT NULL DEFAULT 'zentao',
  1763. `memory` float unsigned NOT NULL DEFAULT 0,
  1764. `disk` float unsigned NOT NULL DEFAULT 0,
  1765. `fileSize` float unsigned NOT NULL DEFAULT 0,
  1766. `md5` varchar(64) NOT NULL DEFAULT '',
  1767. `desc` text DEFAULT NULL,
  1768. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1769. `createdDate` datetime DEFAULT NULL,
  1770. `restoreDate` datetime DEFAULT NULL,
  1771. PRIMARY KEY (`id`)
  1772. ) ENGINE=InnoDB;
  1773. CREATE TABLE `zt_instance` (
  1774. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1775. `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1776. `solution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1777. `name` char(50) NOT NULL DEFAULT '',
  1778. `appID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1779. `appName` char(50) NOT NULL DEFAULT '',
  1780. `appVersion` char(20) NOT NULL DEFAULT '',
  1781. `chart` char(50) NOT NULL DEFAULT '',
  1782. `logo` varchar(255) NOT NULL DEFAULT '',
  1783. `version` char(50) NOT NULL DEFAULT '',
  1784. `desc` text DEFAULT NULL,
  1785. `introduction` text DEFAULT NULL,
  1786. `source` char(20) NOT NULL DEFAULT '',
  1787. `channel` char(20) NOT NULL DEFAULT '',
  1788. `k8name` char(64) NOT NULL DEFAULT '',
  1789. `status` char(20) NOT NULL DEFAULT '',
  1790. `pinned` enum('0','1') NOT NULL DEFAULT '0',
  1791. `domain` char(255) NOT NULL DEFAULT '',
  1792. `smtpSnippetName` char(30) NOT NULL DEFAULT '',
  1793. `ldapSnippetName` char(30) NOT NULL DEFAULT '',
  1794. `ldapSettings` text DEFAULT NULL,
  1795. `dbSettings` text DEFAULT NULL,
  1796. `autoBackup` tinyint(1) NOT NULL DEFAULT 0,
  1797. `backupKeepDays` int(10) unsigned NOT NULL DEFAULT 1,
  1798. `autoRestore` tinyint(1) NOT NULL DEFAULT 0,
  1799. `env` text DEFAULT NULL,
  1800. `createdBy` char(30) NOT NULL DEFAULT '',
  1801. `createdAt` datetime DEFAULT NULL,
  1802. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  1803. PRIMARY KEY (`id`),
  1804. KEY `space` (`space`),
  1805. KEY `k8name` (`k8name`)
  1806. ) ENGINE=InnoDB;
  1807. CREATE TABLE `zt_intervention` (
  1808. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  1809. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1810. `activity` mediumint(8) NOT NULL DEFAULT 0,
  1811. `status` char(30) NOT NULL DEFAULT '',
  1812. `partake` text DEFAULT NULL,
  1813. `begin` date DEFAULT NULL,
  1814. `realBegin` date DEFAULT NULL,
  1815. `situation` varchar(255) NOT NULL DEFAULT '',
  1816. `createdBy` char(30) NOT NULL DEFAULT '',
  1817. `createdDate` date DEFAULT NULL,
  1818. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1819. PRIMARY KEY (`id`),
  1820. UNIQUE KEY `project` (`project`,`activity`)
  1821. ) ENGINE=InnoDB;
  1822. CREATE TABLE `zt_issue` (
  1823. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1824. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  1825. `project` varchar(255) NOT NULL DEFAULT '',
  1826. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1827. `title` varchar(255) NOT NULL DEFAULT '',
  1828. `desc` mediumtext DEFAULT NULL,
  1829. `pri` char(30) NOT NULL DEFAULT '',
  1830. `severity` char(30) NOT NULL DEFAULT '',
  1831. `type` char(30) NOT NULL DEFAULT '',
  1832. `activity` varchar(255) NOT NULL DEFAULT '',
  1833. `deadline` date DEFAULT NULL,
  1834. `resolution` char(30) NOT NULL DEFAULT '',
  1835. `resolutionComment` text DEFAULT NULL,
  1836. `objectID` varchar(255) NOT NULL DEFAULT '',
  1837. `resolvedDate` date DEFAULT NULL,
  1838. `status` varchar(30) NOT NULL DEFAULT '',
  1839. `owner` varchar(255) NOT NULL DEFAULT '',
  1840. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1841. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1842. `version` smallint(6) NOT NULL DEFAULT 1,
  1843. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1844. `createdDate` datetime DEFAULT NULL,
  1845. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1846. `editedDate` datetime DEFAULT NULL,
  1847. `activateBy` varchar(30) NOT NULL DEFAULT '',
  1848. `activateDate` date DEFAULT NULL,
  1849. `closedBy` varchar(30) NOT NULL DEFAULT '',
  1850. `closedDate` date DEFAULT NULL,
  1851. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  1852. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  1853. `assignedDate` datetime DEFAULT NULL,
  1854. `approvedDate` date DEFAULT NULL,
  1855. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1856. PRIMARY KEY (`id`)
  1857. ) ENGINE=InnoDB;
  1858. CREATE TABLE `zt_job` (
  1859. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1860. `name` varchar(50) NOT NULL DEFAULT '',
  1861. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1862. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1863. `frame` varchar(20) NOT NULL DEFAULT '',
  1864. `engine` varchar(20) NOT NULL DEFAULT '',
  1865. `autoRun` enum('0','1') NOT NULL DEFAULT '1',
  1866. `server` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1867. `pipeline` varchar(500) NOT NULL DEFAULT '',
  1868. `triggerType` varchar(255) NOT NULL DEFAULT '',
  1869. `sonarqubeServer` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1870. `projectKey` varchar(255) NOT NULL DEFAULT '',
  1871. `svnDir` varchar(255) NOT NULL DEFAULT '',
  1872. `atDay` varchar(255) NOT NULL DEFAULT '',
  1873. `atTime` varchar(10) NOT NULL DEFAULT '',
  1874. `customParam` text DEFAULT NULL,
  1875. `comment` varchar(255) NOT NULL DEFAULT '',
  1876. `triggerActions` varchar(255) NOT NULL DEFAULT '',
  1877. `createdBy` varchar(30) NOT NULL DEFAULT '',
  1878. `createdDate` datetime DEFAULT NULL,
  1879. `editedBy` varchar(30) NOT NULL DEFAULT '',
  1880. `editedDate` datetime DEFAULT NULL,
  1881. `lastExec` datetime DEFAULT NULL,
  1882. `lastStatus` varchar(255) NOT NULL DEFAULT '',
  1883. `lastTag` varchar(255) NOT NULL DEFAULT '',
  1884. `lastSyncDate` datetime DEFAULT NULL,
  1885. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1886. PRIMARY KEY (`id`),
  1887. KEY `idx_repo_deleted` (`repo`,`deleted`)
  1888. ) ENGINE=InnoDB;
  1889. CREATE TABLE `zt_kanban` (
  1890. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1891. `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1892. `name` varchar(255) NOT NULL DEFAULT '',
  1893. `owner` varchar(30) NOT NULL DEFAULT '',
  1894. `team` text DEFAULT NULL,
  1895. `desc` mediumtext DEFAULT NULL,
  1896. `acl` char(30) NOT NULL DEFAULT 'open',
  1897. `whitelist` text DEFAULT NULL,
  1898. `archived` enum('0','1') NOT NULL DEFAULT '1',
  1899. `performable` enum('0','1') NOT NULL DEFAULT '0',
  1900. `status` enum('active','closed') NOT NULL DEFAULT 'active',
  1901. `order` mediumint(8) NOT NULL DEFAULT 0,
  1902. `displayCards` smallint(6) NOT NULL DEFAULT 0,
  1903. `showWIP` enum('0','1') NOT NULL DEFAULT '1',
  1904. `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
  1905. `colWidth` smallint(4) NOT NULL DEFAULT 264,
  1906. `minColWidth` smallint(4) NOT NULL DEFAULT 200,
  1907. `maxColWidth` smallint(4) NOT NULL DEFAULT 384,
  1908. `object` varchar(255) NOT NULL DEFAULT '',
  1909. `alignment` varchar(10) NOT NULL DEFAULT 'center',
  1910. `createdBy` char(30) NOT NULL DEFAULT '',
  1911. `createdDate` datetime DEFAULT NULL,
  1912. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  1913. `lastEditedDate` datetime DEFAULT NULL,
  1914. `closedBy` char(30) NOT NULL DEFAULT '',
  1915. `closedDate` datetime DEFAULT NULL,
  1916. `activatedBy` char(30) NOT NULL DEFAULT '',
  1917. `activatedDate` datetime DEFAULT NULL,
  1918. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1919. PRIMARY KEY (`id`)
  1920. ) ENGINE=InnoDB;
  1921. CREATE TABLE `zt_kanbancard` (
  1922. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1923. `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1924. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1925. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1926. `fromID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1927. `fromType` varchar(30) NOT NULL DEFAULT '',
  1928. `name` varchar(255) NOT NULL DEFAULT '',
  1929. `status` varchar(30) NOT NULL DEFAULT 'doing',
  1930. `pri` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1931. `assignedTo` text DEFAULT NULL,
  1932. `desc` mediumtext DEFAULT NULL,
  1933. `begin` date DEFAULT NULL,
  1934. `end` date DEFAULT NULL,
  1935. `estimate` float unsigned NOT NULL DEFAULT 0,
  1936. `progress` float unsigned NOT NULL DEFAULT 0,
  1937. `color` char(7) NOT NULL DEFAULT '',
  1938. `acl` char(30) NOT NULL DEFAULT 'open',
  1939. `whitelist` text DEFAULT NULL,
  1940. `order` mediumint(8) NOT NULL DEFAULT 0,
  1941. `archived` enum('0','1') NOT NULL DEFAULT '0',
  1942. `createdBy` char(30) NOT NULL DEFAULT '',
  1943. `createdDate` datetime DEFAULT NULL,
  1944. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  1945. `lastEditedDate` datetime DEFAULT NULL,
  1946. `archivedBy` char(30) NOT NULL DEFAULT '',
  1947. `archivedDate` datetime DEFAULT NULL,
  1948. `assignedBy` char(30) NOT NULL DEFAULT '',
  1949. `assignedDate` datetime DEFAULT NULL,
  1950. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1951. PRIMARY KEY (`id`)
  1952. ) ENGINE=InnoDB;
  1953. CREATE TABLE `zt_kanbancell` (
  1954. `id` int(8) NOT NULL AUTO_INCREMENT,
  1955. `kanban` mediumint(8) NOT NULL DEFAULT 0,
  1956. `lane` mediumint(8) NOT NULL DEFAULT 0,
  1957. `column` mediumint(8) NOT NULL DEFAULT 0,
  1958. `type` char(30) NOT NULL DEFAULT '',
  1959. `cards` mediumtext DEFAULT NULL,
  1960. PRIMARY KEY (`id`),
  1961. UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`)
  1962. ) ENGINE=InnoDB;
  1963. CREATE TABLE `zt_kanbancolumn` (
  1964. `id` int(8) NOT NULL AUTO_INCREMENT,
  1965. `parent` mediumint(8) NOT NULL DEFAULT 0,
  1966. `type` char(30) NOT NULL DEFAULT '',
  1967. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1968. `group` mediumint(8) NOT NULL DEFAULT 0,
  1969. `name` varchar(255) NOT NULL DEFAULT '',
  1970. `color` char(30) NOT NULL DEFAULT '',
  1971. `limit` smallint(6) NOT NULL DEFAULT -1,
  1972. `order` mediumint(8) NOT NULL DEFAULT 0,
  1973. `archived` enum('0','1') NOT NULL DEFAULT '0',
  1974. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1975. PRIMARY KEY (`id`)
  1976. ) ENGINE=InnoDB;
  1977. CREATE TABLE `zt_kanbangroup` (
  1978. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1979. `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1980. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1981. `order` smallint(6) NOT NULL DEFAULT 0,
  1982. PRIMARY KEY (`id`)
  1983. ) ENGINE=InnoDB;
  1984. CREATE TABLE `zt_kanbanlane` (
  1985. `id` int(8) NOT NULL AUTO_INCREMENT,
  1986. `execution` mediumint(8) NOT NULL DEFAULT 0,
  1987. `type` char(30) NOT NULL DEFAULT '',
  1988. `region` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1989. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  1990. `groupby` char(30) NOT NULL DEFAULT '',
  1991. `extra` char(30) NOT NULL DEFAULT '',
  1992. `name` varchar(255) NOT NULL DEFAULT '',
  1993. `color` char(30) NOT NULL DEFAULT '',
  1994. `order` smallint(6) NOT NULL DEFAULT 0,
  1995. `lastEditedTime` datetime DEFAULT NULL,
  1996. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  1997. PRIMARY KEY (`id`)
  1998. ) ENGINE=InnoDB;
  1999. CREATE TABLE `zt_kanbanregion` (
  2000. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2001. `space` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2002. `kanban` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2003. `name` varchar(255) NOT NULL DEFAULT '',
  2004. `order` mediumint(8) NOT NULL DEFAULT 0,
  2005. `createdBy` char(30) NOT NULL DEFAULT '',
  2006. `createdDate` datetime DEFAULT NULL,
  2007. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  2008. `lastEditedDate` datetime DEFAULT NULL,
  2009. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2010. PRIMARY KEY (`id`)
  2011. ) ENGINE=InnoDB;
  2012. CREATE TABLE `zt_kanbanspace` (
  2013. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2014. `name` varchar(255) NOT NULL DEFAULT '',
  2015. `type` varchar(50) NOT NULL DEFAULT '',
  2016. `owner` varchar(30) NOT NULL DEFAULT '',
  2017. `team` text DEFAULT NULL,
  2018. `desc` mediumtext DEFAULT NULL,
  2019. `acl` char(30) NOT NULL DEFAULT 'open',
  2020. `whitelist` text DEFAULT NULL,
  2021. `status` enum('active','closed') NOT NULL DEFAULT 'active',
  2022. `order` mediumint(8) NOT NULL DEFAULT 0,
  2023. `createdBy` char(30) NOT NULL DEFAULT '',
  2024. `createdDate` datetime DEFAULT NULL,
  2025. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  2026. `lastEditedDate` datetime DEFAULT NULL,
  2027. `closedBy` char(30) NOT NULL DEFAULT '',
  2028. `closedDate` datetime DEFAULT NULL,
  2029. `activatedBy` char(30) NOT NULL DEFAULT '',
  2030. `activatedDate` datetime DEFAULT NULL,
  2031. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2032. PRIMARY KEY (`id`)
  2033. ) ENGINE=InnoDB;
  2034. CREATE TABLE `zt_lang` (
  2035. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2036. `lang` varchar(30) NOT NULL DEFAULT '',
  2037. `module` varchar(30) NOT NULL DEFAULT '',
  2038. `section` varchar(50) NOT NULL DEFAULT '',
  2039. `key` varchar(60) NOT NULL DEFAULT '',
  2040. `value` text DEFAULT NULL,
  2041. `system` enum('0','1') NOT NULL DEFAULT '1',
  2042. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  2043. PRIMARY KEY (`id`),
  2044. UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`)
  2045. ) ENGINE=InnoDB;
  2046. CREATE TABLE `zt_leave` (
  2047. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2048. `year` char(4) NOT NULL DEFAULT '',
  2049. `begin` date DEFAULT NULL,
  2050. `end` date DEFAULT NULL,
  2051. `start` time DEFAULT NULL,
  2052. `finish` time DEFAULT NULL,
  2053. `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
  2054. `backDate` datetime DEFAULT NULL,
  2055. `type` varchar(30) NOT NULL DEFAULT '',
  2056. `desc` text DEFAULT NULL,
  2057. `status` varchar(30) NOT NULL DEFAULT '',
  2058. `createdBy` char(30) NOT NULL DEFAULT '',
  2059. `createdDate` datetime DEFAULT NULL,
  2060. `reviewedBy` char(30) NOT NULL DEFAULT '',
  2061. `reviewedDate` datetime DEFAULT NULL,
  2062. `level` tinyint(3) NOT NULL DEFAULT 0,
  2063. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2064. `reviewers` text DEFAULT NULL,
  2065. `backReviewers` text DEFAULT NULL,
  2066. PRIMARY KEY (`id`),
  2067. KEY `year` (`year`),
  2068. KEY `type` (`type`),
  2069. KEY `status` (`status`),
  2070. KEY `createdBy` (`createdBy`)
  2071. ) ENGINE=InnoDB;
  2072. CREATE TABLE `zt_lieu` (
  2073. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2074. `year` char(4) NOT NULL DEFAULT '',
  2075. `begin` date DEFAULT NULL,
  2076. `end` date DEFAULT NULL,
  2077. `start` time DEFAULT NULL,
  2078. `finish` time DEFAULT NULL,
  2079. `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
  2080. `overtime` char(255) NOT NULL DEFAULT '',
  2081. `trip` char(255) NOT NULL DEFAULT '',
  2082. `desc` text DEFAULT NULL,
  2083. `status` varchar(30) NOT NULL DEFAULT '',
  2084. `createdBy` char(30) NOT NULL DEFAULT '',
  2085. `createdDate` datetime DEFAULT NULL,
  2086. `reviewedBy` char(30) NOT NULL DEFAULT '',
  2087. `reviewedDate` datetime DEFAULT NULL,
  2088. `level` tinyint(3) NOT NULL DEFAULT 0,
  2089. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2090. `reviewers` text DEFAULT NULL,
  2091. PRIMARY KEY (`id`),
  2092. KEY `year` (`year`),
  2093. KEY `status` (`status`),
  2094. KEY `createdBy` (`createdBy`)
  2095. ) ENGINE=InnoDB;
  2096. CREATE TABLE `zt_log` (
  2097. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2098. `objectType` varchar(30) NOT NULL DEFAULT '',
  2099. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2100. `action` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2101. `date` datetime DEFAULT NULL,
  2102. `url` varchar(255) NOT NULL DEFAULT '',
  2103. `contentType` varchar(30) NOT NULL DEFAULT '',
  2104. `data` text DEFAULT NULL,
  2105. `result` text DEFAULT NULL,
  2106. PRIMARY KEY (`id`),
  2107. KEY `objectType` (`objectType`),
  2108. KEY `obejctID` (`objectID`)
  2109. ) ENGINE=InnoDB;
  2110. CREATE TABLE `zt_market` (
  2111. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2112. `name` varchar(255) NOT NULL DEFAULT '',
  2113. `industry` char(255) NOT NULL DEFAULT '',
  2114. `scale` decimal(10,2) NOT NULL DEFAULT 0.00,
  2115. `maturity` char(255) NOT NULL DEFAULT '',
  2116. `speed` varchar(255) NOT NULL DEFAULT '',
  2117. `competition` char(255) NOT NULL DEFAULT '',
  2118. `strategy` varchar(255) NOT NULL DEFAULT '',
  2119. `ppm` varchar(20) NOT NULL DEFAULT '',
  2120. `desc` mediumtext DEFAULT NULL,
  2121. `openedBy` varchar(30) NOT NULL DEFAULT '',
  2122. `openedDate` datetime DEFAULT NULL,
  2123. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  2124. `lastEditedDate` datetime DEFAULT NULL,
  2125. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2126. PRIMARY KEY (`id`)
  2127. ) ENGINE=InnoDB;
  2128. CREATE TABLE `zt_marketreport` (
  2129. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2130. `name` varchar(255) NOT NULL DEFAULT '',
  2131. `market` mediumint(8) NOT NULL DEFAULT 0,
  2132. `research` mediumint(8) NOT NULL DEFAULT 0,
  2133. `maturity` varchar(30) NOT NULL DEFAULT '',
  2134. `owner` varchar(30) NOT NULL DEFAULT '',
  2135. `participants` char(255) NOT NULL DEFAULT '',
  2136. `source` varchar(30) NOT NULL DEFAULT '',
  2137. `desc` mediumtext DEFAULT NULL,
  2138. `status` varchar(20) NOT NULL DEFAULT '',
  2139. `openedBy` varchar(30) NOT NULL DEFAULT '',
  2140. `openedDate` datetime DEFAULT NULL,
  2141. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  2142. `lastEditedDate` datetime DEFAULT NULL,
  2143. `publishedBy` varchar(30) NOT NULL DEFAULT '',
  2144. `publishedDate` datetime DEFAULT NULL,
  2145. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2146. PRIMARY KEY (`id`)
  2147. ) ENGINE=InnoDB;
  2148. CREATE TABLE `zt_measqueue` (
  2149. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2150. `type` varchar(30) NOT NULL DEFAULT '',
  2151. `mid` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2152. `status` varchar(255) NOT NULL DEFAULT '',
  2153. `logs` text DEFAULT NULL,
  2154. `execTime` varchar(10) NOT NULL DEFAULT '',
  2155. `params` text DEFAULT NULL,
  2156. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2157. `createdDate` datetime DEFAULT NULL,
  2158. `updateDate` datetime DEFAULT NULL,
  2159. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2160. PRIMARY KEY (`id`)
  2161. ) ENGINE=InnoDB;
  2162. CREATE TABLE `zt_measrecords` (
  2163. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2164. `type` varchar(30) NOT NULL DEFAULT '',
  2165. `mid` mediumint(8) NOT NULL DEFAULT 0,
  2166. `measCode` char(50) NOT NULL DEFAULT '',
  2167. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2168. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2169. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2170. `params` text DEFAULT NULL,
  2171. `year` char(4) NOT NULL DEFAULT '',
  2172. `month` char(6) NOT NULL DEFAULT '',
  2173. `week` char(8) NOT NULL DEFAULT '',
  2174. `day` char(8) NOT NULL DEFAULT '',
  2175. `value` varchar(255) NOT NULL DEFAULT '',
  2176. `date` date DEFAULT NULL,
  2177. PRIMARY KEY (`id`),
  2178. UNIQUE KEY `time` (`year`,`month`,`day`,`week`),
  2179. KEY `product` (`product`),
  2180. KEY `project` (`project`)
  2181. ) ENGINE=InnoDB;
  2182. CREATE TABLE `zt_meastemplate` (
  2183. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2184. `model` char(30) NOT NULL DEFAULT '',
  2185. `name` varchar(255) NOT NULL DEFAULT '',
  2186. `content` mediumtext DEFAULT NULL,
  2187. `createdBy` char(30) NOT NULL DEFAULT '',
  2188. `createdDate` date DEFAULT NULL,
  2189. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2190. PRIMARY KEY (`id`)
  2191. ) ENGINE=InnoDB;
  2192. CREATE TABLE `zt_meeting` (
  2193. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2194. `project` mediumint(8) NOT NULL DEFAULT 0,
  2195. `execution` mediumint(8) NOT NULL DEFAULT 0,
  2196. `name` varchar(255) NOT NULL DEFAULT '',
  2197. `type` varchar(255) NOT NULL DEFAULT '',
  2198. `begin` time DEFAULT NULL,
  2199. `end` time DEFAULT NULL,
  2200. `dept` mediumint(8) NOT NULL DEFAULT 0,
  2201. `mode` varchar(255) NOT NULL DEFAULT '',
  2202. `host` varchar(30) NOT NULL DEFAULT '',
  2203. `participant` text DEFAULT NULL,
  2204. `date` date DEFAULT NULL,
  2205. `room` int(11) NOT NULL DEFAULT 0,
  2206. `minutes` text DEFAULT NULL,
  2207. `minutedBy` varchar(30) NOT NULL DEFAULT '',
  2208. `minutedDate` datetime DEFAULT NULL,
  2209. `objectType` varchar(30) NOT NULL DEFAULT '',
  2210. `objectID` mediumint(8) NOT NULL DEFAULT 0,
  2211. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2212. `createdDate` datetime DEFAULT NULL,
  2213. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2214. `editedDate` datetime DEFAULT NULL,
  2215. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2216. PRIMARY KEY (`id`)
  2217. ) ENGINE=InnoDB;
  2218. CREATE TABLE `zt_meetingroom` (
  2219. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2220. `name` varchar(255) NOT NULL DEFAULT '',
  2221. `position` varchar(30) NOT NULL DEFAULT '',
  2222. `seats` int(11) NOT NULL DEFAULT 0,
  2223. `equipment` varchar(255) NOT NULL DEFAULT '',
  2224. `openTime` varchar(255) NOT NULL DEFAULT '',
  2225. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2226. `createdDate` datetime DEFAULT NULL,
  2227. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2228. `editedDate` datetime DEFAULT NULL,
  2229. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2230. PRIMARY KEY (`id`)
  2231. ) ENGINE=InnoDB;
  2232. CREATE TABLE `zt_metric` (
  2233. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2234. `purpose` varchar(50) NOT NULL DEFAULT '',
  2235. `scope` char(30) NOT NULL DEFAULT '',
  2236. `object` char(30) NOT NULL DEFAULT '',
  2237. `stage` enum('wait','released') DEFAULT 'wait',
  2238. `type` enum('php','sql') DEFAULT 'php',
  2239. `name` varchar(90) NOT NULL DEFAULT '',
  2240. `alias` varchar(90) NOT NULL DEFAULT '',
  2241. `code` varchar(90) NOT NULL DEFAULT '',
  2242. `unit` varchar(10) NOT NULL DEFAULT '',
  2243. `dateType` varchar(50) NOT NULL DEFAULT '',
  2244. `collector` text DEFAULT NULL,
  2245. `desc` text DEFAULT NULL,
  2246. `definition` text DEFAULT NULL,
  2247. `when` varchar(30) NOT NULL DEFAULT '',
  2248. `event` varchar(30) NOT NULL DEFAULT '',
  2249. `cronCFG` varchar(30) NOT NULL DEFAULT '',
  2250. `time` varchar(30) NOT NULL DEFAULT '',
  2251. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2252. `createdDate` datetime DEFAULT NULL,
  2253. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2254. `editedDate` datetime DEFAULT NULL,
  2255. `implementedBy` varchar(30) NOT NULL DEFAULT '',
  2256. `implementedDate` datetime DEFAULT NULL,
  2257. `delistedBy` varchar(30) NOT NULL DEFAULT '',
  2258. `delistedDate` datetime DEFAULT NULL,
  2259. `builtin` enum('0','1') NOT NULL DEFAULT '0',
  2260. `fromID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2261. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2262. `lastCalcRows` int(11) NOT NULL DEFAULT 0,
  2263. `lastCalcTime` datetime DEFAULT NULL,
  2264. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2265. PRIMARY KEY (`id`)
  2266. ) ENGINE=InnoDB;
  2267. CREATE TABLE `zt_metriclib` (
  2268. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  2269. `metricID` mediumint(9) NOT NULL DEFAULT 0,
  2270. `metricCode` varchar(100) NOT NULL DEFAULT '',
  2271. `system` char(30) NOT NULL DEFAULT '0',
  2272. `program` char(30) NOT NULL DEFAULT '',
  2273. `project` char(30) NOT NULL DEFAULT '',
  2274. `product` char(30) NOT NULL DEFAULT '',
  2275. `execution` char(30) NOT NULL DEFAULT '',
  2276. `code` char(30) NOT NULL DEFAULT '',
  2277. `pipeline` char(30) NOT NULL DEFAULT '',
  2278. `repo` char(30) NOT NULL DEFAULT '',
  2279. `user` text DEFAULT NULL,
  2280. `dept` char(30) NOT NULL DEFAULT '',
  2281. `year` char(4) NOT NULL DEFAULT '0',
  2282. `month` char(2) NOT NULL DEFAULT '0',
  2283. `week` char(2) NOT NULL DEFAULT '0',
  2284. `day` char(2) NOT NULL DEFAULT '0',
  2285. `value` varchar(100) NOT NULL DEFAULT '0',
  2286. `calcType` enum('cron','inference') NOT NULL DEFAULT 'cron',
  2287. `calculatedBy` varchar(30) NOT NULL DEFAULT '',
  2288. `date` datetime DEFAULT NULL,
  2289. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2290. PRIMARY KEY (`id`),
  2291. KEY `metricID` (`metricID`),
  2292. KEY `metricCode` (`metricCode`),
  2293. KEY `date` (`date`),
  2294. KEY `deleted` (`deleted`)
  2295. ) ENGINE=InnoDB;
  2296. CREATE TABLE `zt_module` (
  2297. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2298. `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2299. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2300. `name` char(60) NOT NULL DEFAULT '',
  2301. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2302. `path` char(255) NOT NULL DEFAULT '',
  2303. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  2304. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  2305. `type` char(30) NOT NULL DEFAULT '',
  2306. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2307. `owner` varchar(30) NOT NULL DEFAULT '',
  2308. `collector` text DEFAULT NULL,
  2309. `short` varchar(30) NOT NULL DEFAULT '',
  2310. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2311. PRIMARY KEY (`id`),
  2312. KEY `root` (`root`),
  2313. KEY `type` (`type`),
  2314. KEY `path` (`path`)
  2315. ) ENGINE=InnoDB;
  2316. CREATE TABLE `zt_mr` (
  2317. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2318. `hostID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2319. `sourceProject` varchar(50) NOT NULL DEFAULT '',
  2320. `sourceBranch` varchar(100) NOT NULL DEFAULT '',
  2321. `targetProject` varchar(50) NOT NULL DEFAULT '',
  2322. `targetBranch` varchar(100) NOT NULL DEFAULT '',
  2323. `mriid` int(10) unsigned NOT NULL DEFAULT 0,
  2324. `title` varchar(255) NOT NULL DEFAULT '',
  2325. `description` text DEFAULT NULL,
  2326. `assignee` varchar(255) NOT NULL DEFAULT '',
  2327. `reviewer` varchar(255) NOT NULL DEFAULT '',
  2328. `approver` varchar(255) NOT NULL DEFAULT '',
  2329. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2330. `createdDate` datetime DEFAULT NULL,
  2331. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2332. `editedDate` datetime DEFAULT NULL,
  2333. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2334. `status` char(30) NOT NULL DEFAULT '',
  2335. `mergeStatus` char(30) NOT NULL DEFAULT '',
  2336. `approvalStatus` char(30) NOT NULL DEFAULT '',
  2337. `needApproved` enum('0','1') NOT NULL DEFAULT '0',
  2338. `needCI` enum('0','1') NOT NULL DEFAULT '0',
  2339. `repoID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2340. `jobID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2341. `executionID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2342. `compileID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2343. `compileStatus` char(30) NOT NULL DEFAULT '',
  2344. `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0',
  2345. `squash` enum('0','1') NOT NULL DEFAULT '0',
  2346. `isFlow` enum('0','1') NOT NULL DEFAULT '0',
  2347. `synced` enum('0','1') NOT NULL DEFAULT '1',
  2348. `syncError` varchar(255) NOT NULL DEFAULT '',
  2349. `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0',
  2350. `diffs` longtext DEFAULT NULL,
  2351. PRIMARY KEY (`id`)
  2352. ) ENGINE=InnoDB;
  2353. CREATE TABLE `zt_mrapproval` (
  2354. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2355. `mrID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2356. `account` varchar(255) NOT NULL DEFAULT '',
  2357. `date` datetime DEFAULT NULL,
  2358. `action` char(30) NOT NULL DEFAULT '',
  2359. `comment` text DEFAULT NULL,
  2360. PRIMARY KEY (`id`)
  2361. ) ENGINE=InnoDB;
  2362. CREATE TABLE `zt_nc` (
  2363. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2364. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2365. `auditplan` mediumint(8) NOT NULL DEFAULT 0,
  2366. `listID` mediumint(8) NOT NULL DEFAULT 0,
  2367. `title` varchar(255) NOT NULL DEFAULT '',
  2368. `desc` mediumtext DEFAULT NULL,
  2369. `type` char(30) NOT NULL DEFAULT '',
  2370. `status` varchar(30) NOT NULL DEFAULT 'active',
  2371. `severity` char(30) NOT NULL DEFAULT '',
  2372. `deadline` date DEFAULT NULL,
  2373. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  2374. `resolution` char(30) NOT NULL DEFAULT '',
  2375. `resolvedDate` date DEFAULT NULL,
  2376. `closedBy` varchar(30) NOT NULL DEFAULT '',
  2377. `closedDate` date DEFAULT NULL,
  2378. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2379. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2380. `assignedDate` date DEFAULT NULL,
  2381. `activateDate` date DEFAULT NULL,
  2382. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2383. `createdDate` datetime DEFAULT NULL,
  2384. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2385. `editedDate` datetime DEFAULT NULL,
  2386. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2387. PRIMARY KEY (`id`)
  2388. ) ENGINE=InnoDB;
  2389. CREATE TABLE `zt_notify` (
  2390. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2391. `objectType` varchar(50) NOT NULL DEFAULT '',
  2392. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2393. `action` mediumint(8) NOT NULL DEFAULT 0,
  2394. `toList` text DEFAULT NULL,
  2395. `ccList` text DEFAULT NULL,
  2396. `subject` text DEFAULT NULL,
  2397. `data` text DEFAULT NULL,
  2398. `createdBy` char(30) NOT NULL DEFAULT '',
  2399. `createdDate` datetime DEFAULT NULL,
  2400. `sendTime` datetime DEFAULT NULL,
  2401. `status` varchar(10) NOT NULL DEFAULT 'wait',
  2402. `failReason` text DEFAULT NULL,
  2403. PRIMARY KEY (`id`),
  2404. KEY `objectType` (`objectType`),
  2405. KEY `status` (`status`)
  2406. ) ENGINE=InnoDB;
  2407. CREATE TABLE `zt_oauth` (
  2408. `account` varchar(30) NOT NULL DEFAULT '',
  2409. `openID` varchar(255) NOT NULL DEFAULT '',
  2410. `providerType` varchar(30) NOT NULL DEFAULT '',
  2411. `providerID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2412. UNIQUE KEY `account_openID` (`account`,`openID`,`providerType`,`providerID`),
  2413. KEY `account` (`account`),
  2414. KEY `providerType` (`providerType`),
  2415. KEY `providerID` (`providerID`)
  2416. ) ENGINE=InnoDB;
  2417. CREATE TABLE `zt_object` (
  2418. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2419. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2420. `product` mediumint(8) NOT NULL DEFAULT 0,
  2421. `from` mediumint(8) NOT NULL DEFAULT 0,
  2422. `title` varchar(255) NOT NULL DEFAULT '',
  2423. `category` char(30) NOT NULL DEFAULT '',
  2424. `version` varchar(255) NOT NULL DEFAULT '',
  2425. `type` enum('reviewed','taged') NOT NULL DEFAULT 'reviewed',
  2426. `enabled` enum('0','1') NOT NULL DEFAULT '1',
  2427. `range` text DEFAULT NULL,
  2428. `data` text DEFAULT NULL,
  2429. `storyEst` char(30) NOT NULL DEFAULT '',
  2430. `taskEst` char(30) NOT NULL DEFAULT '',
  2431. `requestEst` char(30) NOT NULL DEFAULT '',
  2432. `testEst` char(30) NOT NULL DEFAULT '',
  2433. `devEst` char(30) NOT NULL DEFAULT '',
  2434. `designEst` char(30) NOT NULL DEFAULT '',
  2435. `end` date DEFAULT NULL,
  2436. `createdBy` char(30) NOT NULL DEFAULT '',
  2437. `createdDate` date DEFAULT NULL,
  2438. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2439. PRIMARY KEY (`id`)
  2440. ) ENGINE=InnoDB;
  2441. CREATE TABLE `zt_opportunity` (
  2442. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2443. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2444. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2445. `name` varchar(255) NOT NULL DEFAULT '',
  2446. `source` char(30) NOT NULL DEFAULT '',
  2447. `type` char(30) NOT NULL DEFAULT '',
  2448. `strategy` char(30) NOT NULL DEFAULT '',
  2449. `status` varchar(30) NOT NULL DEFAULT 'active',
  2450. `impact` mediumint(8) NOT NULL DEFAULT 0,
  2451. `chance` mediumint(8) NOT NULL DEFAULT 0,
  2452. `ratio` mediumint(8) NOT NULL DEFAULT 0,
  2453. `pri` char(30) NOT NULL DEFAULT '',
  2454. `identifiedDate` date DEFAULT NULL,
  2455. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2456. `assignedDate` date DEFAULT NULL,
  2457. `approvedDate` date DEFAULT NULL,
  2458. `prevention` mediumtext DEFAULT NULL,
  2459. `plannedClosedDate` date DEFAULT NULL,
  2460. `actualClosedDate` date DEFAULT NULL,
  2461. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2462. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2463. `desc` mediumtext DEFAULT NULL,
  2464. `version` smallint(6) NOT NULL DEFAULT 1,
  2465. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2466. `createdDate` datetime DEFAULT NULL,
  2467. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2468. `editedDate` datetime DEFAULT NULL,
  2469. `activatedBy` varchar(30) NOT NULL DEFAULT '',
  2470. `activatedDate` datetime DEFAULT NULL,
  2471. `closedBy` varchar(30) NOT NULL DEFAULT '',
  2472. `closedDate` datetime DEFAULT NULL,
  2473. `canceledBy` varchar(30) NOT NULL DEFAULT '',
  2474. `canceledDate` datetime DEFAULT NULL,
  2475. `cancelReason` char(30) NOT NULL DEFAULT '',
  2476. `hangupedBy` varchar(30) NOT NULL DEFAULT '',
  2477. `hangupedDate` datetime DEFAULT NULL,
  2478. `resolution` mediumtext DEFAULT NULL,
  2479. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  2480. `resolvedDate` datetime DEFAULT NULL,
  2481. `lastCheckedBy` varchar(30) NOT NULL DEFAULT '',
  2482. `lastCheckedDate` datetime DEFAULT NULL,
  2483. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2484. PRIMARY KEY (`id`)
  2485. ) ENGINE=InnoDB;
  2486. CREATE TABLE `zt_overtime` (
  2487. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2488. `year` char(4) NOT NULL DEFAULT '',
  2489. `begin` date DEFAULT NULL,
  2490. `end` date DEFAULT NULL,
  2491. `start` time DEFAULT NULL,
  2492. `finish` time DEFAULT NULL,
  2493. `hours` float(4,1) unsigned NOT NULL DEFAULT 0.0,
  2494. `leave` varchar(255) NOT NULL DEFAULT '',
  2495. `type` varchar(30) NOT NULL DEFAULT '',
  2496. `desc` text DEFAULT NULL,
  2497. `status` varchar(30) NOT NULL DEFAULT '',
  2498. `rejectReason` varchar(100) NOT NULL DEFAULT '',
  2499. `createdBy` char(30) NOT NULL DEFAULT '',
  2500. `createdDate` datetime DEFAULT NULL,
  2501. `reviewedBy` char(30) NOT NULL DEFAULT '',
  2502. `reviewedDate` datetime DEFAULT NULL,
  2503. `level` tinyint(3) NOT NULL DEFAULT 0,
  2504. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2505. `reviewers` text DEFAULT NULL,
  2506. PRIMARY KEY (`id`),
  2507. KEY `year` (`year`),
  2508. KEY `type` (`type`),
  2509. KEY `status` (`status`),
  2510. KEY `createdBy` (`createdBy`)
  2511. ) ENGINE=InnoDB;
  2512. CREATE TABLE `zt_pipeline` (
  2513. `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
  2514. `type` char(30) NOT NULL DEFAULT '',
  2515. `name` varchar(50) NOT NULL DEFAULT '',
  2516. `url` varchar(255) DEFAULT NULL,
  2517. `account` varchar(30) DEFAULT NULL,
  2518. `password` varchar(255) DEFAULT NULL,
  2519. `token` varchar(255) DEFAULT NULL,
  2520. `private` char(32) DEFAULT NULL,
  2521. `instanceID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2522. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2523. `createdDate` datetime DEFAULT NULL,
  2524. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2525. `editedDate` datetime DEFAULT NULL,
  2526. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2527. PRIMARY KEY (`id`)
  2528. ) ENGINE=InnoDB;
  2529. CREATE TABLE `zt_pivot` (
  2530. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2531. `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2532. `group` varchar(255) NOT NULL DEFAULT '',
  2533. `code` varchar(255) NOT NULL DEFAULT '',
  2534. `driver` enum('mysql','duckdb') NOT NULL DEFAULT 'mysql',
  2535. `mode` enum('text','builder') NOT NULL DEFAULT 'builder',
  2536. `name` text DEFAULT NULL,
  2537. `desc` text DEFAULT NULL,
  2538. `acl` enum('open','private') NOT NULL DEFAULT 'open',
  2539. `whitelist` text DEFAULT NULL,
  2540. `sql` mediumtext DEFAULT NULL,
  2541. `fields` mediumtext DEFAULT NULL,
  2542. `langs` mediumtext DEFAULT NULL,
  2543. `vars` mediumtext DEFAULT NULL,
  2544. `objects` mediumtext DEFAULT NULL,
  2545. `settings` mediumtext DEFAULT NULL,
  2546. `filters` mediumtext DEFAULT NULL,
  2547. `step` tinyint(3) unsigned NOT NULL DEFAULT 0,
  2548. `stage` enum('draft','published') NOT NULL DEFAULT 'draft',
  2549. `builtin` enum('0','1') NOT NULL DEFAULT '0',
  2550. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2551. `createdDate` datetime DEFAULT NULL,
  2552. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2553. `editedDate` datetime DEFAULT NULL,
  2554. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2555. PRIMARY KEY (`id`),
  2556. KEY `dimension` (`dimension`),
  2557. KEY `group` (`group`)
  2558. ) ENGINE=InnoDB;
  2559. CREATE TABLE `zt_pivotdrill` (
  2560. `pivot` mediumint(9) NOT NULL,
  2561. `field` varchar(255) NOT NULL,
  2562. `object` varchar(40) NOT NULL,
  2563. `whereSql` mediumtext NOT NULL,
  2564. `condition` mediumtext NOT NULL,
  2565. `status` enum('design','published') NOT NULL DEFAULT 'published',
  2566. `account` varchar(30) NOT NULL DEFAULT '',
  2567. `type` enum('auto','manual') NOT NULL DEFAULT 'manual'
  2568. ) ENGINE=InnoDB;
  2569. CREATE TABLE `zt_planstory` (
  2570. `plan` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2571. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2572. `order` mediumint(9) NOT NULL DEFAULT 0,
  2573. UNIQUE KEY `plan_story` (`plan`,`story`)
  2574. ) ENGINE=InnoDB;
  2575. CREATE TABLE `zt_practice` (
  2576. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2577. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2578. `code` char(50) NOT NULL DEFAULT '',
  2579. `title` varchar(255) NOT NULL DEFAULT '',
  2580. `labels` varchar(255) NOT NULL DEFAULT '',
  2581. `summary` varchar(255) NOT NULL DEFAULT '',
  2582. `content` text DEFAULT NULL,
  2583. `contributor` varchar(255) NOT NULL DEFAULT '',
  2584. PRIMARY KEY (`id`),
  2585. UNIQUE KEY `code` (`code`)
  2586. ) ENGINE=InnoDB;
  2587. CREATE TABLE `zt_priv` (
  2588. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2589. `module` varchar(30) NOT NULL DEFAULT '',
  2590. `method` varchar(30) NOT NULL DEFAULT '',
  2591. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2592. `edition` varchar(30) NOT NULL DEFAULT ',open,biz,max,',
  2593. `vision` varchar(30) NOT NULL DEFAULT ',rnd,',
  2594. `system` enum('0','1') NOT NULL DEFAULT '0',
  2595. `order` mediumint(8) NOT NULL DEFAULT 0,
  2596. PRIMARY KEY (`id`),
  2597. UNIQUE KEY `priv` (`module`,`method`)
  2598. ) ENGINE=InnoDB;
  2599. CREATE TABLE `zt_privlang` (
  2600. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2601. `objectType` enum('priv','manager') NOT NULL DEFAULT 'priv',
  2602. `lang` varchar(30) NOT NULL DEFAULT '',
  2603. `key` varchar(100) NOT NULL DEFAULT '',
  2604. `value` varchar(255) NOT NULL DEFAULT '',
  2605. `desc` text DEFAULT NULL,
  2606. UNIQUE KEY `objectlang` (`objectID`,`objectType`,`lang`)
  2607. ) ENGINE=InnoDB;
  2608. CREATE TABLE `zt_privmanager` (
  2609. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2610. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2611. `code` varchar(100) NOT NULL DEFAULT '',
  2612. `type` enum('view','module','package') NOT NULL DEFAULT 'package',
  2613. `edition` varchar(30) NOT NULL DEFAULT ',open,biz,max,',
  2614. `vision` varchar(30) NOT NULL DEFAULT ',rnd,',
  2615. `order` mediumint(8) NOT NULL DEFAULT 0,
  2616. PRIMARY KEY (`id`)
  2617. ) ENGINE=InnoDB;
  2618. CREATE TABLE `zt_privrelation` (
  2619. `priv` varchar(100) NOT NULL DEFAULT '',
  2620. `type` varchar(30) NOT NULL DEFAULT '',
  2621. `relationPriv` varchar(100) NOT NULL DEFAULT '',
  2622. UNIQUE KEY `privrelation` (`priv`,`type`,`relationPriv`)
  2623. ) ENGINE=InnoDB;
  2624. CREATE TABLE `zt_process` (
  2625. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2626. `model` char(30) NOT NULL DEFAULT 'waterfall',
  2627. `name` varchar(255) NOT NULL DEFAULT '',
  2628. `type` char(30) NOT NULL DEFAULT '',
  2629. `abbr` char(30) NOT NULL DEFAULT '',
  2630. `desc` mediumtext DEFAULT NULL,
  2631. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  2632. `status` varchar(30) NOT NULL DEFAULT '',
  2633. `order` mediumint(9) NOT NULL DEFAULT 0,
  2634. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2635. `createdDate` datetime DEFAULT NULL,
  2636. `editedBy` varchar(30) NOT NULL DEFAULT '',
  2637. `editedDate` datetime DEFAULT NULL,
  2638. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  2639. `assignedDate` datetime DEFAULT NULL,
  2640. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2641. PRIMARY KEY (`id`)
  2642. ) ENGINE=InnoDB;
  2643. CREATE TABLE `zt_product` (
  2644. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2645. `program` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2646. `name` varchar(110) NOT NULL DEFAULT '',
  2647. `code` varchar(45) NOT NULL DEFAULT '',
  2648. `shadow` tinyint(1) unsigned NOT NULL DEFAULT 0,
  2649. `bind` enum('0','1') NOT NULL DEFAULT '0',
  2650. `line` mediumint(8) NOT NULL DEFAULT 0,
  2651. `type` varchar(30) NOT NULL DEFAULT 'normal',
  2652. `status` varchar(30) NOT NULL DEFAULT '',
  2653. `subStatus` varchar(30) NOT NULL DEFAULT '',
  2654. `desc` mediumtext DEFAULT NULL,
  2655. `PO` varchar(30) NOT NULL DEFAULT '',
  2656. `QD` varchar(30) NOT NULL DEFAULT '',
  2657. `RD` varchar(30) NOT NULL DEFAULT '',
  2658. `feedback` varchar(30) NOT NULL DEFAULT '',
  2659. `ticket` varchar(30) NOT NULL DEFAULT '',
  2660. `workflowGroup` int(8) NOT NULL DEFAULT 0,
  2661. `acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
  2662. `groups` text DEFAULT NULL,
  2663. `whitelist` text DEFAULT NULL,
  2664. `reviewer` text DEFAULT NULL,
  2665. `PMT` text DEFAULT NULL,
  2666. `draftEpics` mediumint(8) NOT NULL DEFAULT 0,
  2667. `activeEpics` mediumint(8) NOT NULL DEFAULT 0,
  2668. `changingEpics` mediumint(8) NOT NULL DEFAULT 0,
  2669. `reviewingEpics` mediumint(8) NOT NULL DEFAULT 0,
  2670. `finishedEpics` mediumint(8) NOT NULL DEFAULT 0,
  2671. `closedEpics` mediumint(8) NOT NULL DEFAULT 0,
  2672. `totalEpics` mediumint(8) NOT NULL DEFAULT 0,
  2673. `draftRequirements` mediumint(8) NOT NULL DEFAULT 0,
  2674. `activeRequirements` mediumint(8) NOT NULL DEFAULT 0,
  2675. `changingRequirements` mediumint(8) NOT NULL DEFAULT 0,
  2676. `reviewingRequirements` mediumint(8) NOT NULL DEFAULT 0,
  2677. `finishedRequirements` mediumint(8) NOT NULL DEFAULT 0,
  2678. `closedRequirements` mediumint(8) NOT NULL DEFAULT 0,
  2679. `totalRequirements` mediumint(8) NOT NULL DEFAULT 0,
  2680. `draftStories` mediumint(8) NOT NULL DEFAULT 0,
  2681. `activeStories` mediumint(8) NOT NULL DEFAULT 0,
  2682. `changingStories` mediumint(8) NOT NULL DEFAULT 0,
  2683. `reviewingStories` mediumint(8) NOT NULL DEFAULT 0,
  2684. `finishedStories` mediumint(8) NOT NULL DEFAULT 0,
  2685. `closedStories` mediumint(8) NOT NULL DEFAULT 0,
  2686. `totalStories` mediumint(8) NOT NULL DEFAULT 0,
  2687. `unresolvedBugs` mediumint(8) NOT NULL DEFAULT 0,
  2688. `closedBugs` mediumint(8) NOT NULL DEFAULT 0,
  2689. `fixedBugs` mediumint(8) NOT NULL DEFAULT 0,
  2690. `totalBugs` mediumint(8) NOT NULL DEFAULT 0,
  2691. `plans` mediumint(8) NOT NULL DEFAULT 0,
  2692. `releases` mediumint(8) NOT NULL DEFAULT 0,
  2693. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2694. `createdDate` datetime DEFAULT NULL,
  2695. `createdVersion` varchar(20) NOT NULL DEFAULT '',
  2696. `closedDate` date DEFAULT NULL,
  2697. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2698. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  2699. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2700. PRIMARY KEY (`id`),
  2701. KEY `acl` (`acl`),
  2702. KEY `order` (`order`)
  2703. ) ENGINE=InnoDB;
  2704. CREATE TABLE `zt_productplan` (
  2705. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2706. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2707. `branch` varchar(255) NOT NULL DEFAULT '0',
  2708. `parent` mediumint(9) NOT NULL DEFAULT 0,
  2709. `title` varchar(90) NOT NULL DEFAULT '',
  2710. `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
  2711. `desc` mediumtext DEFAULT NULL,
  2712. `begin` date DEFAULT NULL,
  2713. `end` date DEFAULT NULL,
  2714. `finishedDate` datetime DEFAULT NULL,
  2715. `closedDate` datetime DEFAULT NULL,
  2716. `order` text DEFAULT NULL,
  2717. `closedReason` varchar(20) NOT NULL DEFAULT '',
  2718. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2719. `createdDate` datetime DEFAULT NULL,
  2720. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2721. PRIMARY KEY (`id`),
  2722. KEY `product` (`product`),
  2723. KEY `end` (`end`)
  2724. ) ENGINE=InnoDB;
  2725. CREATE TABLE `zt_programactivity` (
  2726. `id` int(8) NOT NULL AUTO_INCREMENT,
  2727. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2728. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2729. `process` mediumint(8) NOT NULL DEFAULT 0,
  2730. `activity` mediumint(8) NOT NULL DEFAULT 0,
  2731. `name` varchar(255) NOT NULL DEFAULT '',
  2732. `content` text DEFAULT NULL,
  2733. `reason` varchar(255) NOT NULL DEFAULT '',
  2734. `result` char(30) NOT NULL DEFAULT '',
  2735. `linkedBy` char(30) NOT NULL DEFAULT '',
  2736. `createdBy` char(30) NOT NULL DEFAULT '',
  2737. `createdDate` date DEFAULT NULL,
  2738. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2739. PRIMARY KEY (`id`)
  2740. ) ENGINE=InnoDB;
  2741. CREATE TABLE `zt_programoutput` (
  2742. `id` int(8) NOT NULL AUTO_INCREMENT,
  2743. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2744. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2745. `process` mediumint(8) NOT NULL DEFAULT 0,
  2746. `activity` mediumint(8) NOT NULL DEFAULT 0,
  2747. `output` mediumint(8) NOT NULL DEFAULT 0,
  2748. `content` text DEFAULT NULL,
  2749. `name` varchar(255) NOT NULL DEFAULT '',
  2750. `reason` varchar(255) NOT NULL DEFAULT '',
  2751. `result` char(30) NOT NULL DEFAULT '',
  2752. `linkedBy` char(30) NOT NULL DEFAULT '',
  2753. `createdBy` char(30) NOT NULL DEFAULT '',
  2754. `createdDate` date DEFAULT NULL,
  2755. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2756. PRIMARY KEY (`id`)
  2757. ) ENGINE=InnoDB;
  2758. CREATE TABLE `zt_programprocess` (
  2759. `id` int(8) NOT NULL AUTO_INCREMENT,
  2760. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2761. `process` mediumint(8) NOT NULL DEFAULT 0,
  2762. `name` varchar(255) NOT NULL DEFAULT '',
  2763. `type` char(30) NOT NULL DEFAULT '',
  2764. `abbr` char(30) NOT NULL DEFAULT '',
  2765. `desc` text DEFAULT NULL,
  2766. `reason` varchar(255) NOT NULL DEFAULT '',
  2767. `linkedBy` char(30) NOT NULL DEFAULT '',
  2768. `createdBy` char(30) NOT NULL DEFAULT '',
  2769. `createdDate` date DEFAULT NULL,
  2770. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2771. PRIMARY KEY (`id`)
  2772. ) ENGINE=InnoDB;
  2773. CREATE TABLE `zt_programreport` (
  2774. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  2775. `template` mediumint(8) NOT NULL DEFAULT 0,
  2776. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2777. `name` varchar(255) NOT NULL DEFAULT '',
  2778. `params` text DEFAULT NULL,
  2779. `content` text DEFAULT NULL,
  2780. `createdBy` char(30) NOT NULL DEFAULT '',
  2781. `createdDate` date DEFAULT NULL,
  2782. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2783. PRIMARY KEY (`id`)
  2784. ) ENGINE=InnoDB;
  2785. CREATE TABLE `zt_project` (
  2786. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2787. `project` mediumint(8) NOT NULL DEFAULT 0,
  2788. `charter` mediumint(8) NOT NULL DEFAULT 0,
  2789. `model` char(30) NOT NULL DEFAULT '',
  2790. `type` char(30) NOT NULL DEFAULT 'sprint',
  2791. `category` char(30) NOT NULL DEFAULT '',
  2792. `lifetime` char(30) NOT NULL DEFAULT '',
  2793. `budget` varchar(30) NOT NULL DEFAULT '0',
  2794. `budgetUnit` char(30) NOT NULL DEFAULT 'CNY',
  2795. `attribute` varchar(30) NOT NULL DEFAULT '',
  2796. `percent` float unsigned NOT NULL DEFAULT 0,
  2797. `milestone` enum('0','1') NOT NULL DEFAULT '0',
  2798. `output` text DEFAULT NULL,
  2799. `auth` char(30) NOT NULL DEFAULT '',
  2800. `storyType` char(30) NOT NULL DEFAULT '',
  2801. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2802. `path` varchar(255) NOT NULL DEFAULT '',
  2803. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  2804. `name` varchar(90) NOT NULL DEFAULT '',
  2805. `code` varchar(45) NOT NULL DEFAULT '',
  2806. `hasProduct` tinyint(1) unsigned NOT NULL DEFAULT 1,
  2807. `workflowGroup` int(8) NOT NULL DEFAULT 0,
  2808. `begin` date DEFAULT NULL,
  2809. `end` date DEFAULT NULL,
  2810. `firstEnd` date DEFAULT NULL,
  2811. `realBegan` date DEFAULT NULL,
  2812. `realEnd` date DEFAULT NULL,
  2813. `days` smallint(6) unsigned NOT NULL DEFAULT 0,
  2814. `status` varchar(10) NOT NULL DEFAULT '',
  2815. `subStatus` varchar(30) NOT NULL DEFAULT '',
  2816. `pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
  2817. `desc` mediumtext DEFAULT NULL,
  2818. `version` smallint(6) NOT NULL DEFAULT 0,
  2819. `parentVersion` smallint(6) NOT NULL DEFAULT 0,
  2820. `planDuration` int(11) NOT NULL DEFAULT 0,
  2821. `realDuration` int(11) NOT NULL DEFAULT 0,
  2822. `progress` decimal(5,2) NOT NULL DEFAULT 0.00,
  2823. `estimate` float NOT NULL DEFAULT 0,
  2824. `left` float NOT NULL DEFAULT 0,
  2825. `consumed` float NOT NULL DEFAULT 0,
  2826. `teamCount` int(11) NOT NULL DEFAULT 0,
  2827. `market` mediumint(8) NOT NULL DEFAULT 0,
  2828. `openedBy` varchar(30) NOT NULL DEFAULT '',
  2829. `openedDate` datetime DEFAULT NULL,
  2830. `openedVersion` varchar(20) NOT NULL DEFAULT '',
  2831. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  2832. `lastEditedDate` datetime DEFAULT NULL,
  2833. `closedBy` varchar(30) NOT NULL DEFAULT '',
  2834. `closedDate` datetime DEFAULT NULL,
  2835. `closedReason` varchar(20) NOT NULL DEFAULT '',
  2836. `canceledBy` varchar(30) NOT NULL DEFAULT '',
  2837. `canceledDate` datetime DEFAULT NULL,
  2838. `suspendedDate` date DEFAULT NULL,
  2839. `PO` varchar(30) NOT NULL DEFAULT '',
  2840. `PM` varchar(30) NOT NULL DEFAULT '',
  2841. `QD` varchar(30) NOT NULL DEFAULT '',
  2842. `RD` varchar(30) NOT NULL DEFAULT '',
  2843. `team` varchar(90) NOT NULL DEFAULT '',
  2844. `acl` char(30) NOT NULL DEFAULT 'open',
  2845. `whitelist` text DEFAULT NULL,
  2846. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2847. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  2848. `stageBy` enum('project','product') NOT NULL DEFAULT 'product',
  2849. `displayCards` smallint(6) NOT NULL DEFAULT 0,
  2850. `fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
  2851. `multiple` enum('0','1') NOT NULL DEFAULT '1',
  2852. `parallel` mediumint(9) NOT NULL DEFAULT 0,
  2853. `enabled` enum('on','off') NOT NULL DEFAULT 'on',
  2854. `colWidth` smallint(6) NOT NULL DEFAULT 264,
  2855. `minColWidth` smallint(6) NOT NULL DEFAULT 200,
  2856. `maxColWidth` smallint(6) NOT NULL DEFAULT 384,
  2857. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2858. PRIMARY KEY (`id`),
  2859. KEY `parent` (`parent`),
  2860. KEY `begin` (`begin`),
  2861. KEY `end` (`end`),
  2862. KEY `status` (`status`),
  2863. KEY `acl` (`acl`),
  2864. KEY `order` (`order`),
  2865. KEY `project` (`project`),
  2866. KEY `type_order` (`type`,`order`)
  2867. ) ENGINE=InnoDB;
  2868. CREATE TABLE `zt_projectadmin` (
  2869. `group` smallint(6) NOT NULL DEFAULT 0,
  2870. `account` char(30) NOT NULL DEFAULT '',
  2871. `programs` text DEFAULT NULL,
  2872. `projects` text DEFAULT NULL,
  2873. `products` text DEFAULT NULL,
  2874. `executions` text DEFAULT NULL,
  2875. UNIQUE KEY `group_account` (`group`,`account`)
  2876. ) ENGINE=InnoDB;
  2877. CREATE TABLE `zt_projectcase` (
  2878. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2879. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2880. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2881. `count` mediumint(8) unsigned NOT NULL DEFAULT 1,
  2882. `version` smallint(6) NOT NULL DEFAULT 1,
  2883. `order` smallint(6) unsigned NOT NULL DEFAULT 0,
  2884. UNIQUE KEY `project` (`project`,`case`)
  2885. ) ENGINE=InnoDB;
  2886. CREATE TABLE `zt_projectproduct` (
  2887. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2888. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2889. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2890. `plan` varchar(255) NOT NULL DEFAULT '',
  2891. `roadmap` varchar(255) NOT NULL DEFAULT '',
  2892. PRIMARY KEY (`project`,`product`,`branch`)
  2893. ) ENGINE=InnoDB;
  2894. CREATE TABLE `zt_projectspec` (
  2895. `project` mediumint(8) NOT NULL DEFAULT 0,
  2896. `version` smallint(6) NOT NULL DEFAULT 0,
  2897. `name` varchar(255) NOT NULL DEFAULT '',
  2898. `milestone` enum('0','1') NOT NULL DEFAULT '0',
  2899. `begin` date DEFAULT NULL,
  2900. `end` date DEFAULT NULL,
  2901. UNIQUE KEY `project` (`project`,`version`)
  2902. ) ENGINE=InnoDB;
  2903. CREATE TABLE `zt_projectstory` (
  2904. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2905. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2906. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2907. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2908. `version` smallint(6) NOT NULL DEFAULT 1,
  2909. `order` smallint(6) unsigned NOT NULL DEFAULT 0,
  2910. UNIQUE KEY `project` (`project`,`story`),
  2911. KEY `story` (`story`)
  2912. ) ENGINE=InnoDB;
  2913. CREATE TABLE `zt_queue` (
  2914. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2915. `cron` mediumint(9) NOT NULL,
  2916. `type` varchar(255) NOT NULL,
  2917. `command` text NOT NULL,
  2918. `status` enum('wait','doing','done') NOT NULL DEFAULT 'wait',
  2919. `execId` int(11) DEFAULT NULL,
  2920. `createdDate` datetime NOT NULL,
  2921. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2922. PRIMARY KEY (`id`)
  2923. ) ENGINE=InnoDB;
  2924. CREATE TABLE `zt_relation` (
  2925. `id` int(8) NOT NULL AUTO_INCREMENT,
  2926. `project` mediumint(8) NOT NULL DEFAULT 0,
  2927. `product` mediumint(8) NOT NULL DEFAULT 0,
  2928. `execution` mediumint(8) NOT NULL DEFAULT 0,
  2929. `AType` char(30) NOT NULL DEFAULT '',
  2930. `AID` mediumint(8) NOT NULL DEFAULT 0,
  2931. `AVersion` char(30) NOT NULL DEFAULT '',
  2932. `relation` char(30) NOT NULL DEFAULT '',
  2933. `BType` char(30) NOT NULL DEFAULT '',
  2934. `BID` mediumint(8) NOT NULL DEFAULT 0,
  2935. `BVersion` char(30) NOT NULL DEFAULT '',
  2936. `extra` char(30) NOT NULL DEFAULT '',
  2937. PRIMARY KEY (`id`),
  2938. UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`)
  2939. ) ENGINE=InnoDB;
  2940. CREATE TABLE `zt_relationoftasks` (
  2941. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2942. `execution` mediumint(8) unsigned NOT NULL,
  2943. `pretask` mediumint(8) unsigned NOT NULL,
  2944. `condition` enum('begin','end') NOT NULL,
  2945. `task` mediumint(8) unsigned NOT NULL,
  2946. `action` enum('begin','end') NOT NULL,
  2947. PRIMARY KEY (`id`),
  2948. KEY `relationoftasks` (`execution`,`task`)
  2949. ) ENGINE=InnoDB;
  2950. CREATE TABLE `zt_release` (
  2951. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2952. `project` varchar(255) NOT NULL DEFAULT '0',
  2953. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2954. `branch` varchar(255) NOT NULL DEFAULT '0',
  2955. `shadow` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2956. `build` varchar(255) NOT NULL DEFAULT '',
  2957. `name` varchar(255) NOT NULL DEFAULT '',
  2958. `marker` enum('0','1') NOT NULL DEFAULT '0',
  2959. `date` date DEFAULT NULL,
  2960. `releasedDate` date DEFAULT NULL,
  2961. `stories` text DEFAULT NULL,
  2962. `bugs` text DEFAULT NULL,
  2963. `leftBugs` text DEFAULT NULL,
  2964. `desc` mediumtext DEFAULT NULL,
  2965. `mailto` text DEFAULT NULL,
  2966. `notify` varchar(255) NOT NULL DEFAULT '',
  2967. `status` varchar(20) NOT NULL DEFAULT 'normal',
  2968. `subStatus` varchar(30) NOT NULL DEFAULT '',
  2969. `createdBy` varchar(30) NOT NULL DEFAULT '',
  2970. `createdDate` datetime DEFAULT NULL,
  2971. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  2972. PRIMARY KEY (`id`),
  2973. KEY `product` (`product`),
  2974. KEY `build` (`build`)
  2975. ) ENGINE=InnoDB;
  2976. CREATE TABLE `zt_repo` (
  2977. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  2978. `product` varchar(255) NOT NULL DEFAULT '',
  2979. `projects` varchar(255) NOT NULL DEFAULT '',
  2980. `name` varchar(255) NOT NULL DEFAULT '',
  2981. `path` varchar(255) NOT NULL DEFAULT '',
  2982. `prefix` varchar(100) NOT NULL DEFAULT '',
  2983. `encoding` varchar(20) NOT NULL DEFAULT '',
  2984. `SCM` varchar(10) NOT NULL DEFAULT '',
  2985. `client` varchar(100) NOT NULL DEFAULT '',
  2986. `serviceHost` varchar(50) NOT NULL DEFAULT '',
  2987. `serviceProject` varchar(100) NOT NULL DEFAULT '',
  2988. `commits` mediumint(8) unsigned NOT NULL DEFAULT 0,
  2989. `account` varchar(30) NOT NULL DEFAULT '',
  2990. `password` varchar(30) NOT NULL DEFAULT '',
  2991. `encrypt` varchar(30) NOT NULL DEFAULT 'plain',
  2992. `acl` text DEFAULT NULL,
  2993. `synced` tinyint(1) NOT NULL DEFAULT 0,
  2994. `lastSync` datetime DEFAULT NULL,
  2995. `lastCommit` datetime DEFAULT NULL,
  2996. `desc` text DEFAULT NULL,
  2997. `extra` char(30) NOT NULL DEFAULT '',
  2998. `preMerge` enum('0','1') NOT NULL DEFAULT '0',
  2999. `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3000. `fileServerUrl` text DEFAULT NULL,
  3001. `fileServerAccount` varchar(40) NOT NULL DEFAULT '',
  3002. `fileServerPassword` varchar(100) NOT NULL DEFAULT '',
  3003. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  3004. PRIMARY KEY (`id`)
  3005. ) ENGINE=InnoDB;
  3006. CREATE TABLE `zt_repobranch` (
  3007. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3008. `revision` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3009. `branch` varchar(255) NOT NULL DEFAULT '',
  3010. UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
  3011. KEY `branch` (`branch`),
  3012. KEY `revision` (`revision`)
  3013. ) ENGINE=InnoDB;
  3014. CREATE TABLE `zt_repofiles` (
  3015. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  3016. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3017. `revision` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3018. `path` varchar(255) NOT NULL DEFAULT '',
  3019. `oldPath` varchar(255) NOT NULL DEFAULT '',
  3020. `parent` varchar(255) NOT NULL DEFAULT '',
  3021. `type` varchar(20) NOT NULL DEFAULT '',
  3022. `action` char(1) NOT NULL DEFAULT '',
  3023. PRIMARY KEY (`id`),
  3024. KEY `path` (`path`),
  3025. KEY `parent` (`parent`),
  3026. KEY `repo` (`repo`),
  3027. KEY `revision` (`revision`)
  3028. ) ENGINE=InnoDB;
  3029. CREATE TABLE `zt_repohistory` (
  3030. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  3031. `repo` mediumint(9) NOT NULL DEFAULT 0,
  3032. `revision` varchar(40) NOT NULL DEFAULT '',
  3033. `commit` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3034. `comment` text DEFAULT NULL,
  3035. `committer` varchar(100) NOT NULL DEFAULT '',
  3036. `time` datetime DEFAULT NULL,
  3037. PRIMARY KEY (`id`),
  3038. KEY `repo` (`repo`),
  3039. KEY `revision` (`revision`)
  3040. ) ENGINE=InnoDB;
  3041. CREATE TABLE `zt_report` (
  3042. `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  3043. `code` varchar(100) NOT NULL DEFAULT '',
  3044. `name` text DEFAULT NULL,
  3045. `dimension` int(8) NOT NULL DEFAULT 0,
  3046. `module` varchar(100) NOT NULL DEFAULT '',
  3047. `sql` text DEFAULT NULL,
  3048. `vars` text DEFAULT NULL,
  3049. `langs` text DEFAULT NULL,
  3050. `params` text DEFAULT NULL,
  3051. `step` tinyint(1) NOT NULL DEFAULT 2,
  3052. `desc` text DEFAULT NULL,
  3053. `addedBy` char(30) NOT NULL DEFAULT '',
  3054. `addedDate` datetime DEFAULT NULL,
  3055. PRIMARY KEY (`id`),
  3056. UNIQUE KEY `code` (`code`)
  3057. ) ENGINE=InnoDB;
  3058. CREATE TABLE `zt_researchplan` (
  3059. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3060. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3061. `name` varchar(255) NOT NULL DEFAULT '',
  3062. `customer` varchar(255) NOT NULL DEFAULT '',
  3063. `stakeholder` varchar(255) NOT NULL DEFAULT '',
  3064. `objective` varchar(255) NOT NULL DEFAULT '',
  3065. `begin` datetime DEFAULT NULL,
  3066. `end` datetime DEFAULT NULL,
  3067. `location` varchar(255) NOT NULL DEFAULT '',
  3068. `team` varchar(255) NOT NULL DEFAULT '',
  3069. `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL DEFAULT '',
  3070. `outline` mediumtext DEFAULT NULL,
  3071. `schedule` mediumtext DEFAULT NULL,
  3072. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3073. `createdDate` datetime DEFAULT NULL,
  3074. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3075. `editedDate` datetime DEFAULT NULL,
  3076. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3077. PRIMARY KEY (`id`)
  3078. ) ENGINE=InnoDB;
  3079. CREATE TABLE `zt_researchreport` (
  3080. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3081. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3082. `relatedPlan` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3083. `title` varchar(255) NOT NULL DEFAULT '',
  3084. `author` varchar(30) NOT NULL DEFAULT '',
  3085. `content` mediumtext DEFAULT NULL,
  3086. `customer` varchar(255) NOT NULL DEFAULT '',
  3087. `researchObjects` varchar(255) NOT NULL DEFAULT '',
  3088. `begin` datetime DEFAULT NULL,
  3089. `end` datetime DEFAULT NULL,
  3090. `location` varchar(255) NOT NULL DEFAULT '',
  3091. `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL DEFAULT '',
  3092. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3093. `createdDate` datetime DEFAULT NULL,
  3094. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3095. `editedDate` datetime DEFAULT NULL,
  3096. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3097. PRIMARY KEY (`id`)
  3098. ) ENGINE=InnoDB;
  3099. CREATE TABLE `zt_review` (
  3100. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3101. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3102. `title` varchar(255) NOT NULL DEFAULT '',
  3103. `object` mediumint(8) NOT NULL DEFAULT 0,
  3104. `template` mediumint(8) NOT NULL DEFAULT 0,
  3105. `doc` varchar(255) NOT NULL DEFAULT '',
  3106. `docVersion` varchar(255) NOT NULL DEFAULT '',
  3107. `status` char(30) NOT NULL DEFAULT '',
  3108. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  3109. `auditedBy` varchar(255) NOT NULL DEFAULT '',
  3110. `createdBy` char(30) NOT NULL DEFAULT '',
  3111. `createdDate` date DEFAULT NULL,
  3112. `begin` date DEFAULT NULL,
  3113. `deadline` date DEFAULT NULL,
  3114. `lastReviewedBy` varchar(255) NOT NULL DEFAULT '',
  3115. `lastReviewedDate` date DEFAULT NULL,
  3116. `lastAuditedBy` varchar(255) NOT NULL DEFAULT '',
  3117. `lastAuditedDate` date DEFAULT NULL,
  3118. `lastEditedBy` varchar(255) NOT NULL DEFAULT '',
  3119. `lastEditedDate` date DEFAULT NULL,
  3120. `result` char(30) NOT NULL DEFAULT '',
  3121. `auditResult` char(30) NOT NULL DEFAULT '',
  3122. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3123. PRIMARY KEY (`id`)
  3124. ) ENGINE=InnoDB;
  3125. CREATE TABLE `zt_reviewcl` (
  3126. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3127. `title` varchar(255) NOT NULL DEFAULT '',
  3128. `object` char(30) NOT NULL DEFAULT '',
  3129. `category` char(30) NOT NULL DEFAULT '',
  3130. `type` varchar(255) NOT NULL DEFAULT '',
  3131. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3132. `order` mediumint(8) DEFAULT 0,
  3133. `status` varchar(30) NOT NULL DEFAULT '',
  3134. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3135. `createdDate` datetime DEFAULT NULL,
  3136. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3137. `editedDate` datetime DEFAULT NULL,
  3138. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  3139. `assignedDate` datetime DEFAULT NULL,
  3140. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3141. PRIMARY KEY (`id`)
  3142. ) ENGINE=InnoDB;
  3143. CREATE TABLE `zt_reviewissue` (
  3144. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3145. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3146. `review` mediumint(8) NOT NULL DEFAULT 0,
  3147. `approval` mediumint(8) NOT NULL DEFAULT 0,
  3148. `injection` mediumint(8) NOT NULL DEFAULT 0,
  3149. `identify` mediumint(8) NOT NULL DEFAULT 0,
  3150. `type` char(30) NOT NULL DEFAULT 'review',
  3151. `listID` mediumint(8) NOT NULL DEFAULT 0,
  3152. `title` varchar(255) NOT NULL DEFAULT '',
  3153. `opinion` mediumtext DEFAULT NULL,
  3154. `opinionDate` date DEFAULT NULL,
  3155. `status` char(30) NOT NULL DEFAULT '',
  3156. `resolution` char(30) NOT NULL DEFAULT '',
  3157. `resolutionBy` char(30) NOT NULL DEFAULT '',
  3158. `resolutionDate` date DEFAULT NULL,
  3159. `createdBy` char(30) NOT NULL DEFAULT '',
  3160. `createdDate` date DEFAULT NULL,
  3161. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3162. PRIMARY KEY (`id`)
  3163. ) ENGINE=InnoDB;
  3164. CREATE TABLE `zt_reviewlist` (
  3165. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3166. `title` varchar(255) NOT NULL DEFAULT '',
  3167. `object` char(30) NOT NULL DEFAULT '',
  3168. `category` char(30) NOT NULL DEFAULT '',
  3169. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3170. `status` varchar(30) NOT NULL DEFAULT '',
  3171. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3172. `createdDate` datetime DEFAULT NULL,
  3173. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3174. `editedDate` datetime DEFAULT NULL,
  3175. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  3176. `assignedDate` datetime DEFAULT NULL,
  3177. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3178. PRIMARY KEY (`id`)
  3179. ) ENGINE=InnoDB;
  3180. CREATE TABLE `zt_reviewresult` (
  3181. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3182. `review` mediumint(8) NOT NULL DEFAULT 0,
  3183. `type` char(30) NOT NULL DEFAULT 'review',
  3184. `result` char(30) NOT NULL DEFAULT '',
  3185. `opinion` text DEFAULT NULL,
  3186. `reviewer` char(30) NOT NULL DEFAULT '',
  3187. `remainIssue` char(30) NOT NULL DEFAULT '',
  3188. `createdDate` date DEFAULT NULL,
  3189. `consumed` float NOT NULL DEFAULT 0,
  3190. PRIMARY KEY (`id`),
  3191. UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`)
  3192. ) ENGINE=InnoDB;
  3193. CREATE TABLE `zt_risk` (
  3194. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3195. `project` varchar(255) NOT NULL DEFAULT '',
  3196. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3197. `name` varchar(255) NOT NULL DEFAULT '',
  3198. `source` char(30) NOT NULL DEFAULT '',
  3199. `category` char(30) NOT NULL DEFAULT '',
  3200. `strategy` char(30) NOT NULL DEFAULT '',
  3201. `status` varchar(30) NOT NULL DEFAULT 'active',
  3202. `impact` char(30) NOT NULL DEFAULT '',
  3203. `probability` char(30) NOT NULL DEFAULT '',
  3204. `rate` char(30) NOT NULL DEFAULT '',
  3205. `pri` char(30) NOT NULL DEFAULT '',
  3206. `identifiedDate` date DEFAULT NULL,
  3207. `prevention` mediumtext DEFAULT NULL,
  3208. `remedy` mediumtext DEFAULT NULL,
  3209. `plannedClosedDate` date DEFAULT NULL,
  3210. `actualClosedDate` date DEFAULT NULL,
  3211. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3212. `from` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3213. `version` smallint(6) NOT NULL DEFAULT 1,
  3214. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3215. `createdDate` datetime DEFAULT NULL,
  3216. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3217. `editedDate` datetime DEFAULT NULL,
  3218. `resolution` mediumtext DEFAULT NULL,
  3219. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  3220. `activateBy` varchar(30) NOT NULL DEFAULT '',
  3221. `activateDate` date DEFAULT NULL,
  3222. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3223. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3224. `closedDate` date DEFAULT NULL,
  3225. `cancelBy` varchar(30) NOT NULL DEFAULT '',
  3226. `cancelDate` date DEFAULT NULL,
  3227. `cancelReason` char(30) NOT NULL DEFAULT '',
  3228. `hangupBy` varchar(30) NOT NULL DEFAULT '',
  3229. `hangupDate` date DEFAULT NULL,
  3230. `trackedBy` varchar(30) NOT NULL DEFAULT '',
  3231. `trackedDate` date DEFAULT NULL,
  3232. `assignedDate` date DEFAULT NULL,
  3233. `approvedDate` date DEFAULT NULL,
  3234. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3235. PRIMARY KEY (`id`)
  3236. ) ENGINE=InnoDB;
  3237. CREATE TABLE `zt_riskissue` (
  3238. `risk` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3239. `issue` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3240. UNIQUE KEY `risk_issue` (`risk`,`issue`)
  3241. ) ENGINE=InnoDB;
  3242. CREATE TABLE `zt_roadmap` (
  3243. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3244. `product` mediumint(8) NOT NULL DEFAULT 0,
  3245. `branch` mediumint(8) NOT NULL DEFAULT 0,
  3246. `name` varchar(255) NOT NULL DEFAULT '',
  3247. `status` char(30) NOT NULL DEFAULT '',
  3248. `begin` date DEFAULT NULL,
  3249. `end` date DEFAULT NULL,
  3250. `desc` longtext DEFAULT NULL,
  3251. `createdBy` char(30) NOT NULL DEFAULT '',
  3252. `createdDate` date DEFAULT NULL,
  3253. `closedBy` char(30) NOT NULL DEFAULT '',
  3254. `closedDate` datetime DEFAULT NULL,
  3255. `closedReason` enum('done','canceled') DEFAULT NULL,
  3256. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3257. PRIMARY KEY (`id`)
  3258. ) ENGINE=InnoDB;
  3259. CREATE TABLE `zt_roadmapstory` (
  3260. `roadmap` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3261. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3262. `order` mediumint(8) unsigned NOT NULL,
  3263. UNIQUE KEY `roadmap_story` (`roadmap`,`story`)
  3264. ) ENGINE=InnoDB;
  3265. CREATE TABLE `zt_scene` (
  3266. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3267. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3268. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3269. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3270. `title` varchar(255) NOT NULL DEFAULT '',
  3271. `sort` int(11) unsigned NOT NULL DEFAULT 0,
  3272. `openedBy` char(30) NOT NULL DEFAULT '',
  3273. `openedDate` datetime DEFAULT NULL,
  3274. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  3275. `lastEditedDate` datetime DEFAULT NULL,
  3276. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3277. `parent` int(11) NOT NULL DEFAULT 0,
  3278. `grade` tinyint(3) NOT NULL DEFAULT 0,
  3279. `path` varchar(1000) NOT NULL DEFAULT '',
  3280. PRIMARY KEY (`id`)
  3281. ) ENGINE=InnoDB;
  3282. CREATE TABLE `zt_score` (
  3283. `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
  3284. `account` varchar(30) NOT NULL DEFAULT '',
  3285. `module` varchar(30) NOT NULL DEFAULT '',
  3286. `method` varchar(30) NOT NULL DEFAULT '',
  3287. `desc` varchar(250) NOT NULL DEFAULT '',
  3288. `before` int(11) NOT NULL DEFAULT 0,
  3289. `score` int(11) NOT NULL DEFAULT 0,
  3290. `after` int(11) NOT NULL DEFAULT 0,
  3291. `time` datetime DEFAULT NULL,
  3292. PRIMARY KEY (`id`),
  3293. KEY `account` (`account`),
  3294. KEY `module` (`module`),
  3295. KEY `method` (`method`)
  3296. ) ENGINE=InnoDB;
  3297. CREATE TABLE `zt_screen` (
  3298. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3299. `dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3300. `name` varchar(255) NOT NULL DEFAULT '',
  3301. `desc` mediumtext DEFAULT NULL,
  3302. `acl` enum('open','private') NOT NULL DEFAULT 'open',
  3303. `whitelist` text DEFAULT NULL,
  3304. `cover` mediumtext DEFAULT NULL,
  3305. `scheme` mediumtext DEFAULT NULL,
  3306. `status` enum('draft','published') NOT NULL DEFAULT 'draft',
  3307. `builtin` enum('0','1') NOT NULL DEFAULT '0',
  3308. `createdBy` char(30) NOT NULL DEFAULT '',
  3309. `createdDate` datetime DEFAULT NULL,
  3310. `editedBy` char(30) NOT NULL DEFAULT '',
  3311. `editedDate` datetime DEFAULT NULL,
  3312. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3313. PRIMARY KEY (`id`)
  3314. ) ENGINE=InnoDB;
  3315. CREATE TABLE `zt_searchdict` (
  3316. `key` smallint(6) unsigned NOT NULL DEFAULT 0,
  3317. `value` char(3) NOT NULL DEFAULT '',
  3318. PRIMARY KEY (`key`)
  3319. ) ENGINE=InnoDB;
  3320. CREATE TABLE `zt_searchindex` (
  3321. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  3322. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3323. `objectType` char(20) NOT NULL DEFAULT '',
  3324. `objectID` mediumint(9) NOT NULL DEFAULT 0,
  3325. `title` text DEFAULT NULL,
  3326. `content` text DEFAULT NULL,
  3327. `addedDate` datetime DEFAULT NULL,
  3328. `editedDate` datetime DEFAULT NULL,
  3329. PRIMARY KEY (`id`),
  3330. UNIQUE KEY `object` (`objectType`,`objectID`),
  3331. KEY `addedDate` (`addedDate`),
  3332. FULLTEXT KEY `title_content` (`title`,`content`)
  3333. ) ENGINE=InnoDB;
  3334. CREATE TABLE `zt_serverroom` (
  3335. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3336. `name` varchar(128) NOT NULL DEFAULT '',
  3337. `city` varchar(128) NOT NULL DEFAULT '',
  3338. `line` varchar(20) NOT NULL DEFAULT '',
  3339. `bandwidth` varchar(128) NOT NULL DEFAULT '',
  3340. `provider` varchar(128) NOT NULL DEFAULT '',
  3341. `owner` varchar(30) NOT NULL DEFAULT '',
  3342. `createdBy` char(30) NOT NULL DEFAULT '',
  3343. `createdDate` datetime DEFAULT NULL,
  3344. `editedBy` char(30) NOT NULL DEFAULT '',
  3345. `editedDate` datetime DEFAULT NULL,
  3346. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3347. PRIMARY KEY (`id`)
  3348. ) ENGINE=InnoDB;
  3349. CREATE TABLE `zt_service` (
  3350. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3351. `name` varchar(255) NOT NULL DEFAULT '',
  3352. `external` enum('0','1') NOT NULL DEFAULT '0',
  3353. `port` smallint(5) unsigned NOT NULL DEFAULT 0,
  3354. `entry` varchar(255) NOT NULL DEFAULT '',
  3355. `deploy` varchar(255) NOT NULL DEFAULT '',
  3356. `version` varchar(64) NOT NULL DEFAULT '',
  3357. `color` char(7) NOT NULL DEFAULT '',
  3358. `desc` mediumtext DEFAULT NULL,
  3359. `dept` varchar(128) NOT NULL DEFAULT '',
  3360. `devel` varchar(30) NOT NULL DEFAULT '',
  3361. `qa` varchar(30) NOT NULL DEFAULT '',
  3362. `ops` varchar(30) NOT NULL DEFAULT '',
  3363. `hosts` text DEFAULT NULL,
  3364. `softName` varchar(128) NOT NULL DEFAULT '',
  3365. `softVersion` varchar(128) NOT NULL DEFAULT '',
  3366. `type` varchar(20) NOT NULL DEFAULT '',
  3367. `createdBy` char(30) NOT NULL DEFAULT '',
  3368. `createdDate` datetime DEFAULT NULL,
  3369. `editedBy` char(30) NOT NULL DEFAULT '',
  3370. `editedDate` datetime DEFAULT NULL,
  3371. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3372. `path` char(255) NOT NULL DEFAULT '',
  3373. `grade` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3374. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  3375. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3376. PRIMARY KEY (`id`)
  3377. ) ENGINE=InnoDB;
  3378. CREATE TABLE `zt_session` (
  3379. `id` varchar(32) NOT NULL,
  3380. `data` mediumtext DEFAULT NULL,
  3381. `timestamp` int(10) unsigned DEFAULT NULL,
  3382. PRIMARY KEY (`id`),
  3383. KEY `timestamp` (`timestamp`)
  3384. ) ENGINE=InnoDB;
  3385. CREATE TABLE `zt_solution` (
  3386. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3387. `name` char(50) NOT NULL DEFAULT '',
  3388. `appID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3389. `appName` char(50) NOT NULL DEFAULT '',
  3390. `appVersion` char(20) NOT NULL DEFAULT '',
  3391. `version` char(50) NOT NULL DEFAULT '',
  3392. `chart` char(50) NOT NULL DEFAULT '',
  3393. `cover` varchar(255) NOT NULL DEFAULT '',
  3394. `desc` text DEFAULT NULL,
  3395. `introduction` varchar(255) NOT NULL DEFAULT '',
  3396. `source` char(20) NOT NULL DEFAULT '',
  3397. `channel` char(20) NOT NULL DEFAULT '',
  3398. `components` text DEFAULT NULL,
  3399. `status` char(20) NOT NULL DEFAULT '',
  3400. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  3401. `createdBy` char(30) NOT NULL DEFAULT '',
  3402. `createdAt` datetime DEFAULT NULL,
  3403. `updatedDate` datetime DEFAULT NULL,
  3404. PRIMARY KEY (`id`)
  3405. ) ENGINE=InnoDB;
  3406. CREATE TABLE `zt_solutions` (
  3407. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3408. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3409. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3410. `contents` text NOT NULL,
  3411. `support` text NOT NULL,
  3412. `measures` text NOT NULL,
  3413. `type` char(30) NOT NULL DEFAULT '',
  3414. `addedBy` varchar(30) NOT NULL DEFAULT '',
  3415. `addedDate` date DEFAULT NULL,
  3416. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3417. `editedDate` date DEFAULT NULL,
  3418. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3419. PRIMARY KEY (`id`)
  3420. ) ENGINE=InnoDB;
  3421. CREATE TABLE `zt_space` (
  3422. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3423. `name` varchar(200) NOT NULL,
  3424. `k8space` char(64) NOT NULL,
  3425. `owner` char(30) NOT NULL,
  3426. `default` tinyint(1) NOT NULL DEFAULT 0,
  3427. `createdAt` datetime DEFAULT NULL,
  3428. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  3429. PRIMARY KEY (`id`),
  3430. KEY `name` (`name`)
  3431. ) ENGINE=InnoDB;
  3432. CREATE TABLE `zt_sqlbuilder` (
  3433. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3434. `objectID` mediumint(8) NOT NULL,
  3435. `objectType` varchar(50) NOT NULL,
  3436. `sql` text DEFAULT NULL,
  3437. `setting` text DEFAULT NULL,
  3438. PRIMARY KEY (`id`)
  3439. ) ENGINE=InnoDB;
  3440. CREATE TABLE `zt_sqlview` (
  3441. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3442. `name` varchar(90) NOT NULL DEFAULT '',
  3443. `code` varchar(45) NOT NULL DEFAULT '',
  3444. `sql` text DEFAULT NULL,
  3445. `desc` text DEFAULT NULL,
  3446. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3447. `createdDate` datetime DEFAULT NULL,
  3448. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3449. `editedDate` datetime DEFAULT NULL,
  3450. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3451. PRIMARY KEY (`id`)
  3452. ) ENGINE=InnoDB;
  3453. CREATE TABLE `zt_stage` (
  3454. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3455. `name` varchar(255) NOT NULL DEFAULT '',
  3456. `percent` varchar(255) NOT NULL DEFAULT '',
  3457. `type` varchar(255) NOT NULL DEFAULT '',
  3458. `projectType` varchar(255) NOT NULL DEFAULT '',
  3459. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3460. `createdDate` datetime DEFAULT NULL,
  3461. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3462. `editedDate` datetime DEFAULT NULL,
  3463. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3464. PRIMARY KEY (`id`)
  3465. ) ENGINE=InnoDB;
  3466. CREATE TABLE `zt_stakeholder` (
  3467. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3468. `objectID` mediumint(8) NOT NULL DEFAULT 0,
  3469. `objectType` char(30) NOT NULL DEFAULT '',
  3470. `user` char(30) NOT NULL DEFAULT '',
  3471. `type` char(30) NOT NULL DEFAULT '',
  3472. `key` enum('0','1') NOT NULL DEFAULT '0',
  3473. `from` char(30) NOT NULL DEFAULT '',
  3474. `createdBy` char(30) NOT NULL DEFAULT '',
  3475. `createdDate` date DEFAULT NULL,
  3476. `editedBy` char(30) NOT NULL DEFAULT '',
  3477. `editedDate` date DEFAULT NULL,
  3478. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3479. PRIMARY KEY (`id`),
  3480. KEY `objectID` (`objectID`)
  3481. ) ENGINE=InnoDB;
  3482. CREATE TABLE `zt_story` (
  3483. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3484. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3485. `parent` mediumint(9) NOT NULL DEFAULT 0,
  3486. `isParent` enum('0','1') NOT NULL DEFAULT '0',
  3487. `root` mediumint(9) NOT NULL DEFAULT 0,
  3488. `path` text DEFAULT NULL,
  3489. `grade` smallint(6) NOT NULL DEFAULT 0,
  3490. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3491. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3492. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3493. `plan` text DEFAULT NULL,
  3494. `source` varchar(20) NOT NULL DEFAULT '',
  3495. `sourceNote` varchar(255) NOT NULL DEFAULT '',
  3496. `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3497. `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3498. `title` varchar(255) NOT NULL DEFAULT '',
  3499. `keywords` varchar(255) NOT NULL DEFAULT '',
  3500. `type` varchar(30) NOT NULL DEFAULT 'story',
  3501. `category` varchar(30) NOT NULL DEFAULT 'feature',
  3502. `pri` tinyint(3) unsigned NOT NULL DEFAULT 3,
  3503. `estimate` float unsigned NOT NULL DEFAULT 0,
  3504. `status` enum('','changing','active','draft','closed','reviewing','launched','developing') NOT NULL DEFAULT '',
  3505. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3506. `color` char(7) NOT NULL DEFAULT '',
  3507. `stage` enum('','wait','inroadmap','incharter','planned','projected','designing','designed','developing','developed','testing','tested','verified','rejected','delivering','delivered','released','closed') NOT NULL DEFAULT 'wait',
  3508. `stagedBy` char(30) NOT NULL DEFAULT '',
  3509. `mailto` text DEFAULT NULL,
  3510. `lib` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3511. `fromStory` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3512. `fromVersion` smallint(6) NOT NULL DEFAULT 1,
  3513. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3514. `openedDate` datetime DEFAULT NULL,
  3515. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3516. `assignedDate` datetime DEFAULT NULL,
  3517. `approvedDate` date DEFAULT NULL,
  3518. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  3519. `lastEditedDate` datetime DEFAULT NULL,
  3520. `changedBy` varchar(30) NOT NULL DEFAULT '',
  3521. `changedDate` datetime DEFAULT NULL,
  3522. `reviewedBy` varchar(255) NOT NULL DEFAULT '',
  3523. `reviewedDate` datetime DEFAULT NULL,
  3524. `releasedDate` datetime DEFAULT NULL,
  3525. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3526. `closedDate` datetime DEFAULT NULL,
  3527. `closedReason` varchar(30) NOT NULL DEFAULT '',
  3528. `activatedDate` datetime DEFAULT NULL,
  3529. `toBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3530. `linkStories` varchar(255) NOT NULL DEFAULT '',
  3531. `linkRequirements` varchar(255) NOT NULL DEFAULT '',
  3532. `twins` varchar(255) NOT NULL DEFAULT '',
  3533. `duplicateStory` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3534. `version` smallint(6) NOT NULL DEFAULT 1,
  3535. `parentVersion` smallint(6) NOT NULL DEFAULT 0,
  3536. `demandVersion` smallint(6) NOT NULL DEFAULT 0,
  3537. `storyChanged` enum('0','1') NOT NULL DEFAULT '0',
  3538. `feedbackBy` varchar(100) NOT NULL DEFAULT '',
  3539. `notifyEmail` varchar(100) NOT NULL DEFAULT '',
  3540. `BSA` char(30) NOT NULL DEFAULT '',
  3541. `duration` char(30) NOT NULL DEFAULT '',
  3542. `demand` mediumint(8) NOT NULL DEFAULT 0,
  3543. `submitedBy` varchar(30) NOT NULL DEFAULT '',
  3544. `roadmap` varchar(255) NOT NULL DEFAULT '',
  3545. `URChanged` enum('0','1') NOT NULL DEFAULT '0',
  3546. `unlinkReason` enum('','omit','other') NOT NULL DEFAULT '',
  3547. `retractedReason` enum('','omit','other') NOT NULL DEFAULT '',
  3548. `retractedBy` varchar(30) NOT NULL DEFAULT '',
  3549. `retractedDate` datetime DEFAULT NULL,
  3550. `verifiedDate` datetime DEFAULT NULL,
  3551. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3552. PRIMARY KEY (`id`),
  3553. KEY `product` (`product`),
  3554. KEY `root` (`root`),
  3555. KEY `status` (`status`),
  3556. KEY `assignedTo` (`assignedTo`)
  3557. ) ENGINE=InnoDB;
  3558. CREATE TABLE `zt_storyestimate` (
  3559. `story` mediumint(9) NOT NULL DEFAULT 0,
  3560. `round` smallint(6) NOT NULL DEFAULT 0,
  3561. `estimate` text DEFAULT NULL,
  3562. `average` float NOT NULL DEFAULT 0,
  3563. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3564. `openedDate` datetime DEFAULT NULL,
  3565. UNIQUE KEY `story` (`story`,`round`)
  3566. ) ENGINE=InnoDB;
  3567. CREATE TABLE `zt_storygrade` (
  3568. `type` enum('story','requirement','epic') NOT NULL,
  3569. `grade` smallint(6) NOT NULL,
  3570. `name` char(30) NOT NULL,
  3571. `status` char(30) NOT NULL
  3572. ) ENGINE=InnoDB;
  3573. CREATE TABLE `zt_storyreview` (
  3574. `story` mediumint(9) NOT NULL DEFAULT 0,
  3575. `version` smallint(6) NOT NULL DEFAULT 0,
  3576. `reviewer` varchar(30) NOT NULL DEFAULT '',
  3577. `result` varchar(30) NOT NULL DEFAULT '',
  3578. `reviewDate` datetime DEFAULT NULL,
  3579. UNIQUE KEY `story` (`story`,`version`,`reviewer`)
  3580. ) ENGINE=InnoDB;
  3581. CREATE TABLE `zt_storyspec` (
  3582. `story` mediumint(9) NOT NULL DEFAULT 0,
  3583. `version` smallint(6) NOT NULL DEFAULT 0,
  3584. `title` varchar(255) NOT NULL DEFAULT '',
  3585. `spec` mediumtext DEFAULT NULL,
  3586. `verify` mediumtext DEFAULT NULL,
  3587. `files` text DEFAULT NULL,
  3588. UNIQUE KEY `story` (`story`,`version`)
  3589. ) ENGINE=InnoDB;
  3590. CREATE TABLE `zt_storystage` (
  3591. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3592. `branch` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3593. `stage` varchar(50) NOT NULL DEFAULT '',
  3594. `stagedBy` char(30) NOT NULL DEFAULT '',
  3595. UNIQUE KEY `story_branch` (`story`,`branch`),
  3596. KEY `story` (`story`)
  3597. ) ENGINE=InnoDB;
  3598. CREATE TABLE `zt_suitecase` (
  3599. `suite` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3600. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3601. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3602. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  3603. UNIQUE KEY `suitecase` (`suite`,`case`)
  3604. ) ENGINE=InnoDB;
  3605. CREATE TABLE `zt_task` (
  3606. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3607. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3608. `parent` mediumint(8) NOT NULL DEFAULT 0,
  3609. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3610. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3611. `design` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3612. `story` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3613. `storyVersion` smallint(6) NOT NULL DEFAULT 1,
  3614. `designVersion` smallint(6) unsigned NOT NULL DEFAULT 1,
  3615. `fromBug` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3616. `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3617. `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3618. `name` varchar(255) NOT NULL DEFAULT '',
  3619. `type` varchar(20) NOT NULL DEFAULT '',
  3620. `mode` varchar(10) NOT NULL DEFAULT '',
  3621. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3622. `estimate` float unsigned NOT NULL DEFAULT 0,
  3623. `consumed` float unsigned NOT NULL DEFAULT 0,
  3624. `left` float unsigned NOT NULL DEFAULT 0,
  3625. `deadline` date DEFAULT NULL,
  3626. `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
  3627. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3628. `color` char(7) NOT NULL DEFAULT '',
  3629. `mailto` text DEFAULT NULL,
  3630. `keywords` varchar(255) NOT NULL DEFAULT '',
  3631. `desc` mediumtext DEFAULT NULL,
  3632. `version` smallint(6) NOT NULL DEFAULT 0,
  3633. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3634. `openedDate` datetime DEFAULT NULL,
  3635. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3636. `assignedDate` datetime DEFAULT NULL,
  3637. `estStarted` date DEFAULT NULL,
  3638. `realStarted` datetime DEFAULT NULL,
  3639. `finishedBy` varchar(30) NOT NULL DEFAULT '',
  3640. `finishedDate` datetime DEFAULT NULL,
  3641. `finishedList` text DEFAULT NULL,
  3642. `canceledBy` varchar(30) NOT NULL DEFAULT '',
  3643. `canceledDate` datetime DEFAULT NULL,
  3644. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3645. `closedDate` datetime DEFAULT NULL,
  3646. `planDuration` int(11) NOT NULL DEFAULT 0,
  3647. `realDuration` int(11) NOT NULL DEFAULT 0,
  3648. `closedReason` varchar(30) NOT NULL DEFAULT '',
  3649. `lastEditedBy` varchar(30) NOT NULL DEFAULT '',
  3650. `lastEditedDate` datetime DEFAULT NULL,
  3651. `activatedDate` datetime DEFAULT NULL,
  3652. `order` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3653. `repo` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3654. `mr` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3655. `entry` varchar(255) NOT NULL DEFAULT '',
  3656. `lines` varchar(10) NOT NULL DEFAULT '',
  3657. `v1` varchar(40) NOT NULL DEFAULT '',
  3658. `v2` varchar(40) NOT NULL DEFAULT '',
  3659. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3660. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3661. PRIMARY KEY (`id`),
  3662. KEY `execution` (`execution`),
  3663. KEY `story` (`story`),
  3664. KEY `parent` (`parent`),
  3665. KEY `assignedTo` (`assignedTo`),
  3666. KEY `order` (`order`)
  3667. ) ENGINE=InnoDB;
  3668. CREATE TABLE `zt_taskestimate` (
  3669. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3670. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3671. `date` date DEFAULT NULL,
  3672. `left` float unsigned NOT NULL DEFAULT 0,
  3673. `consumed` float unsigned NOT NULL DEFAULT 0,
  3674. `account` char(30) NOT NULL DEFAULT '',
  3675. `work` text DEFAULT NULL,
  3676. `order` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3677. PRIMARY KEY (`id`),
  3678. KEY `task` (`task`)
  3679. ) ENGINE=InnoDB;
  3680. CREATE TABLE `zt_taskspec` (
  3681. `task` mediumint(8) NOT NULL DEFAULT 0,
  3682. `version` smallint(6) NOT NULL DEFAULT 0,
  3683. `name` varchar(255) NOT NULL DEFAULT '',
  3684. `estStarted` date DEFAULT NULL,
  3685. `deadline` date DEFAULT NULL,
  3686. UNIQUE KEY `task` (`task`,`version`)
  3687. ) ENGINE=InnoDB;
  3688. CREATE TABLE `zt_taskteam` (
  3689. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3690. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3691. `account` char(30) NOT NULL DEFAULT '',
  3692. `estimate` decimal(12,2) NOT NULL DEFAULT 0.00,
  3693. `consumed` decimal(12,2) NOT NULL DEFAULT 0.00,
  3694. `left` decimal(12,2) NOT NULL DEFAULT 0.00,
  3695. `transfer` char(30) NOT NULL DEFAULT '',
  3696. `status` enum('wait','doing','done','cancel','closed') NOT NULL DEFAULT 'wait',
  3697. `order` int(8) NOT NULL DEFAULT 0,
  3698. PRIMARY KEY (`id`),
  3699. KEY `task` (`task`)
  3700. ) ENGINE=InnoDB;
  3701. CREATE TABLE `zt_team` (
  3702. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3703. `root` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3704. `type` enum('project','task','execution') NOT NULL DEFAULT 'project',
  3705. `account` char(30) NOT NULL DEFAULT '',
  3706. `role` char(30) NOT NULL DEFAULT '',
  3707. `position` varchar(30) NOT NULL DEFAULT '',
  3708. `limited` char(8) NOT NULL DEFAULT 'no',
  3709. `join` date DEFAULT NULL,
  3710. `days` smallint(5) unsigned NOT NULL DEFAULT 0,
  3711. `hours` float(3,1) unsigned NOT NULL DEFAULT 0.0,
  3712. `estimate` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
  3713. `consumed` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
  3714. `left` decimal(12,2) unsigned NOT NULL DEFAULT 0.00,
  3715. `order` tinyint(3) NOT NULL DEFAULT 0,
  3716. PRIMARY KEY (`id`),
  3717. UNIQUE KEY `team` (`root`,`type`,`account`)
  3718. ) ENGINE=InnoDB;
  3719. CREATE TABLE `zt_testreport` (
  3720. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3721. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3722. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3723. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3724. `tasks` varchar(255) NOT NULL DEFAULT '',
  3725. `builds` varchar(255) NOT NULL DEFAULT '',
  3726. `title` varchar(255) NOT NULL DEFAULT '',
  3727. `begin` date DEFAULT NULL,
  3728. `end` date DEFAULT NULL,
  3729. `owner` char(30) NOT NULL DEFAULT '',
  3730. `members` text DEFAULT NULL,
  3731. `stories` text DEFAULT NULL,
  3732. `bugs` text DEFAULT NULL,
  3733. `cases` text DEFAULT NULL,
  3734. `report` text DEFAULT NULL,
  3735. `objectType` varchar(20) NOT NULL DEFAULT '',
  3736. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3737. `createdBy` char(30) NOT NULL DEFAULT '',
  3738. `createdDate` datetime DEFAULT NULL,
  3739. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3740. PRIMARY KEY (`id`)
  3741. ) ENGINE=InnoDB;
  3742. CREATE TABLE `zt_testresult` (
  3743. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3744. `run` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3745. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3746. `version` smallint(5) unsigned NOT NULL DEFAULT 0,
  3747. `job` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3748. `compile` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3749. `caseResult` char(30) NOT NULL DEFAULT '',
  3750. `stepResults` text DEFAULT NULL,
  3751. `ZTFResult` text DEFAULT NULL,
  3752. `node` int(8) unsigned NOT NULL DEFAULT 0,
  3753. `lastRunner` varchar(30) NOT NULL DEFAULT '',
  3754. `date` datetime DEFAULT NULL,
  3755. `duration` float NOT NULL DEFAULT 0,
  3756. `xml` text DEFAULT NULL,
  3757. `deploy` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3758. PRIMARY KEY (`id`),
  3759. KEY `case` (`case`),
  3760. KEY `version` (`version`),
  3761. KEY `run` (`run`)
  3762. ) ENGINE=InnoDB;
  3763. CREATE TABLE `zt_testrun` (
  3764. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3765. `task` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3766. `case` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3767. `version` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3768. `assignedTo` char(30) NOT NULL DEFAULT '',
  3769. `lastRunner` varchar(30) NOT NULL DEFAULT '',
  3770. `lastRunDate` datetime DEFAULT NULL,
  3771. `lastRunResult` char(30) NOT NULL DEFAULT '',
  3772. `status` char(30) NOT NULL DEFAULT '',
  3773. PRIMARY KEY (`id`),
  3774. UNIQUE KEY `task` (`task`,`case`)
  3775. ) ENGINE=InnoDB;
  3776. CREATE TABLE `zt_testsuite` (
  3777. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3778. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3779. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3780. `name` varchar(255) NOT NULL DEFAULT '',
  3781. `desc` mediumtext DEFAULT NULL,
  3782. `type` varchar(20) NOT NULL DEFAULT '',
  3783. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  3784. `addedBy` char(30) NOT NULL DEFAULT '',
  3785. `addedDate` datetime DEFAULT NULL,
  3786. `lastEditedBy` char(30) NOT NULL DEFAULT '',
  3787. `lastEditedDate` datetime DEFAULT NULL,
  3788. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3789. PRIMARY KEY (`id`),
  3790. KEY `product` (`product`)
  3791. ) ENGINE=InnoDB;
  3792. CREATE TABLE `zt_testtask` (
  3793. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3794. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3795. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3796. `name` char(90) NOT NULL DEFAULT '',
  3797. `execution` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3798. `build` char(30) NOT NULL DEFAULT '',
  3799. `type` varchar(255) NOT NULL DEFAULT '',
  3800. `owner` varchar(30) NOT NULL DEFAULT '',
  3801. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3802. `begin` date DEFAULT NULL,
  3803. `end` date DEFAULT NULL,
  3804. `realBegan` date DEFAULT NULL,
  3805. `realFinishedDate` datetime DEFAULT NULL,
  3806. `mailto` text DEFAULT NULL,
  3807. `desc` mediumtext DEFAULT NULL,
  3808. `report` text DEFAULT NULL,
  3809. `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
  3810. `testreport` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3811. `auto` varchar(10) NOT NULL DEFAULT 'no',
  3812. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3813. `createdBy` varchar(30) NOT NULL DEFAULT '',
  3814. `createdDate` datetime DEFAULT NULL,
  3815. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3816. `members` text DEFAULT NULL,
  3817. PRIMARY KEY (`id`),
  3818. KEY `product` (`product`),
  3819. KEY `build` (`build`)
  3820. ) ENGINE=InnoDB;
  3821. CREATE TABLE `zt_ticket` (
  3822. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3823. `product` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3824. `module` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3825. `title` varchar(255) NOT NULL DEFAULT '',
  3826. `type` varchar(30) NOT NULL DEFAULT '',
  3827. `desc` text DEFAULT NULL,
  3828. `openedBuild` varchar(255) NOT NULL DEFAULT '',
  3829. `feedback` mediumint(8) NOT NULL DEFAULT 0,
  3830. `assignedTo` varchar(255) NOT NULL DEFAULT '',
  3831. `assignedDate` datetime DEFAULT NULL,
  3832. `realStarted` datetime DEFAULT NULL,
  3833. `startedBy` varchar(255) NOT NULL DEFAULT '',
  3834. `startedDate` datetime DEFAULT NULL,
  3835. `deadline` date DEFAULT NULL,
  3836. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3837. `estimate` float unsigned NOT NULL DEFAULT 0,
  3838. `left` float unsigned NOT NULL DEFAULT 0,
  3839. `status` varchar(30) NOT NULL DEFAULT '',
  3840. `openedBy` varchar(30) NOT NULL DEFAULT '',
  3841. `openedDate` datetime DEFAULT NULL,
  3842. `activatedCount` int(11) NOT NULL DEFAULT 0,
  3843. `activatedBy` varchar(30) NOT NULL DEFAULT '',
  3844. `activatedDate` datetime DEFAULT NULL,
  3845. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3846. `closedDate` datetime DEFAULT NULL,
  3847. `closedReason` varchar(30) NOT NULL DEFAULT '',
  3848. `finishedBy` varchar(30) NOT NULL DEFAULT '',
  3849. `finishedDate` datetime DEFAULT NULL,
  3850. `resolvedBy` varchar(30) NOT NULL DEFAULT '',
  3851. `resolvedDate` datetime DEFAULT NULL,
  3852. `resolution` text DEFAULT NULL,
  3853. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3854. `editedDate` datetime DEFAULT NULL,
  3855. `keywords` varchar(255) NOT NULL DEFAULT '',
  3856. `repeatTicket` mediumint(8) NOT NULL DEFAULT 0,
  3857. `mailto` varchar(255) NOT NULL DEFAULT '',
  3858. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3859. `subStatus` varchar(30) NOT NULL DEFAULT '',
  3860. PRIMARY KEY (`id`),
  3861. KEY `product` (`product`)
  3862. ) ENGINE=InnoDB;
  3863. CREATE TABLE `zt_ticketrelation` (
  3864. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3865. `ticketId` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3866. `objectId` mediumint(8) NOT NULL DEFAULT 0,
  3867. `objectType` varchar(100) NOT NULL DEFAULT '',
  3868. PRIMARY KEY (`id`),
  3869. KEY `ticketId` (`ticketId`)
  3870. ) ENGINE=InnoDB;
  3871. CREATE TABLE `zt_ticketsource` (
  3872. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3873. `ticketId` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3874. `customer` varchar(100) NOT NULL DEFAULT '',
  3875. `contact` varchar(100) NOT NULL DEFAULT '',
  3876. `notifyEmail` varchar(100) NOT NULL DEFAULT '',
  3877. `createdDate` datetime DEFAULT NULL,
  3878. PRIMARY KEY (`id`),
  3879. KEY `ticketId` (`ticketId`)
  3880. ) ENGINE=InnoDB;
  3881. CREATE TABLE `zt_todo` (
  3882. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3883. `account` char(30) NOT NULL DEFAULT '',
  3884. `date` date DEFAULT NULL,
  3885. `begin` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  3886. `end` smallint(4) unsigned zerofill NOT NULL DEFAULT 0000,
  3887. `feedback` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3888. `type` char(15) NOT NULL DEFAULT '',
  3889. `cycle` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3890. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3891. `pri` tinyint(3) unsigned NOT NULL DEFAULT 0,
  3892. `name` char(150) NOT NULL DEFAULT '',
  3893. `desc` mediumtext DEFAULT NULL,
  3894. `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
  3895. `private` tinyint(1) NOT NULL DEFAULT 0,
  3896. `config` varchar(1000) NOT NULL DEFAULT '',
  3897. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  3898. `assignedBy` varchar(30) NOT NULL DEFAULT '',
  3899. `assignedDate` datetime DEFAULT NULL,
  3900. `finishedBy` varchar(30) NOT NULL DEFAULT '',
  3901. `finishedDate` datetime DEFAULT NULL,
  3902. `closedBy` varchar(30) NOT NULL DEFAULT '',
  3903. `closedDate` datetime DEFAULT NULL,
  3904. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3905. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  3906. PRIMARY KEY (`id`),
  3907. KEY `account` (`account`),
  3908. KEY `assignedTo` (`assignedTo`),
  3909. KEY `finishedBy` (`finishedBy`),
  3910. KEY `date` (`date`)
  3911. ) ENGINE=InnoDB;
  3912. CREATE TABLE `zt_traincategory` (
  3913. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3914. `name` char(30) NOT NULL DEFAULT '',
  3915. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3916. `path` char(255) NOT NULL DEFAULT '',
  3917. `grade` tinyint(3) NOT NULL DEFAULT 0,
  3918. `order` mediumint(8) NOT NULL DEFAULT 0,
  3919. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3920. PRIMARY KEY (`id`),
  3921. KEY `parent` (`parent`),
  3922. KEY `path` (`path`)
  3923. ) ENGINE=InnoDB;
  3924. CREATE TABLE `zt_traincontents` (
  3925. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3926. `code` varchar(50) NOT NULL DEFAULT '',
  3927. `course` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3928. `name` varchar(255) NOT NULL DEFAULT '',
  3929. `type` varchar(30) NOT NULL DEFAULT '',
  3930. `parent` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3931. `path` char(255) NOT NULL DEFAULT '',
  3932. `desc` text DEFAULT NULL,
  3933. `order` mediumint(8) NOT NULL DEFAULT 0,
  3934. `createdBy` char(30) NOT NULL DEFAULT '',
  3935. `createdDate` datetime DEFAULT NULL,
  3936. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3937. `editedDate` datetime DEFAULT NULL,
  3938. `deleted` tinyint(1) NOT NULL DEFAULT 0,
  3939. PRIMARY KEY (`id`)
  3940. ) ENGINE=InnoDB;
  3941. CREATE TABLE `zt_traincourse` (
  3942. `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  3943. `code` varchar(255) NOT NULL DEFAULT '',
  3944. `category` mediumint(8) NOT NULL DEFAULT 0,
  3945. `name` varchar(255) NOT NULL DEFAULT '',
  3946. `status` varchar(10) NOT NULL DEFAULT '',
  3947. `teacher` varchar(30) NOT NULL DEFAULT '',
  3948. `desc` mediumtext DEFAULT NULL,
  3949. `importedStatus` enum('','wait','doing','done') NOT NULL DEFAULT '',
  3950. `lastUpdatedTime` int(10) unsigned NOT NULL DEFAULT 0,
  3951. `createdBy` varchar(255) NOT NULL DEFAULT '',
  3952. `createdDate` date DEFAULT NULL,
  3953. `editedBy` varchar(255) NOT NULL DEFAULT '',
  3954. `editedDate` date DEFAULT NULL,
  3955. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3956. PRIMARY KEY (`id`)
  3957. ) ENGINE=InnoDB;
  3958. CREATE TABLE `zt_trainplan` (
  3959. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3960. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3961. `name` varchar(255) NOT NULL DEFAULT '',
  3962. `begin` date DEFAULT NULL,
  3963. `end` date DEFAULT NULL,
  3964. `place` varchar(255) NOT NULL DEFAULT '',
  3965. `trainee` text DEFAULT NULL,
  3966. `lecturer` varchar(20) NOT NULL DEFAULT '',
  3967. `type` enum('inside','outside') NOT NULL DEFAULT 'inside',
  3968. `status` varchar(20) NOT NULL DEFAULT '',
  3969. `summary` mediumtext DEFAULT NULL,
  3970. `createdBy` char(30) NOT NULL DEFAULT '',
  3971. `createdDate` datetime DEFAULT NULL,
  3972. `editedBy` varchar(30) NOT NULL DEFAULT '',
  3973. `editedDate` datetime DEFAULT NULL,
  3974. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  3975. PRIMARY KEY (`id`)
  3976. ) ENGINE=InnoDB;
  3977. CREATE TABLE `zt_trainrecords` (
  3978. `user` char(30) NOT NULL DEFAULT '',
  3979. `objectId` mediumint(8) unsigned NOT NULL DEFAULT 0,
  3980. `objectType` varchar(10) NOT NULL DEFAULT '',
  3981. `status` varchar(10) NOT NULL DEFAULT '',
  3982. PRIMARY KEY (`user`,`objectId`,`objectType`)
  3983. ) ENGINE=InnoDB;
  3984. CREATE TABLE `zt_trip` (
  3985. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3986. `type` enum('trip','egress') NOT NULL DEFAULT 'trip',
  3987. `customers` varchar(20) NOT NULL DEFAULT '',
  3988. `name` char(30) NOT NULL DEFAULT '',
  3989. `desc` text DEFAULT NULL,
  3990. `year` char(4) NOT NULL DEFAULT '',
  3991. `begin` date DEFAULT NULL,
  3992. `end` date DEFAULT NULL,
  3993. `start` time DEFAULT NULL,
  3994. `finish` time DEFAULT NULL,
  3995. `from` char(50) NOT NULL DEFAULT '',
  3996. `to` char(50) NOT NULL DEFAULT '',
  3997. `createdBy` char(30) NOT NULL DEFAULT '',
  3998. `createdDate` datetime DEFAULT NULL,
  3999. PRIMARY KEY (`id`),
  4000. KEY `year` (`year`),
  4001. KEY `createdBy` (`createdBy`)
  4002. ) ENGINE=InnoDB;
  4003. CREATE TABLE `zt_user` (
  4004. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4005. `company` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4006. `type` char(30) NOT NULL DEFAULT 'inside',
  4007. `dept` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4008. `account` char(30) NOT NULL DEFAULT '',
  4009. `password` char(32) NOT NULL DEFAULT '',
  4010. `role` char(10) NOT NULL DEFAULT '',
  4011. `realname` varchar(100) NOT NULL DEFAULT '',
  4012. `superior` char(30) DEFAULT '',
  4013. `pinyin` varchar(255) NOT NULL DEFAULT '',
  4014. `nickname` char(60) NOT NULL DEFAULT '',
  4015. `commiter` varchar(100) NOT NULL DEFAULT '',
  4016. `avatar` text DEFAULT NULL,
  4017. `birthday` date DEFAULT NULL,
  4018. `gender` enum('f','m') NOT NULL DEFAULT 'f',
  4019. `email` char(90) NOT NULL DEFAULT '',
  4020. `skype` char(90) NOT NULL DEFAULT '',
  4021. `qq` char(20) NOT NULL DEFAULT '',
  4022. `mobile` char(11) NOT NULL DEFAULT '',
  4023. `phone` char(20) NOT NULL DEFAULT '',
  4024. `weixin` varchar(90) NOT NULL DEFAULT '',
  4025. `dingding` varchar(90) NOT NULL DEFAULT '',
  4026. `slack` varchar(90) NOT NULL DEFAULT '',
  4027. `whatsapp` varchar(90) NOT NULL DEFAULT '',
  4028. `address` char(120) NOT NULL DEFAULT '',
  4029. `zipcode` char(10) NOT NULL DEFAULT '',
  4030. `nature` text DEFAULT NULL,
  4031. `analysis` text DEFAULT NULL,
  4032. `strategy` text DEFAULT NULL,
  4033. `join` date DEFAULT NULL,
  4034. `visits` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4035. `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite',
  4036. `ip` varchar(255) NOT NULL DEFAULT '',
  4037. `last` int(11) unsigned NOT NULL DEFAULT 0,
  4038. `fails` tinyint(5) NOT NULL DEFAULT 0,
  4039. `locked` datetime DEFAULT NULL,
  4040. `feedback` enum('0','1') NOT NULL DEFAULT '0',
  4041. `ranzhi` char(30) NOT NULL DEFAULT '',
  4042. `ldap` char(30) NOT NULL DEFAULT '',
  4043. `score` int(11) NOT NULL DEFAULT 0,
  4044. `scoreLevel` int(11) NOT NULL DEFAULT 0,
  4045. `resetToken` varchar(50) NOT NULL DEFAULT '',
  4046. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  4047. `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline',
  4048. `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn',
  4049. PRIMARY KEY (`id`),
  4050. UNIQUE KEY `account` (`account`),
  4051. KEY `dept` (`dept`),
  4052. KEY `email` (`email`),
  4053. KEY `commiter` (`commiter`),
  4054. KEY `deleted` (`deleted`)
  4055. ) ENGINE=InnoDB;
  4056. CREATE TABLE `zt_usercontact` (
  4057. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4058. `account` char(30) NOT NULL DEFAULT '',
  4059. `listName` varchar(60) NOT NULL DEFAULT '',
  4060. `userList` text DEFAULT NULL,
  4061. `public` tinyint(1) NOT NULL DEFAULT 0,
  4062. PRIMARY KEY (`id`),
  4063. KEY `account` (`account`)
  4064. ) ENGINE=InnoDB;
  4065. CREATE TABLE `zt_usergroup` (
  4066. `account` char(30) NOT NULL DEFAULT '',
  4067. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4068. `project` text DEFAULT NULL,
  4069. UNIQUE KEY `account` (`account`,`group`)
  4070. ) ENGINE=InnoDB;
  4071. CREATE TABLE `zt_userquery` (
  4072. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4073. `account` char(30) NOT NULL DEFAULT '',
  4074. `module` varchar(30) NOT NULL DEFAULT '',
  4075. `title` varchar(90) NOT NULL DEFAULT '',
  4076. `form` text DEFAULT NULL,
  4077. `sql` text DEFAULT NULL,
  4078. `shortcut` enum('0','1') NOT NULL DEFAULT '0',
  4079. `common` enum('0','1') NOT NULL DEFAULT '0',
  4080. PRIMARY KEY (`id`),
  4081. KEY `account` (`account`),
  4082. KEY `module` (`module`)
  4083. ) ENGINE=InnoDB;
  4084. CREATE TABLE `zt_usertpl` (
  4085. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4086. `account` char(30) NOT NULL DEFAULT '',
  4087. `type` char(30) NOT NULL DEFAULT '',
  4088. `title` varchar(150) NOT NULL DEFAULT '',
  4089. `content` text DEFAULT NULL,
  4090. `public` enum('0','1') NOT NULL DEFAULT '0',
  4091. PRIMARY KEY (`id`),
  4092. KEY `account` (`account`)
  4093. ) ENGINE=InnoDB;
  4094. CREATE TABLE `zt_userview` (
  4095. `account` char(30) NOT NULL DEFAULT '',
  4096. `programs` mediumtext DEFAULT NULL,
  4097. `products` mediumtext DEFAULT NULL,
  4098. `projects` mediumtext DEFAULT NULL,
  4099. `sprints` mediumtext DEFAULT NULL,
  4100. UNIQUE KEY `account` (`account`)
  4101. ) ENGINE=InnoDB;
  4102. CREATE TABLE `zt_webhook` (
  4103. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4104. `type` varchar(15) NOT NULL DEFAULT 'default',
  4105. `name` varchar(50) NOT NULL DEFAULT '',
  4106. `url` varchar(255) NOT NULL DEFAULT '',
  4107. `domain` varchar(255) NOT NULL DEFAULT '',
  4108. `secret` varchar(255) NOT NULL DEFAULT '',
  4109. `contentType` varchar(30) NOT NULL DEFAULT 'application/json',
  4110. `sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
  4111. `products` text DEFAULT NULL,
  4112. `executions` text DEFAULT NULL,
  4113. `params` varchar(100) NOT NULL DEFAULT '',
  4114. `actions` text DEFAULT NULL,
  4115. `desc` text DEFAULT NULL,
  4116. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4117. `createdDate` datetime DEFAULT NULL,
  4118. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4119. `editedDate` datetime DEFAULT NULL,
  4120. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  4121. PRIMARY KEY (`id`)
  4122. ) ENGINE=InnoDB;
  4123. CREATE TABLE `zt_weeklyreport` (
  4124. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4125. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4126. `weekStart` date DEFAULT NULL,
  4127. `pv` float(9,2) NOT NULL DEFAULT 0.00,
  4128. `ev` float(9,2) NOT NULL DEFAULT 0.00,
  4129. `ac` float(9,2) NOT NULL DEFAULT 0.00,
  4130. `sv` float(9,2) NOT NULL DEFAULT 0.00,
  4131. `cv` float(9,2) NOT NULL DEFAULT 0.00,
  4132. `staff` smallint(5) unsigned NOT NULL DEFAULT 0,
  4133. `progress` varchar(255) NOT NULL DEFAULT '',
  4134. `workload` varchar(255) NOT NULL DEFAULT '',
  4135. PRIMARY KEY (`id`),
  4136. UNIQUE KEY `week` (`project`,`weekStart`)
  4137. ) ENGINE=InnoDB;
  4138. CREATE TABLE `zt_workestimation` (
  4139. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4140. `project` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4141. `scale` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  4142. `productivity` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  4143. `duration` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  4144. `unitLaborCost` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  4145. `totalLaborCost` decimal(10,2) unsigned NOT NULL DEFAULT 0.00,
  4146. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4147. `createdDate` datetime DEFAULT NULL,
  4148. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4149. `editedDate` datetime DEFAULT NULL,
  4150. `assignedTo` varchar(30) NOT NULL DEFAULT '',
  4151. `assignedDate` datetime DEFAULT NULL,
  4152. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  4153. `dayHour` decimal(10,2) NOT NULL DEFAULT 0.00,
  4154. PRIMARY KEY (`id`)
  4155. ) ENGINE=InnoDB;
  4156. CREATE TABLE `zt_workflow` (
  4157. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4158. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4159. `parent` varchar(30) NOT NULL DEFAULT '',
  4160. `child` varchar(30) NOT NULL DEFAULT '',
  4161. `type` varchar(10) NOT NULL DEFAULT 'flow',
  4162. `navigator` varchar(10) NOT NULL DEFAULT '',
  4163. `app` varchar(20) NOT NULL DEFAULT '',
  4164. `position` varchar(30) NOT NULL DEFAULT '',
  4165. `module` varchar(30) NOT NULL DEFAULT '',
  4166. `table` varchar(50) NOT NULL DEFAULT '',
  4167. `name` varchar(30) NOT NULL DEFAULT '',
  4168. `icon` varchar(30) NOT NULL DEFAULT 'flow',
  4169. `titleField` varchar(30) NOT NULL DEFAULT '',
  4170. `contentField` text DEFAULT NULL,
  4171. `flowchart` text DEFAULT NULL,
  4172. `js` text DEFAULT NULL,
  4173. `css` text DEFAULT NULL,
  4174. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4175. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4176. `role` varchar(10) NOT NULL DEFAULT 'buildin',
  4177. `belong` varchar(50) NOT NULL DEFAULT '',
  4178. `administrator` text DEFAULT NULL,
  4179. `desc` text DEFAULT NULL,
  4180. `version` varchar(10) NOT NULL DEFAULT '1.0',
  4181. `status` varchar(10) NOT NULL DEFAULT 'wait',
  4182. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  4183. `approval` enum('enabled','disabled') NOT NULL DEFAULT 'disabled',
  4184. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4185. `createdDate` datetime DEFAULT NULL,
  4186. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4187. `editedDate` datetime DEFAULT NULL,
  4188. PRIMARY KEY (`id`),
  4189. UNIQUE KEY `unique` (`group`,`app`,`module`,`vision`),
  4190. KEY `type` (`type`),
  4191. KEY `app` (`app`),
  4192. KEY `module` (`module`),
  4193. KEY `order` (`order`)
  4194. ) ENGINE=InnoDB;
  4195. CREATE TABLE `zt_workflowaction` (
  4196. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4197. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4198. `module` varchar(30) NOT NULL DEFAULT '',
  4199. `action` varchar(50) NOT NULL DEFAULT '',
  4200. `method` varchar(50) NOT NULL DEFAULT '',
  4201. `name` varchar(50) NOT NULL DEFAULT '',
  4202. `type` enum('single','batch') NOT NULL DEFAULT 'single',
  4203. `batchMode` enum('same','different') NOT NULL DEFAULT 'different',
  4204. `extensionType` varchar(10) NOT NULL DEFAULT 'override',
  4205. `open` varchar(20) NOT NULL DEFAULT '',
  4206. `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview',
  4207. `layout` char(20) NOT NULL DEFAULT '',
  4208. `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist',
  4209. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4210. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4211. `role` varchar(10) NOT NULL DEFAULT 'custom',
  4212. `virtual` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4213. `conditions` text DEFAULT NULL,
  4214. `verifications` text DEFAULT NULL,
  4215. `hooks` text DEFAULT NULL,
  4216. `linkages` text DEFAULT NULL,
  4217. `js` text DEFAULT NULL,
  4218. `css` text DEFAULT NULL,
  4219. `toList` char(255) NOT NULL DEFAULT '',
  4220. `blocks` text DEFAULT NULL,
  4221. `desc` text DEFAULT NULL,
  4222. `status` varchar(10) NOT NULL DEFAULT 'enable',
  4223. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  4224. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4225. `createdDate` datetime DEFAULT NULL,
  4226. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4227. `editedDate` datetime DEFAULT NULL,
  4228. PRIMARY KEY (`id`),
  4229. UNIQUE KEY `unique` (`group`,`module`,`action`,`vision`),
  4230. KEY `module` (`module`),
  4231. KEY `action` (`action`),
  4232. KEY `order` (`order`)
  4233. ) ENGINE=InnoDB;
  4234. CREATE TABLE `zt_workflowdatasource` (
  4235. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4236. `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option',
  4237. `name` varchar(30) NOT NULL DEFAULT '',
  4238. `code` varchar(30) NOT NULL DEFAULT '',
  4239. `datasource` text DEFAULT NULL,
  4240. `view` varchar(20) NOT NULL DEFAULT '',
  4241. `keyField` varchar(50) NOT NULL DEFAULT '',
  4242. `valueField` varchar(50) NOT NULL DEFAULT '',
  4243. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4244. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  4245. `createdBy` char(30) NOT NULL DEFAULT '',
  4246. `createdDate` datetime DEFAULT NULL,
  4247. `editedBy` char(30) NOT NULL DEFAULT '',
  4248. `editedDate` datetime DEFAULT NULL,
  4249. PRIMARY KEY (`id`),
  4250. KEY `type` (`type`)
  4251. ) ENGINE=InnoDB;
  4252. CREATE TABLE `zt_workflowfield` (
  4253. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4254. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4255. `module` varchar(30) NOT NULL DEFAULT '',
  4256. `field` varchar(50) NOT NULL DEFAULT '',
  4257. `type` varchar(20) NOT NULL DEFAULT 'varchar',
  4258. `length` varchar(10) NOT NULL DEFAULT '',
  4259. `name` varchar(50) NOT NULL DEFAULT '',
  4260. `control` varchar(20) NOT NULL DEFAULT '',
  4261. `expression` text DEFAULT NULL,
  4262. `options` text DEFAULT NULL,
  4263. `default` varchar(100) NOT NULL DEFAULT '',
  4264. `rules` varchar(255) NOT NULL DEFAULT '',
  4265. `placeholder` varchar(100) NOT NULL DEFAULT '',
  4266. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4267. `searchOrder` smallint(5) unsigned NOT NULL DEFAULT 0,
  4268. `exportOrder` smallint(5) unsigned NOT NULL DEFAULT 0,
  4269. `canExport` enum('0','1') NOT NULL DEFAULT '0',
  4270. `canSearch` enum('0','1') NOT NULL DEFAULT '0',
  4271. `isValue` enum('0','1') NOT NULL DEFAULT '0',
  4272. `readonly` enum('0','1') NOT NULL DEFAULT '0',
  4273. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4274. `role` varchar(10) NOT NULL DEFAULT 'custom',
  4275. `desc` text DEFAULT NULL,
  4276. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4277. `createdDate` datetime DEFAULT NULL,
  4278. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4279. `editedDate` datetime DEFAULT NULL,
  4280. PRIMARY KEY (`id`),
  4281. UNIQUE KEY `unique` (`group`,`module`,`field`),
  4282. KEY `module` (`module`),
  4283. KEY `field` (`field`),
  4284. KEY `order` (`order`)
  4285. ) ENGINE=InnoDB;
  4286. CREATE TABLE `zt_workflowgroup` (
  4287. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4288. `type` varchar(10) NOT NULL DEFAULT '',
  4289. `projectModel` varchar(10) NOT NULL DEFAULT '',
  4290. `projectType` varchar(10) NOT NULL DEFAULT '',
  4291. `name` varchar(30) NOT NULL DEFAULT '',
  4292. `code` varchar(30) NOT NULL DEFAULT '',
  4293. `desc` text DEFAULT NULL,
  4294. `disabledModules` varchar(255) NOT NULL DEFAULT '',
  4295. `status` varchar(10) NOT NULL DEFAULT 'wait',
  4296. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  4297. `main` enum('0','1') NOT NULL DEFAULT '0',
  4298. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4299. `createdDate` datetime DEFAULT NULL,
  4300. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4301. `editedDate` datetime DEFAULT NULL,
  4302. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  4303. PRIMARY KEY (`id`),
  4304. KEY `type` (`type`)
  4305. ) ENGINE=InnoDB;
  4306. CREATE TABLE `zt_workflowlabel` (
  4307. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4308. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4309. `module` varchar(30) NOT NULL DEFAULT '',
  4310. `action` varchar(30) NOT NULL DEFAULT 'browse',
  4311. `code` varchar(30) NOT NULL DEFAULT '',
  4312. `label` varchar(255) NOT NULL DEFAULT '',
  4313. `params` text DEFAULT NULL,
  4314. `orderBy` text DEFAULT NULL,
  4315. `order` tinyint(3) NOT NULL DEFAULT 0,
  4316. `buildin` tinyint(1) unsigned NOT NULL DEFAULT 0,
  4317. `role` varchar(10) NOT NULL DEFAULT 'custom',
  4318. `createdBy` char(30) NOT NULL DEFAULT '',
  4319. `createdDate` datetime DEFAULT NULL,
  4320. `editedBy` char(30) NOT NULL DEFAULT '',
  4321. `editedDate` datetime DEFAULT NULL,
  4322. PRIMARY KEY (`id`),
  4323. KEY `module` (`module`)
  4324. ) ENGINE=InnoDB;
  4325. CREATE TABLE `zt_workflowlayout` (
  4326. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4327. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4328. `module` varchar(30) NOT NULL DEFAULT '',
  4329. `action` varchar(50) NOT NULL DEFAULT '',
  4330. `ui` mediumint(8) NOT NULL DEFAULT 0,
  4331. `field` varchar(50) NOT NULL DEFAULT '',
  4332. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4333. `width` varchar(50) NOT NULL DEFAULT '0',
  4334. `position` text DEFAULT NULL,
  4335. `readonly` enum('0','1') NOT NULL DEFAULT '0',
  4336. `mobileShow` enum('0','1') NOT NULL DEFAULT '1',
  4337. `summary` varchar(20) NOT NULL DEFAULT '',
  4338. `defaultValue` text DEFAULT NULL,
  4339. `layoutRules` varchar(255) NOT NULL DEFAULT '',
  4340. `vision` varchar(10) NOT NULL DEFAULT 'rnd',
  4341. PRIMARY KEY (`id`),
  4342. UNIQUE KEY `unique` (`group`,`module`,`action`,`ui`,`field`,`vision`),
  4343. KEY `module` (`module`),
  4344. KEY `action` (`action`),
  4345. KEY `order` (`order`)
  4346. ) ENGINE=InnoDB;
  4347. CREATE TABLE `zt_workflowlinkdata` (
  4348. `objectType` varchar(30) NOT NULL DEFAULT '',
  4349. `objectID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4350. `linkedType` varchar(30) NOT NULL DEFAULT '',
  4351. `linkedID` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4352. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4353. `createdDate` datetime DEFAULT NULL,
  4354. UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`)
  4355. ) ENGINE=InnoDB;
  4356. CREATE TABLE `zt_workflowrelation` (
  4357. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4358. `prev` varchar(30) NOT NULL DEFAULT '',
  4359. `next` varchar(30) NOT NULL DEFAULT '',
  4360. `field` varchar(50) NOT NULL DEFAULT '',
  4361. `actions` varchar(20) NOT NULL DEFAULT '',
  4362. `actionCodes` text DEFAULT NULL,
  4363. `buildin` enum('0','1') NOT NULL DEFAULT '0',
  4364. `createdBy` char(30) NOT NULL DEFAULT '',
  4365. `createdDate` datetime DEFAULT NULL,
  4366. PRIMARY KEY (`id`)
  4367. ) ENGINE=InnoDB;
  4368. CREATE TABLE `zt_workflowrelationlayout` (
  4369. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4370. `prev` varchar(30) NOT NULL DEFAULT '',
  4371. `next` varchar(30) NOT NULL DEFAULT '',
  4372. `action` varchar(50) NOT NULL DEFAULT '',
  4373. `ui` mediumint(8) NOT NULL DEFAULT 0,
  4374. `field` varchar(50) NOT NULL DEFAULT '',
  4375. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4376. PRIMARY KEY (`id`),
  4377. UNIQUE KEY `unique` (`prev`,`next`,`action`,`ui`,`field`),
  4378. KEY `prev` (`prev`),
  4379. KEY `next` (`next`),
  4380. KEY `action` (`action`),
  4381. KEY `order` (`order`)
  4382. ) ENGINE=InnoDB;
  4383. CREATE TABLE `zt_workflowreport` (
  4384. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4385. `module` varchar(30) NOT NULL,
  4386. `name` varchar(100) NOT NULL,
  4387. `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie',
  4388. `countType` enum('sum','count') NOT NULL DEFAULT 'sum',
  4389. `displayType` enum('value','percent') NOT NULL DEFAULT 'value',
  4390. `dimension` varchar(130) NOT NULL,
  4391. `fields` text NOT NULL,
  4392. `order` smallint(5) unsigned NOT NULL DEFAULT 0,
  4393. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4394. `createdDate` datetime DEFAULT NULL,
  4395. PRIMARY KEY (`id`)
  4396. ) ENGINE=InnoDB;
  4397. CREATE TABLE `zt_workflowrule` (
  4398. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4399. `type` enum('system','regex','func') NOT NULL DEFAULT 'regex',
  4400. `name` varchar(30) NOT NULL DEFAULT '',
  4401. `rule` text DEFAULT NULL,
  4402. `createdBy` char(30) NOT NULL DEFAULT '',
  4403. `createdDate` datetime DEFAULT NULL,
  4404. `editedBy` char(30) NOT NULL DEFAULT '',
  4405. `editedDate` datetime DEFAULT NULL,
  4406. PRIMARY KEY (`id`),
  4407. KEY `type` (`type`)
  4408. ) ENGINE=InnoDB;
  4409. CREATE TABLE `zt_workflowsql` (
  4410. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4411. `module` varchar(30) NOT NULL DEFAULT '',
  4412. `field` varchar(50) NOT NULL DEFAULT '',
  4413. `action` varchar(50) NOT NULL DEFAULT '',
  4414. `sql` text DEFAULT NULL,
  4415. `vars` text DEFAULT NULL,
  4416. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4417. `createdDate` datetime DEFAULT NULL,
  4418. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4419. `editedDate` datetime DEFAULT NULL,
  4420. PRIMARY KEY (`id`),
  4421. KEY `module` (`module`),
  4422. KEY `field` (`field`),
  4423. KEY `action` (`action`)
  4424. ) ENGINE=InnoDB;
  4425. CREATE TABLE `zt_workflowui` (
  4426. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4427. `group` mediumint(8) unsigned NOT NULL DEFAULT 0,
  4428. `module` varchar(30) NOT NULL,
  4429. `action` varchar(50) NOT NULL,
  4430. `name` varchar(30) NOT NULL,
  4431. `conditions` text DEFAULT NULL,
  4432. PRIMARY KEY (`id`),
  4433. KEY `module` (`module`),
  4434. KEY `action` (`action`)
  4435. ) ENGINE=InnoDB;
  4436. CREATE TABLE `zt_workflowversion` (
  4437. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4438. `module` varchar(30) NOT NULL DEFAULT '',
  4439. `version` varchar(10) NOT NULL DEFAULT '',
  4440. `fields` text DEFAULT NULL,
  4441. `actions` text DEFAULT NULL,
  4442. `layouts` text DEFAULT NULL,
  4443. `sqls` text DEFAULT NULL,
  4444. `labels` text DEFAULT NULL,
  4445. `table` text DEFAULT NULL,
  4446. `datas` text DEFAULT NULL,
  4447. PRIMARY KEY (`id`),
  4448. UNIQUE KEY `moduleversion` (`module`,`version`),
  4449. KEY `module` (`module`),
  4450. KEY `version` (`version`)
  4451. ) ENGINE=InnoDB;
  4452. CREATE TABLE `zt_zoutput` (
  4453. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  4454. `activity` mediumint(8) NOT NULL DEFAULT 0,
  4455. `name` varchar(255) NOT NULL DEFAULT '',
  4456. `content` mediumtext DEFAULT NULL,
  4457. `optional` char(20) NOT NULL DEFAULT '',
  4458. `tailorNorm` varchar(255) NOT NULL DEFAULT '',
  4459. `status` varchar(30) NOT NULL DEFAULT '',
  4460. `createdBy` varchar(30) NOT NULL DEFAULT '',
  4461. `createdDate` datetime DEFAULT NULL,
  4462. `editedBy` varchar(30) NOT NULL DEFAULT '',
  4463. `editedDate` datetime DEFAULT NULL,
  4464. `order` mediumint(8) DEFAULT 0,
  4465. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  4466. PRIMARY KEY (`id`)
  4467. ) ENGINE=InnoDB;