zentao21.1.sql 173 KB

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