zentao18.7.sql 160 KB

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