zentao21.6.1.sql 177 KB

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