zentao18.9.sql 164 KB

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