zentao21.2.sql 175 KB

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