zentao18.12.sql 167 KB

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