zentao21.4.sql 176 KB

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