zentao20.7.1.sql 173 KB

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