1 Star 0 Fork 0

onec/wnq_pdm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
wnq.pdma.json 204.99 KB
一键复制 编辑 原始数据 按行查看 历史
onec 提交于 2024-01-20 11:07 . 1
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683
{
"name": "wnq",
"describe": "wnq",
"avatar": "",
"version": "4.1.1",
"createdTime": "2023-11-21 08:17:18",
"updatedTime": "2024-1-18 23:54:30",
"dbConns": [],
"profile": {
"default": {
"db": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
"dbConn": "5FAAE58E-6D1A-4CCE-8E18-FCAB9EADD0B7",
"entityInitFields": [
{
"defKey": "TENANT_ID",
"defName": "租户号",
"comment": "",
"type": "",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"uiHint": "",
"id": "ADB3AD14-6603-43E2-8261-114E32442B5B"
},
{
"defKey": "REVISION",
"defName": "乐观锁",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"uiHint": "",
"id": "92BF430E-01FA-4AEF-944F-25A142632654"
},
{
"defKey": "CREATED_BY",
"defName": "创建人",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"uiHint": "",
"id": "C8BE2C7A-8251-4ADD-BB4F-411C5754DA62"
},
{
"defKey": "CREATED_TIME",
"defName": "创建时间",
"comment": "",
"domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"uiHint": "",
"id": "4E471FD6-3E73-4A90-B660-51598A482409"
},
{
"defKey": "UPDATED_BY",
"defName": "更新人",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"uiHint": "",
"id": "0DC24AA9-4CD0-45D8-95CF-FA546BE343AB"
},
{
"defKey": "UPDATED_TIME",
"defName": "更新时间",
"comment": "",
"domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"uiHint": "",
"id": "09F64AC4-4DEE-428F-AF64-4C103884E1AC"
}
],
"entityInitProperties": {
"partitioned by": "(date string)",
"row format delimited": "",
"fields terminated by ','": "",
"collection items terminated by '-'": "",
"map keys terminated by ':'": "",
"store as textfile;": ""
}
},
"javaHome": "",
"sql": {
"delimiter": ""
},
"dataTypeSupports": [
{
"defKey": "MYSQL",
"id": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E"
},
{
"defKey": "ORACLE",
"id": "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542"
},
{
"defKey": "SQLServer",
"id": "BFC87171-C74F-494A-B7C2-76B9C55FACC9"
},
{
"defKey": "PostgreSQL",
"id": "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022"
},
{
"defKey": "DB2",
"id": "89504F5D-94BF-4C9E-8B2E-44F37305FED5"
},
{
"defKey": "DM",
"id": "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307"
},
{
"defKey": "GaussDB",
"id": "592C7013-143D-4E7B-AF64-0D7BF1E28230"
},
{
"defKey": "Kingbase",
"id": "77BD85E5-9D0D-4096-8427-CBA306FC9C6A"
},
{
"defKey": "MaxCompute",
"id": "11D1FB71-A587-4217-89BA-611B8A1F83E0"
},
{
"defKey": "SQLite",
"id": "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1"
},
{
"defKey": "JAVA",
"id": "797A1496-D649-4261-89B4-544132EC3F36"
},
{
"defKey": "JavaMybatis",
"id": "895CFD1D-4273-4D32-A2C4-CAC70200AB5B"
},
{
"defKey": "JavaMybatisPlus",
"id": "A2EE7B4A-CE62-4290-B00C-B26C1BF18073"
},
{
"defKey": "C#",
"id": "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30"
},
{
"defKey": "Hive",
"id": "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2"
},
{
"defKey": "Golang",
"id": "B91D99E0-9B7C-416C-8737-B760957DAF09"
}
],
"codeTemplates": [
{
"type": "appCode",
"applyFor": "797A1496-D649-4261-89B4-544132EC3F36",
" JpaBean": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport javax.persistence.*;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@Table(name=\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n {{? field.primaryKey }}\n @Id\n @GeneratedValue\n {{?}}\n @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n return this.{{=it.func.camel(field.defKey,false)}};\n }\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n }\n{{~}}\n}"
},
{
"type": "appCode",
"applyFor": "F3AC2415-E86B-40C6-9FEB-F4B7937D2C30",
"Default": "using System;\nusing System.Collections.Generic;\n\n$blankline\n{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n}}\n/*\n * @author : http://www.chiner.com.cn\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n * @desc : {{=it.func.join(it.entity.defName,it.entity.comment,'-')}}\n */\nnamespace PDManer.Application\n{\n public partial class {{=it.func.camel(it.entity.defKey,true) }}\n {\n \n {{~it.entity.fields:field:index}}\n /// <summary>\n /// {{=it.func.join(field.defName,field.comment,';')}}\n /// </summary>\n public {{=field.type}} {{=it.func.camel(field.defKey,true)}} { get; set; }\n $blankline\n {{~}}\n \n }\n}",
"SqlSugar": "using System;\nusing System.Collections.Generic;\nusing SqlSugar;\n\n$blankline\n{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n var sqlSugartable='[SugarTable(\"{{=it.entity.defKey}}\", TableDescription = \"{{=it.func.join(it.entity.defName,it.entity.comment,';')}}\")]';\n}}\n/*\n * @author : xkdong@163.com\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n * @desc : {{=it.func.join(it.entity.defName,it.entity.comment,'-')}}\n */\nnamespace Model.DBModel\n{\n /// <summary>\n /// {{=it.func.join(it.entity.defName,it.entity.comment,';')}}\n /// </summary>\n {{=sqlSugartable}}\n public class {{=it.entity.defKey}}\n {\n {{~it.entity.fields:field:index}}\n /// <summary>\n /// {{=it.func.join(field.defName,field.comment,';')}}\n /// </summary>\n {{? field.primaryKey }}\n [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]\n {{?}}\n public {{=field.type}} {{=it.func.camel(field.defKey,true)}}{ get; set; }\n $blankline\n {{~}}\n }\n}"
},
{
"applyFor": "895CFD1D-4273-4D32-A2C4-CAC70200AB5B",
"type": "appCode",
"Controller": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.controller;\n$blankline\nimport io.swagger.annotations.Api;\nimport io.swagger.annotations.ApiOperation;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageRequest;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.*;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.service.{{=serviceClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Api(tags = \"{{=it.entity.defName}}对象功能接口\")\n@RestController\n@RequestMapping(\"/{{=it.func.camel(it.entity.defKey,false)}}\")\npublic class {{=beanClass}}Controller{\n @Autowired\n private {{=serviceClass}} {{=serviceVarName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n @ApiOperation(\"通过ID查询单条数据\")\n @GetMapping(\"{{{=it.func.camel(pkVarName,false)}}}\")\n public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\n }\n $blankline\n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n @ApiOperation(\"分页查询\")\n @GetMapping\n public ResponseEntity<Page<{{=beanClass}}>> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n return ResponseEntity.ok({{=serviceVarName}}.paginQuery({{=beanVarName}}, pageRequest));\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"新增数据\")\n @PostMapping\n public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"更新数据\")\n @PutMapping\n public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n @ApiOperation(\"通过主键删除数据\")\n @DeleteMapping\n public ResponseEntity<Boolean> deleteById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\n }\n}",
"Service": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.service;\n$blankline\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageRequest;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\npublic interface {{=serviceClass}}{\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n \n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest);\n\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\n\n \n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\n\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n boolean deleteById({{=pkDataType}} {{=pkVarName}});\n}",
"ServiceImpl": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkVarNameU = \"UndefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkVarNameU = it.func.camel(field.defKey,true);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n var mapperName = beanVarName+'Mapper';\n \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport org.springframework.data.domain.Page;\nimport org.springframework.data.domain.PageImpl;\nimport org.springframework.data.domain.PageRequest;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\n @Autowired\n private {{=beanClass}}Mapper {{=mapperName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\n return {{=mapperName}}.queryById({{=pkVarName}});\n }\n $blankline\n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n long total = {{=mapperName}}.count({{=beanVarName}});\n return new PageImpl<>({{=mapperName}}.queryAllByLimit({{=beanVarName}}, pageRequest), pageRequest, total);\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\n {{=mapperName}}.insert({{=beanVarName}});\n return {{=beanVarName}};\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\n {{=mapperName}}.update({{=beanVarName}});\n return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\n int total = {{=mapperName}}.deleteById({{=pkVarName}});\n return total > 0;\n }\n}",
"Mapper": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.mapper;\n$blankline\nimport java.util.List;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport org.springframework.data.domain.Pageable;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper{\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n \n /** \n * 分页查询指定行数据\n *\n * @param {{=beanVarName}} 查询条件\n * @param pageable 分页对象\n * @return 对象列表\n */\n List<{{=beanClass}}> queryAllByLimit({{=beanClass}} {{=beanVarName}}, @Param(\"pageable\") Pageable pageable);\n\n /** \n * 统计总行数\n *\n * @param {{=beanVarName}} 查询条件\n * @return 总行数\n */\n long count({{=beanClass}} {{=beanVarName}});\n\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 影响行数\n */\n int insert({{=beanClass}} {{=beanVarName}});\n\n /** \n * 批量新增数据\n *\n * @param entities List<{{=beanClass}}> 实例对象列表\n * @return 影响行数\n */\n int insertBatch(@Param(\"entities\") List<{{=beanClass}}> entities);\n \n /** \n * 批量新增或按主键更新数据\n *\n * @param entities List<{{=beanClass}}> 实例对象列表\n * @return 影响行数\n */\n int insertOrUpdateBatch(@Param(\"entities\") List<{{=beanClass}}> entities);\n \n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 影响行数\n */\n int update({{=beanClass}} {{=beanVarName}});\n\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 影响行数\n */\n int deleteById({{=pkDataType}} {{=pkVarName}});\n}",
"Mapper.xml": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n var pkField = \"UNDEFINED_ID\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkField = field.defKey;\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n <resultMap type=\"{{=pkgName}}.entity.{{=beanClass}}\" id=\"{{=beanClass}}Map\">\n {{~it.entity.fields:field:index}}\n <result property=\"{{=it.func.camel(field.defKey,false)}}\" column=\"{{=field.defKey}}\" jdbcType=\"{{=field.dbType}}\"/>\n {{~}}\n </resultMap>\n $blankline\n <!-- 通过ID查询单条数据 -->\n <select id=\"queryById\" resultMap=\"{{=beanClass}}Map\">\n select\n {{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}}\n from {{=it.entity.defKey}}\n where {{=pkField}} = #{{{=pkVarName}}}\n </select>\n $blankline\n <!--分页查询指定行数据-->\n <select id=\"queryAllByLimit\" resultMap=\"{{=beanClass}}Map\">\n select\n {{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}}\n from {{=it.entity.defKey}}\n <where>\n {{~it.entity.fields:field:index}}\n <if test=\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != ''\">\n and {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}}\n </if>\n {{~}}\n </where>\n limit #{pageable.offset}, #{pageable.pageSize}\n </select>\n $blankline\n <!--统计总行数-->\n <select id=\"count\" resultType=\"java.lang.Long\">\n select count(1)\n from {{=it.entity.defKey}}\n <where>\n {{~it.entity.fields:field:index}}\n <if test=\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != ''\">\n and {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}}\n </if>\n {{~}}\n </where>\n </select>\n $blankline\n <!--新增数据-->\n <insert id=\"insert\" keyProperty=\"{{=pkField}}\" useGeneratedKeys=\"true\">\n insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n values ({{=it.entity.fields.map(function(e,i){return '#{'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n </insert>\n $blankline\n <!-- 批量新增数据 -->\n <insert id=\"insertBatch\" keyProperty=\"{{=pkField}}\" useGeneratedKeys=\"true\">\n insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n values\n <foreach collection=\"entities\" item=\"entity\" separator=\",\">\n ({{=it.entity.fields.map(function(e,i){return '#{entity.'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n </foreach>\n </insert>\n $blankline\n <!-- 批量新增或按主键更新数据 -->\n <insert id=\"insertOrUpdateBatch\" keyProperty=\"{{=pkField}}\" useGeneratedKeys=\"true\">\n insert into {{=it.entity.defKey}}({{=it.entity.fields.map(function(e,i){return e.defKey}).join(',')}})\n values\n <foreach collection=\"entities\" item=\"entity\" separator=\",\">\n ({{=it.entity.fields.map(function(e,i){return '#{entity.'+it.func.camel(e.defKey,false)+'}'}).join(',')}})\n </foreach>\n on duplicate key update\n {{=it.entity.fields.map(function(e,i){return e.defKey + '=values('+e.defKey+')'}).join(',\\n\\t\\t')}}\n </insert>\n $blankline\n <!-- 更新数据 -->\n <update id=\"update\">\n update {{=it.entity.defKey}}\n <set>\n {{~it.entity.fields:field:index}}\n <if test=\"{{=it.func.camel(field.defKey,false)}} != null and {{=it.func.camel(field.defKey,false)}} != ''\">\n {{=field.defKey}} = #{{{=it.func.camel(field.defKey,false)}}},\n </if>\n {{~}}\n </set>\n where {{=pkField}} = #{{{=pkVarName}}}\n </update>\n $blankline\n <!--通过主键删除-->\n <delete id=\"deleteById\">\n delete from {{=it.entity.defKey}} where {{=pkField}} = #{{{=pkVarName}}}\n </delete>\n</mapper>\n\n",
"Entity": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n return this.{{=it.func.camel(field.defKey,false)}};\n }\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n }\n{{~}}\n}"
},
{
"applyFor": "A2EE7B4A-CE62-4290-B00C-B26C1BF18073",
"type": "appCode",
"Controller": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.controller;\n$blankline\nimport java.util.List;\nimport io.swagger.annotations.Api;\nimport io.swagger.annotations.ApiOperation;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.data.domain.PageImpl;\nimport org.springframework.data.domain.PageRequest;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.*;\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.service.{{=serviceClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表控制层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Api(tags = \"{{=it.entity.defName}}对象功能接口\")\n@RestController\n@RequestMapping(\"/{{=it.func.camel(it.entity.defKey,false)}}\")\npublic class {{=beanClass}}Controller{\n @Autowired\n private {{=serviceClass}} {{=serviceVarName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n @ApiOperation(\"通过ID查询单条数据\")\n @GetMapping(\"{{{=it.func.camel(pkVarName,false)}}}\")\n public ResponseEntity<{{=beanClass}}> queryById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.queryById({{=pkVarName}}));\n }\n $blankline\n /** \n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param pageRequest 分页对象\n * @return 查询结果\n */\n @ApiOperation(\"分页查询\")\n @GetMapping\n public ResponseEntity<PageImpl<{{=beanClass}}>> paginQuery({{=beanClass}} {{=beanVarName}}, PageRequest pageRequest){\n //1.分页参数\n long current = pageRequest.getPageNumber();\n long size = pageRequest.getPageSize();\n\n //2.分页查询\n /*把Mybatis的分页对象做封装转换,MP的分页对象上有一些SQL敏感信息,还是通过spring的分页模型来封装数据吧*/\n com.baomidou.mybatisplus.extension.plugins.pagination.Page<{{=beanClass}}> pageResult = {{=serviceVarName}}.paginQuery({{=beanVarName}}, current,size);\n\n //3. 分页结果组装\n List<{{=beanClass}}> dataList = pageResult.getRecords();\n long total = pageResult.getTotal();\n PageImpl<{{=beanClass}}> retPage = new PageImpl<{{=beanClass}}>(dataList,pageRequest,total);\n return ResponseEntity.ok(retPage);\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"新增数据\")\n @PostMapping\n public ResponseEntity<{{=beanClass}}> add({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.insert({{=beanVarName}}));\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n @ApiOperation(\"更新数据\")\n @PutMapping\n public ResponseEntity<{{=beanClass}}> edit({{=beanClass}} {{=beanVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.update({{=beanVarName}}));\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n @ApiOperation(\"通过主键删除数据\")\n @DeleteMapping\n public ResponseEntity<Boolean> deleteById({{=pkDataType}} {{=pkVarName}}){\n return ResponseEntity.ok({{=serviceVarName}}.deleteById({{=pkVarName}}));\n }\n}",
"Service": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.service;\n$blankline\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务接口\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\npublic interface {{=serviceClass}}{\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}});\n $blankline\n /**\n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param current 当前页码\n * @param size 每页大小\n * @return\n */\n Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size);\n\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} insert({{=beanClass}} {{=beanVarName}});\n\n \n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n {{=beanClass}} update({{=beanClass}} {{=beanVarName}});\n\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n boolean deleteById({{=pkDataType}} {{=pkVarName}});\n}",
"ServiceImpl": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkVarNameU = \"UndefinedId\";\n var pkFieldKey = \"UNDEFINED\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkFieldKey = field.defKey;\n pkVarName = it.func.camel(field.defKey,false);\n pkVarNameU = it.func.camel(field.defKey,true);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n var mapperName = beanVarName+'Mapper';\n \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport cn.hutool.core.util.StrUtil;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;\nimport com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;\n\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl implements {{=serviceClass}}{\n @Autowired\n private {{=beanClass}}Mapper {{=mapperName}};\n $blankline\n /** \n * 通过ID查询单条数据 \n *\n * @param {{=pkVarName}} 主键\n * @return 实例对象\n */\n public {{=beanClass}} queryById({{=pkDataType}} {{=pkVarName}}){\n return {{=mapperName}}.selectById({{=pkVarName}});\n }\n $blankline\n /**\n * 分页查询\n *\n * @param {{=beanVarName}} 筛选条件\n * @param current 当前页码\n * @param size 每页大小\n * @return\n */\n public Page<{{=beanClass}}> paginQuery({{=beanClass}} {{=beanVarName}}, long current, long size){\n //1. 构建动态查询条件\n LambdaQueryWrapper<{{=beanClass}}> queryWrapper = new LambdaQueryWrapper<>();\n {{~it.entity.fields.filter(function(e){return e[\"type\"]===\"String\"&&e.defKey !== pkFieldKey}):field:index}}\n if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\n queryWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\n }\n {{~}}\n\n //2. 执行分页查询\n Page<{{=beanClass}}> pagin = new Page<>(current , size , true);\n IPage<{{=beanClass}}> selectResult = {{=mapperName}}.selectByPage(pagin , queryWrapper);\n pagin.setPages(selectResult.getPages());\n pagin.setTotal(selectResult.getTotal());\n pagin.setRecords(selectResult.getRecords());\n\n //3. 返回结果\n return pagin;\n }\n $blankline\n /** \n * 新增数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} insert({{=beanClass}} {{=beanVarName}}){\n {{=mapperName}}.insert({{=beanVarName}});\n return {{=beanVarName}};\n }\n $blankline\n /** \n * 更新数据\n *\n * @param {{=beanVarName}} 实例对象\n * @return 实例对象\n */\n public {{=beanClass}} update({{=beanClass}} {{=beanVarName}}){\n //1. 根据条件动态更新\n LambdaUpdateChainWrapper<{{=beanClass}}> chainWrapper = new LambdaUpdateChainWrapper<{{=beanClass}}>({{=mapperName}});\n {{~it.entity.fields.filter(function(e){return e[\"type\"]===\"String\"&&e.defKey !== pkFieldKey}):field:index}}\n if(StrUtil.isNotBlank({{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}())){\n chainWrapper.eq({{=beanClass}}::get{{=it.func.camel(field.defKey,true)}}, {{=beanVarName}}.get{{=it.func.camel(field.defKey,true)}}());\n }\n {{~}}\n //2. 设置主键,并更新\n chainWrapper.set({{=beanClass}}::get{{=pkVarNameU}}, {{=beanVarName}}.get{{=pkVarNameU}}());\n boolean ret = chainWrapper.update();\n //3. 更新成功了,查询最最对象返回\n if(ret){\n return queryById({{=beanVarName}}.get{{=pkVarNameU}}());\n }else{\n return {{=beanVarName}};\n }\n }\n $blankline\n /** \n * 通过主键删除数据\n *\n * @param {{=pkVarName}} 主键\n * @return 是否成功\n */\n public boolean deleteById({{=pkDataType}} {{=pkVarName}}){\n int total = {{=mapperName}}.deleteById({{=pkVarName}});\n return total > 0;\n }\n}",
"Mapper": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.mapper;\n$blankline\n\nimport com.baomidou.mybatisplus.core.conditions.Wrapper;\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.baomidou.mybatisplus.core.toolkit.Constants;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper extends BaseMapper<{{=beanClass}}>{\n /** \n * 分页查询指定行数据\n *\n * @param page 分页参数\n * @param wrapper 动态查询条件\n * @return 分页对象列表\n */\n IPage<{{=beanClass}}> selectByPage(IPage<{{=beanClass}}> page , @Param(Constants.WRAPPER) Wrapper<{{=beanClass}}> wrapper);\n}",
"Mapper.xml": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n var pkField = \"UNDEFINED_ID\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkField = field.defKey;\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n$blankline\n\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n <select id=\"selectByPage\" resultType=\"{{=pkgName}}.entity.{{=beanClass}}\">\n select * from user ${ew.customSqlSegment}\n </select>\n</mapper>\n\n",
"Entity": "{{ var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1;\n var days=today.getDate();\n \n var pkVarName = \"undefinedId\";\n var pkDataType = \"String\";\n it.entity.fields.forEach(function(field){\n if(field.primaryKey){\n pkVarName = it.func.camel(field.defKey,false);\n pkDataType = field[\"type\"];\n return;\n }\n });\n \n var pkgName = it.entity.env.base.nameSpace;\n var beanClass = it.entity.env.base.codeRoot;\n var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n var serviceClass = beanClass+'Service';\n var serviceVarName= beanVarName+'Service';\n \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.util.Date;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n {{? field.primaryKey }}\n @TableId\n {{?}}\n private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n\n{{~it.entity.fields:field:index}}\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public {{=field.type}} get{{=it.func.camel(field.defKey,true)}}(){\n return this.{{=it.func.camel(field.defKey,false)}};\n }\n /** {{=it.func.join(field.defName,field.comment,';')}} */\n public void set{{=it.func.camel(field.defKey,true)}}({{=field.type}} {{= it.func.camel(field.defKey,false) }}){\n this.{{=it.func.camel(field.defKey,false)}}={{=it.func.camel(field.defKey,false)}};\n }\n{{~}}\n}"
},
{
"applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
"type": "dbDDL",
"createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.dbType}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }} COMMENT '{{=it.func.join(field.defName,field.comment,';')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n) COMMENT = '{{=it.func.join(it.entity.defName,it.entity.comment,';') }}';\n$blankline\n",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
"deleteTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"deleteIndex": "{{~ it.entity.indexes:index}}\nDROP INDEX {{=index.defKey}} ;\n{{~}}",
"message": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChanged(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}\n",
"update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('ALTER TABLE '+before.defKey+' RENAME TO '+after.defKey);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n ret.push('ALTER TABLE '+after.defKey+' COMMENT \\''+commentText+'\\'');\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldAdded) { \n let ddlItem = 'ADD COLUMN '+field.defKey+' '+field.dbType;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n if(field.autoIncrement){\n ddlItem += ' AUTO_INCREMENT';\n }\n if(field.defaultValue){\n ddlItem += (' DEFAULT' + field.defaultValue);\n }\n ddlItem += (' COMMENT \\''+field.defName+';'+field.comment+'\\'');\n \n if(field.index>0 && field.afterFieldKey){\n ddlItem += (' AFTER '+field.afterFieldKey);\n }\n ret.push(ddlItem);\n }\n return firstDDL+'\\n'+ret.join(',\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldRemoved) { \n ret.push('DROP '+field.defKey);\n }\n return firstDDL+'\\n'+ret.join(',\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = 'ALTER TABLE '+entity.data.baseInfo.defKey;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey === after.defKey){\n changeDDL += (' MODIFY COLUMN '+after.defKey);\n }else{\n changeDDL += (' CHANGE COLUMN '+before.defKey+' '+after.defKey);\n }\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(field.scale)>0){\n changeDDL += (','+field.scale);\n }\n changeDDL += ')';\n }\n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n let defaultValue = '';\n if(after.defaultValue != null && after.defaultValue.length>0){\n defaultValue = (after.defaultValue);\n }else{\n defaultValue = 'NULL';\n }\n changeDDL += (' DEFAULT ' + defaultValue);\n let comment = after.comment||'';\n changeDDL += (' COMMENT \\''+comment+'\\';');\n ret.push(firstDDL+' '+changeDDL);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
},
{
"applyFor": "A4E23CB7-BB01-4BD1-9F71-F73F3E15A542",
"type": "dbDDL",
"createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
"deleteTable": "DROP TABLE {{=it.entity.defKey}};",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"deleteIndex": "{{~ it.entity.indexes:index}}\nDROP INDEX {{=index.defKey}} ;\n{{~}}",
"message": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChanged(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* -------------------------------------------------- */\n创建表:\n{{~ createEntities:entity}}\n {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* -------------------------------------------------- */\n删除表:\n{{~ dropEntities:entity}}\n {{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* -------------------------------------------------- */\n修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n {{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n {{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n {{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n {{?}}{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}\n {{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('\\n\\t建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('\\n\\t解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}\n{{=indexChanged?'\\n\\t更改了索引':''}}\n{{=changed?'\\n\\t更改了属性':''}}\n{{=relaArray.length>0?relaArray.join(''):''}}\n{{~}}\n{{?}}",
"update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n let myText = `COMMENT ON TABLE ${after.defKey} IS '${commentText}'`;\n ret.push(myText);\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldAdded) { \n let ddlItem = `ADD (${field.defKey} ${field.dbType}`;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n let defaultValue = field.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n ddlItem += (' DEFAULT ' + defaultValue);\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n ddlItem += ')';\n ret.push(`${firstDDL} ${ddlItem}`);\n \n /*处理字段注释*/\n let fieldComments = [];\n if(field.defName != null &&field.defName.length>0){\n fieldComments.push(field.defName);\n }\n if(field.comment != null &&field.comment.length>0){\n fieldComments.push(field.comment);\n }\n let commentText = fieldComments.join(';');\n if(commentText != null && commentText.length > 0){\n let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS '${commentText}'`;\n ret.push(commentDDL);\n }\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldRemoved) { \n ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey !== after.defKey){\n let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\n ret.push(renameText);\n }\n /*如果没有变化,则不生成变更语句*/\n if(before.dbType === after.dbType \n && before['len'] === after['len'] \n && before.scale === after.scale\n && before.primaryKey === after.primaryKey\n && before.notNull === after.notNull\n && before.autoIncrement === after.autoIncrement\n && before.defaultValue === after.defaultValue){\n continue;\n }\n changeDDL += ('MODIFY ('+after.defKey+'');\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(field.scale)>0){\n changeDDL += (','+field.scale);\n }\n changeDDL += ')';\n }\n let defaultValue = after.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n changeDDL += (' DEFAULT ' + defaultValue);\n }\n \n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n changeDDL += ')';\n ret.push(`${firstDDL} ${changeDDL};`);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
},
{
"applyFor": "BFC87171-C74F-494A-B7C2-76B9C55FACC9",
"type": "dbDDL",
"createTable": "IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[{{=it.entity.defKey}}]') AND type in (N'U')) DROP TABLE [dbo].[{{=it.entity.defKey}}];\n\nCREATE TABLE [dbo].[{{=it.entity.defKey}}](\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? ' IDENTITY(1,1)' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}EXEC sp_addextendedproperty 'MS_Description', '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}', 'SCHEMA', dbo, 'table', {{=it.entity.defKey}}, null, null;{{?}}\n{{~it.entity.fields:field:index}}\nEXEC sp_addextendedproperty 'MS_Description', '{{=it.func.join(field.defName,field.comment,';')}}', 'SCHEMA', dbo, 'table', {{=it.entity.defKey}}, 'column', {{=field.defKey}};\n{{~}}\n",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
"deleteTable": "IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[{{=it.entity.defKey}}]') AND type in (N'U')) DROP TABLE [dbo].[{{=it.entity.defKey}}];",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"deleteIndex": "",
"message": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChanged(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}",
"update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push(`EXEC sp_rename '${before.defKey}','${after.defKey}'`);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n let myText = `IF ((SELECT COUNT(*) FROM ::fn_listextendedproperty('MS_Description','SCHEMA', 'dbo','TABLE', '${after.defKey}', NULL, NULL)) > 0)\n \\n\\tEXEC sp_updateextendedproperty 'MS_Description', '${commentText}','SCHEMA', 'dbo','TABLE', '${after.defKey}'\n \\nELSE\n \\n\\tEXEC sp_addextendedproperty 'MS_Description', '${commentText}', 'SCHEMA', 'dbo','TABLE', '${after.defKey}'\n `;\n ret.push(myText);\n /*ret.push('ALTER TABLE '+after.defKey+' COMMENT \\''+commentText+'\\'');*/\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n for (let field of fieldAdded) { \n let ddlItem = `ADD [${field.defKey}] ${field.dbType}`;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n let defaultValue = field.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n ddlItem += (' DEFAULT ' + defaultValue);\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n }\n ret.push(`${firstDDL} ${ddlItem}`);\n \n /*处理字段注释*/\n let fieldComments = [];\n if(field.defName != null &&field.defName.length>0){\n fieldComments.push(field.defName);\n }\n if(field.comment != null &&field.comment.length>0){\n fieldComments.push(field.comment);\n }\n let commentText = fieldComments.join(';');\n if(commentText != null && commentText.length > 0){\n let commentDDL = `EXEC sp_addextendedproperty 'MS_Description', N'${commentText}','SCHEMA', N'dbo','TABLE', N'${entity.data.baseInfo.defKey}','COLUMN', N'${field.defKey}'`;\n ret.push(commentDDL);\n }\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n for (let field of fieldRemoved) { \n ret.push(`${firstDDL} DROP COLUMN [${field.defKey}]`);\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = `ALTER TABLE [dbo].[${entity.data.baseInfo.defKey}]`;\n for (let field of fieldModified) { \n let changeDDL = '';\n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey === after.defKey){\n changeDDL += (' ALTER COLUMN ['+after.defKey+']');\n }else{\n let renameText = `EXEC sp_rename '[dbo].[${entity.data.baseInfo.defKey}].[${before.defKey}]','${after.defKey}','COLUMN';`;\n ret.push(renameText);\n continue;\n }\n changeDDL += (' '+after.dbType);\n if(after.len>0){\n changeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n changeDDL += (','+after.scale);\n }\n changeDDL += ')';\n }\n let defaultValue = after.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n changeDDL += (' DEFAULT ' + defaultValue);\n }\n \n if(after.notNull){\n changeDDL += ' NOT NULL';\n }\n ret.push(`${firstDDL} ${changeDDL};`);\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
},
{
"applyFor": "DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022",
"type": "dbDDL",
"createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{? field.autoIncrement}}SERIAL{{??}}{{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
"deleteTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"deleteIndex": "{{~ it.entity.indexes:index}}\nDROP INDEX {{=index.defKey}} ;\n{{~}}",
"message": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChanged(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push('代码:'+(before.defKey||'NULL')+'->'+(after.defKey||'NULL'));\n }\n if(before.defName !== after.defName){\n ret.push('显示名称:'+(before.defName||'NULL')+'->'+(after.defName||'NULL'));\n }\n if(before.comment !== after.comment){\n ret.push('说明:'+(before.comment||'NULL')+'->'+(after.comment||'NULL'));\n }\n if(ret.length>0){\n return ' 基本信息:\\n\\t'+ret.join('\\n\\t');\n }\n return '';\n };\n \n function buildAddedDesc(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n \n for (let field of fieldAdded) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildRemovedDesc(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n \n for (let field of fieldRemoved) { \n let row = [];\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n \n function buildModifiedDesc(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n for (let field1 of fieldModified) { \n let row = [];\n let field = field1.before;\n row.push(field.defKey+'['+field.defName+']');\n ret.push(row.join(\"\"))\n }\n return ret;\n };\n}}\n\n\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=entity.data.defKey}}[{{=entity.data.defName}}]\n{{~}}\n{{?}}\n\n{{? modifyEntities && modifyEntities.length > 0}}\n/* --------------- 修改表 --------------- */\n{{~ modifyEntities:entity}}\n{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]{{let changeText=baseChanged(entity.data.baseChanged);}}\n{{=baseChanged(entity.data.baseChanged)}}\n {{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n 修改字段:\n {{='\\t'}}{{=buildModifiedDesc(entity).join('\\n\\t')}}{{?}}{{\n /*计算是否调整了属性*/\n let propAdded = entity.data.propAdded || [];\n let propRemoved = entity.data.propRemoved || [];\n let propModified = entity.data.propModified || [];\n let changed = propAdded.length>0 || propRemoved.length>0 || propModified.length>0;\n /*计算关联是否调整*/\n let refEntityAdd = entity.data.refEntityAdd || [];\n let refEntityRemoved = entity.data.refEntityRemoved || [];\n let relaArray = [];\n for (let rela of refEntityAdd) {\n relaArray.push('建立关联:'+rela.defKey+'['+rela.defName+']');\n }\n for (let rela of refEntityRemoved) {\n relaArray.push('解除关联:'+rela.defKey+'['+rela.defName+']');\n }\n /*索引是否修改过*/\n let indexChanged = entity.data.indexChanged;\n }}{{=indexChanged?'\\n\\t更改了索引':''}}{{=changed?'\\n\\t更改了属性':''}}{{=relaArray.length>0?('\\n\\t'+relaArray.join('\\n\\t')):''}}\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n 添加字段:\n{{='\\t'}}{{=buildAddedDesc(entity).join('\\n\\t')}}\n{{?}}{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n 删除字段:\n{{='\\t'}}{{=buildRemovedDesc(entity).join('\\n\\t')}}\n{{?}}\n{{~}}\n{{?}}",
"update": "{{\n let createEntities = it.changes.filter(function(row){return (row.opt==='add'&&row['type']==='entity');});\n let dropEntities = it.changes.filter(function(row){return (row.opt==='delete'&&row['type']==='entity');});\n let modifyEntities = it.changes.filter(function(row){return (row.opt==='update'&&row['type']==='entity');});\n \n function baseChangedDDL(beforeAfter){\n if(beforeAfter == null){\n return '';\n }\n let ret = [];\n let before = beforeAfter.before || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n let after = beforeAfter.after || {\"defKey\":\"\",\"defName\":\"\",\"comment\":\"\"};\n if(before.defKey !== after.defKey){\n ret.push(`ALTER TABLE ${before.defKey} RENAME TO ${after.defKey}`);\n }\n let commentText = '';\n let commentChanged = false;\n if(before.defName !== after.defName){\n commentText = after.defName;\n commentChanged = true;\n }\n if(before.comment !== after.comment){\n commentChanged = true;\n if(commentText){\n commentText = (commentText+ ';'+after.comment)\n }else{\n commentText = after.comment\n }\n }\n if(commentChanged){\n let myText = `COMMENT ON TABLE ${after.defKey} IS '${commentText}'`;\n ret.push(myText);\n }\n let baseText = '-- 基本信息:\\n';\n return baseText+ret.join(';\\n')+';';\n };\n \n function buildAddedDDL(entity){\n let ret = [];\n let fieldAdded = entity.data.fieldAdded||[];\n if(fieldAdded.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldAdded) { \n let ddlItem = `ADD COLUMN ${field.defKey} ${field.dbType}`;\n /*处理数据类型长度*/\n if(field.len>0){\n ddlItem += ('('+field.len);\n if(parseInt(field.scale)>0){\n ddlItem += (','+field.scale);\n }\n ddlItem += ')';\n }\n if(field.notNull){\n ddlItem += ' NOT NULL';\n } \n let defaultValue = field.defaultValue;\n defaultValue = (defaultValue==null)?\"\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n ddlItem += (' DEFAULT ' + defaultValue);\n }\n\n ret.push(`${firstDDL} ${ddlItem}`);\n \n /*处理字段注释*/\n let fieldComments = [];\n if(field.defName != null &&field.defName.length>0){\n fieldComments.push(field.defName);\n }\n if(field.comment != null &&field.comment.length>0){\n fieldComments.push(field.comment);\n }\n let commentText = fieldComments.join(';');\n if(commentText != null && commentText.length > 0){\n let commentDDL = `COMMENT ON COLUMN ${entity.data.baseInfo.defKey}.${field.defKey} IS '${commentText}'`;\n ret.push(commentDDL);\n }\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildRemovedDDL(entity){\n let ret = [];\n let fieldRemoved = entity.data.fieldRemoved||[];\n if(fieldRemoved.length == 0){\n return '';\n }\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldRemoved) { \n ret.push(`${firstDDL} DROP COLUMN ${field.defKey}`);\n }\n return '\\n'+ret.join(';\\n');\n };\n \n function buildModifiedDDL(entity){\n let ret = [];\n let fieldModified = entity.data.fieldModified||[];\n \n let firstDDL = `ALTER TABLE ${entity.data.baseInfo.defKey}`;\n for (let field of fieldModified) { \n let before = field.before || {};\n let after = field.after || {};\n if(before.defKey !== after.defKey){\n let renameText = `ALTER TABLE ${entity.data.baseInfo.defKey} RENAME COLUMN ${before.defKey} TO ${after.defKey};`;\n ret.push(renameText);\n }\n /*如果没有变化,则不生成变更语句*/\n if(before.dbType === after.dbType \n && before['len'] === after['len'] \n && before.scale === after.scale\n && before.primaryKey === after.primaryKey\n && before.notNull === after.notNull\n && before.autoIncrement === after.autoIncrement\n && before.defaultValue === after.defaultValue){\n continue;\n }\n if(before.dbType !== after.dbType || before.len !== after.len || before.scale !== after.scale){\n let dbTypeDDL = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${after.defKey} TYPE ${before.dbType}`;\n if(after.len>0){\n dbTypeDDL += ('('+after.len);\n if(parseInt(after.scale)>0){\n dbTypeDDL += (','+after.scale);\n }\n dbTypeDDL += ')';\n }\n ret.push(dbTypeDDL+';');\n }\n \n if(before.defaultValue !== after.defaultValue){\n let defaultDDL = '';\n let defaultValue = after.defaultValue;\n defaultValue = (defaultValue==null)?\"NULL\":(\"\"+defaultValue);\n if(defaultValue.length>0){\n defaultDDL += ('SET DEFAULT ' + defaultValue);\n }\n let defaultTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${defaultDDL};`;\n ret.push(defaultTpl);\n }\n \n if(before.notNull !== after.notNull){\n let notNullDDL= 'SET NULL';\n if(after.notNull){\n let notNullDDL= 'SET NOT NULL';\n }\n let notNullTpl = `ALTER TABLE ${entity.data.baseInfo.defKey} ALTER COLUMN ${notNullDDL};`;\n ret.push(notNullTpl);\n }\n }\n return ret;\n };\n}}\n{{? createEntities && createEntities.length > 0}}\n/* --------------- 创建表 --------------- */\n{{~ createEntities:entity}}\n{{=it.func.createDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? dropEntities && dropEntities.length > 0}}\n/* --------------- 删除表 --------------- */\n{{~ dropEntities:entity}}\n{{=it.func.dropDDL(entity.data,entity['type'])}}\n{{~}}\n{{?}}\n\n\n{{? modifyEntities && modifyEntities.length > 0}}\n{{~ modifyEntities:entity}}\n/* --------------- 修改表 --------------- */\n-- 修改表:{{=entity.data.baseInfo.defKey}}[{{=entity.data.baseInfo.defName}}]\n{{=baseChangedDDL(entity.data.baseChanged)}}\n{{? entity.data.fieldModified && entity.data.fieldModified.length > 0}}\n-- 修改字段:\n{{=buildModifiedDDL(entity).join('\\n')}}\n{{?}}{{\n/*索引是否修改过*/\nlet indexChanged = entity.data.indexChanged;\n}}\n{{? indexChanged }}\n-- 索引重建\n{{=it.func.indexRebuildDDL(entity.data.baseInfo,entity.data.newIndexes,entity.data.fullFields,entity['type'])}}\n{{?}}\n\n{{? entity.data.fieldAdded && entity.data.fieldAdded.length > 0}}\n-- 添加字段:\n{{=buildAddedDDL(entity)}};\n{{?}}\n\n{{? entity.data.fieldRemoved && entity.data.fieldRemoved.length > 0}}\n-- 删除字段:\n{{=buildRemovedDDL(entity)}};\n{{?}}\n{{~}}\n{{?}}"
},
{
"type": "dbDDL",
"applyFor": "89504F5D-94BF-4C9E-8B2E-44F37305FED5",
"createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
},
{
"type": "dbDDL",
"applyFor": "0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307",
"createTable": "CREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? '' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ','('+field.defaultValue+')',' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
},
{
"type": "dbDDL",
"applyFor": "592C7013-143D-4E7B-AF64-0D7BF1E28230",
"createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT' : '' }}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
},
{
"type": "dbDDL",
"applyFor": "77BD85E5-9D0D-4096-8427-CBA306FC9C6A",
"createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{= field.defaultValue ? it.func.join(' DEFAULT ',field.defaultValue,' ') : '' }}{{?}}{{= field.notNull ? ' NOT NULL' : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n);\n$blankline\n{{? it.entity.defKey || it.entity.defName}}COMMENT ON TABLE {{=it.entity.defKey}} IS '{{=it.func.join(it.entity.defName,it.entity.comment,';')}}';{{?}}\n{{~it.entity.fields:field:index}}\n{{? field.defName || field.comment}}COMMENT ON COLUMN {{=it.entity.defKey}}.{{=field.defKey}} IS '{{=it.func.join(field.defName,field.comment,';')}}';{{?}}\n{{~}}",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
},
{
"applyFor": "11D1FB71-A587-4217-89BA-611B8A1F83E0",
"type": "dbDDL",
"createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }} COMMENT '{{=it.func.join(field.defName,field.comment,';')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n) COMMENT '{{=it.func.join(it.entity.defName,it.entity.comment,';') }}';\n$blankline\n",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n",
"deleteTable": "",
"createIndex": "",
"deleteIndex": "",
"message": "",
"update": ""
},
{
"applyFor": "B363BE0B-F852-49B8-9B2E-F6D2174DEAC1",
"type": "dbDDL",
"createTable": "DROP TABLE IF EXISTS {{=it.entity.defKey}};\nCREATE TABLE {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\n {{=field.defKey}} {{=field.type}}{{?field.len>0}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{?}}{{=')'}}{{?}} {{= field.notNull ? 'NOT NULL' : '' }} {{= field.autoIncrement ? 'AUTOINCREMENT' : '' }} {{= field.defaultValue ? it.func.join('DEFAULT',field.defaultValue,' ') : '' }}{{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }} --{{=it.func.join(field.defName,field.comment,';')}}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\n{{?}}\n) ; --{{=it.func.join(it.entity.defName,it.entity.comment,';') }}\n$blankline\n",
"createIndex": "{{~ it.entity.indexes:index}}\nCREATE {{? index.unique}}UNIQUE {{?}}INDEX {{=index.defKey}} ON {{=it.entity.defKey}}({{ fieldsKeys = index.fields.map(function(field){return field.fieldDefKey}) ; }}{{=it.func.join(...fieldsKeys,',')}});\n{{~}}",
"createView": "CREATE VIEW {{=it.view.defKey}} AS\nSELECT \n{{~it.view.fields:field:index}}\n {{=field.refEntity}}.{{=field.refEntityField}} AS {{=field.defKey}}{{= index < it.view.fields.length-1 ? ',' : ''}}\n{{~}}\nFROM {{~it.view.refEntities:refEntity:index}}{{=refEntity}}{{= index < it.view.refEntities.length-1 ? ',' : ''}}{{~}};\n$blankline\n"
},
{
"type": "dbDDL",
"applyFor": "dictSQLTemplate",
"content": "/* 插入字典总表[{{=it.dict.defKey}}-{{=it.dict.defName}}] */\nINSERT INTO SYS_DICT(KEY_,LABEL,INTRO,REVISION) VALUES('{{=it.dict.defKey}}','{{=it.dict.defName}}','{{=it.dict.intro}}',1);\n/* 插入字典明细表 */\n{{~it.dict.items:item:index}}\nINSERT INTO SYS_DICT_ITEM(DICT_KEY,KEY_,LABEL,SORT_,INTRO,REVISION) VALUES('{{=it.dict.defKey}}','{{=item.defKey}}','{{=item.defName}}','{{=item.sort}}','{{=item.intro}}',1);\n{{~}}"
},
{
"applyFor": "81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2",
"type": "dbDDL",
"createTable": "/**字段名,关键字等全部用的小写*/\ndrop table if exists {{=it.entity.defKey}};\n/**补充上库名,external关键字根据建表规范看是否添加*/\ncreate [external] table if not exists {{=it.entity.defKey}}(\n{{ pkList = [] ; }}\n/**这里把varchar,char,text,date,datetime字段全部映射为string类型.tinyint unsigned,bit,Integer,tinyint,smallint,mediumint映射为int类型,int unsigned映射为bigint.其它自定义映射规则根据自己情况修改*/\n/**当长度>0只有为decimal类型或double类型时才保留长度和小数的位数*/\n{{~it.entity.fields:field:index}}\n {{=it.func.lowerCase(field.defKey)}} {{=it.func.lowerCase(field.dbType)=='varchar'||it.func.lowerCase(field.dbType)=='char'||it.func.lowerCase(field.dbType)=='text'||it.func.lowerCase(field.dbType)=='date'||it.func.lowerCase(field.dbType)=='datetime' ? 'string':it.func.lowerCase(field.dbType)=='tinyint unsigned'||it.func.lowerCase(field.dbType)=='bit'||it.func.lowerCase(field.dbType)=='integer'||it.func.lowerCase(field.dbType)=='tinyint'||it.func.lowerCase(field.dbType)=='smallint'||it.func.lowerCase(field.dbType)=='mediumint' ? 'int':it.func.lowerCase(field.dbType)=='int unsigned' ? 'bigint':it.func.lowerCase(field.dbType)}}{{?field.len>0&&(it.func.lowerCase(field.dbType)=='decimal'||it.func.lowerCase(field.dbType)=='double')}}{{='('}}{{=field.len}}{{?field.scale>0}}{{=','}}{{=field.scale}}{{=')'}}{{?}}{{?}} comment '{{=it.func.join(field.defName,field.comment,'')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n{{?}}\n)\n{{\n let partitionedBy = it.entity.properties['partitioned by'];\n partitionedBy = partitionedBy?partitionedBy:'请在扩展属性中配置[partitioned by]属性';\n}}\ncomment '{{=it.func.join(it.entity.defName,';') }}'\n/**是否分区表,分区字段名和字段注释自定义*/\n[partitioned by {{=partitionedBy}}]\n/**文件存储格式自定义*/\n[stored as orc]\n/**hdfs上的地址自定义*/\n[location xxx]\n;",
"createView": "",
"deleteTable": "",
"createIndex": "",
"deleteIndex": "",
"message": "",
"update": ""
},
{
"applyFor": "B91D99E0-9B7C-416C-8737-B760957DAF09",
"type": "appCode",
"content": "{{\n var today=new Date();\n var fullYear=today.getFullYear();\n var month=today.getMonth() + 1<10?\"0\"+today.getMonth():today.getMonth();\n var days=today.getDate()<10?\"0\"+today.getDate():today.getDate();\n var hours = today.getHours()<10?\"0\"+today.getHours():today.getHours(); \n\tvar minutes = today.getMinutes()<10?\"0\"+today.getMinutes():today.getMinutes(); \n\tvar seconds = today.getSeconds()<10?\"0\"+today.getSeconds():today.getSeconds(); \n}}\n// Package models {{=it.func.join(it.entity.defName,it.entity.comment,',')}}\n// author : http://www.liyang.love\n// date : {{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n// desc : {{=it.func.join(it.entity.defName,it.entity.comment,',')}}\npackage models\n\n$blankline\n\n// {{=it.func.camel(it.entity.defKey,true) }} {{=it.func.join(it.entity.defName,it.entity.comment,',')}}。\n// 说明:{{=it.entity.comment}}\n// 表名:{{=it.entity.defKey}}\n// group: {{=it.func.camel(it.entity.defKey,true) }}\n// obsolete:\n// appliesto:go 1.8+;\n// namespace:hongmouer.his.models.{{=it.func.camel(it.entity.defKey,true) }}\n// assembly: hongmouer.his.models.go\n// class:HongMouer.HIS.Models.{{=it.func.camel(it.entity.defKey,true) }}\n// version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\ntype {{=it.func.camel(it.entity.defKey,true) }} struct {\n {{~it.entity.fields:field:index}}\n {{=formatGoLang(it.func.camel(field.defKey,true),null,field,it.entity.fields,null,1)}} {{=formatGoLang(field.type,\"type\",field,it.entity.fields,10,3)}} `gorm:\"column:{{=field.primaryKey?\"primaryKey;\":\"\"}}{{=field.defKey}}\" json:\"{{=it.func.camel(field.defKey,true)}}\"` {{=formatGoLang(\"gorm:column:\"+field.defKey+\" json:\"+it.func.camel(field.defKey,true),null,field,it.entity.fields,null,2)}} //type:{{=formatGoLang(field.type,\"type\",field,it.entity.fields,null,3)}} comment:{{=formatGoLang(it.func.join(field.defName,field.comment,';'),\"defName\",field,it.entity.fields,null,4)}} version:{{=fullYear}}-{{=month}}-{{=days}} {{=hours}}:{{=minutes}}\n {{~}}\n}\n\n\n$blankline\n// TableName 表名:{{=it.entity.defKey}},{{=it.entity.defName}}。\n// 说明:{{=it.entity.comment}}\nfunc (ZentaoUserInfo) TableName() string {\n\treturn \"{{=it.entity.defKey}}\"\n}\n\n{{\n\nfunction formatGoLang(str, fieldName, field, fileds, emptLength, isFiled) {\n var maxLength = 0;\n\n if (isFiled == 1) {\n for (var i = 0; i < fileds.length; i++) {\n if (getBlength(it.func.camel(fileds[i].defKey, true)) > maxLength) {\n maxLength = getBlength(it.func.camel(fileds[i].defKey, true)) + 2;\n }\n }\n } else if (isFiled == 2) {\n for (var i = 0; i < fileds.length; i++) {\n var newStr = \"gorm:column:\" + fileds[i].defKey + \" json:\" + it.func.camel(fileds[i].defKey, true);\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 2;\n }\n }\n var empt = \"\";\n var strLength = getBlength(str);\n if (field.primaryKey) {\n strLength += getBlength(\"primaryKey;\");\n }\n for (var j = 0; j < maxLength - strLength; j++) {\n empt += ' ';\n }\n return empt;\n } else if (isFiled == 3) {\n /*获取某个字段的最大长度*/\n for (var i = 0; i < fileds.length; i++) {\n var newStr = eval(\"fileds[\" + i + \"].\" + fieldName);\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 1;\n }\n }\n } else if (isFiled == 4) {\n /*获取某个字段的最大长度*/\n for (var i = 0; i < fileds.length; i++) {\n var newStr = fileds[i].comment + \";\" + fileds[i].defName;\n if (getBlength(newStr) > maxLength) {\n maxLength = getBlength(newStr) + 1;\n }\n }\n }\n else {\n maxLength = emptLength;\n }\n\n var strLength = getBlength(str);\n for (var j = 0; j < maxLength - strLength; j++) {\n str += ' ';\n }\n return str;\n}\n\nfunction getBlength(str) {\n var n = 0;\n for (var i = str.length; i--;) {\n n += str.charCodeAt(i) > 255 ? 2 : 1;\n }\n return n;\n} \n\n}}"
}
],
"generatorDoc": {
"docTemplate": ""
},
"relationFieldSize": "15",
"uiHint": [
{
"defKey": "Input",
"defName": "普通输入框",
"id": "642D2E0A-8846-4549-BE56-8C0473F26EDE"
},
{
"defKey": "Select",
"defName": "下拉输入框",
"id": "FB111359-2B73-4443-926C-08A98E446448"
},
{
"defKey": "CheckBox",
"defName": "复选框",
"id": "0CB8A6C9-1115-4FC0-B51E-5C028065082F"
},
{
"defKey": "RadioBox",
"defName": "单选框",
"id": "5C04987A-260F-4B7C-A5D5-22A181AAE9CA"
},
{
"defKey": "Double",
"defName": "小数输入",
"id": "8D5BAFE4-E15C-4707-A047-8EE59C58E70F"
},
{
"defKey": "Integer",
"defName": "整数输入",
"id": "9999AF2A-A44E-415C-A2DC-D7C613BD0073"
},
{
"defKey": "Money",
"defName": "金额输入",
"id": "2B0C3D0C-7BAF-4B36-81AD-9362B5E5DC2E"
},
{
"defKey": "Date",
"defName": "日期输入",
"id": "E4D94E14-F695-487F-AFC2-4D888009B7DA"
},
{
"defKey": "DataYearMonth",
"defName": "年月输入",
"id": "936927E3-DD2D-4096-87FD-074CDE278D59"
},
{
"defKey": "Text",
"defName": "长文本输入",
"id": "D89DD4F1-ADAC-4469-BF8D-B3FF41AE7963"
},
{
"defKey": "RichText",
"defName": "富文本输入",
"id": "C134EB1F-4CFF-49E0-882F-2C6FB275CB20"
}
],
"headers": [
{
"refKey": "defKey",
"hideInGraph": false
},
{
"refKey": "defName",
"hideInGraph": false
},
{
"refKey": "primaryKey",
"hideInGraph": false
},
{
"refKey": "notNull",
"hideInGraph": true
},
{
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"refKey": "domain",
"hideInGraph": true
},
{
"refKey": "type",
"hideInGraph": false
},
{
"refKey": "len",
"hideInGraph": false
},
{
"refKey": "scale",
"hideInGraph": false
},
{
"refKey": "comment",
"hideInGraph": true
},
{
"refKey": "refDict",
"hideInGraph": true
},
{
"refKey": "defaultValue",
"hideInGraph": true
},
{
"refKey": "isStandard",
"hideInGraph": false
},
{
"refKey": "uiHint",
"hideInGraph": true
},
{
"refKey": "extProps",
"hideInGraph": true
}
],
"menuWidth": "286px"
},
"entities": [
{
"id": "181A844D-992E-4114-A88B-D958B183AB91",
"env": {
"base": {
"nameSpace": "",
"codeRoot": ""
}
},
"defKey": "sys_wnq_organ",
"defName": "部门同步表",
"comment": "",
"properties": {
"partitioned by": "(date string)",
"row format delimited": "",
"fields terminated by ','": "",
"collection items terminated by '-'": "",
"map keys terminated by ':'": "",
"store as textfile;": ""
},
"nameTemplate": "{defKey}[{defName}]",
"headers": [
{
"refKey": "hideInGraph",
"hideInGraph": true
},
{
"refKey": "defKey",
"hideInGraph": false
},
{
"refKey": "defName",
"hideInGraph": false
},
{
"refKey": "primaryKey",
"hideInGraph": false
},
{
"refKey": "notNull",
"hideInGraph": true
},
{
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"refKey": "domain",
"hideInGraph": true
},
{
"refKey": "type",
"hideInGraph": false
},
{
"refKey": "len",
"hideInGraph": false
},
{
"refKey": "scale",
"hideInGraph": false
},
{
"refKey": "comment",
"hideInGraph": true
},
{
"refKey": "refDict",
"hideInGraph": true
},
{
"refKey": "defaultValue",
"hideInGraph": true
},
{
"refKey": "isStandard",
"hideInGraph": false
},
{
"refKey": "uiHint",
"hideInGraph": true
},
{
"refKey": "extProps",
"hideInGraph": true
}
],
"fields": [
{
"defKey": "id",
"defName": "",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": true,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "364B4E3C-8C9C-44EE-A181-B0956C154FEE"
},
{
"defKey": "create_time",
"defName": "创建时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'CURRENT_TIMESTAMP'",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "6B1066AA-2CA7-4116-8735-8391025386C6"
},
{
"defKey": "update_time",
"defName": "修改时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "726D581C-510D-4E04-AD53-9276FDAE0FE2"
},
{
"defKey": "remarks",
"defName": "备注",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"refDict": "",
"extProps": {},
"id": "0277AC47-B8B5-4259-9FB5-69EFDB7692A7"
},
{
"defKey": "del_flag",
"defName": "逻辑删除标记(0:显示;1:隐藏)",
"comment": "",
"type": "CHAR",
"len": 1,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'0'",
"hideInGraph": true,
"refDict": "",
"extProps": {},
"id": "05BF43D9-E654-4265-9338-C92824601EF8"
},
{
"defKey": "tenant_id",
"defName": "租户ID",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "14EA4E1A-B714-48B3-BC17-E1821CD6AF29"
},
{
"defKey": "logo",
"defName": "logo",
"comment": "",
"type": "VARCHAR",
"len": 500,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"extProps": {},
"id": "CE9BD629-68C8-490C-9C48-0A00AFE68262"
},
{
"defKey": "mdm_code",
"defName": "部门编码",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "CD3964DA-C01A-467E-8E02-D6BDABACC36A"
},
{
"defKey": "mdm_name",
"defName": "部门名称",
"comment": "",
"type": "VARCHAR",
"len": 50,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "DEDE7A0C-4D0D-49ED-9795-CECE3DA42E6F"
},
{
"defKey": "status",
"defName": "0:正常",
"comment": "9:冻结",
"type": "CHAR",
"len": 2,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"extProps": {},
"id": "6296CF8D-2332-4B79-8F27-7F994CE97CAA"
},
{
"defKey": "parent_id",
"defName": "父类ID",
"comment": "为0时是租户,-1时是平台系统管理",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "A6B3FB16-1FFB-42F7-A2F7-522C7035B2CD"
},
{
"defKey": "sync_time",
"defName": "同步时间节点:按mdm推送的更新时间未准",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "2C586147-9762-45AB-AE91-641E3FEDDE84"
}
],
"correlations": [],
"indexes": []
},
{
"id": "4EDA20A0-424E-4133-9EF4-32B7D10F80EE",
"defKey": "sys_organ",
"defName": "机构管理",
"comment": "",
"properties": {},
"fields": [
{
"defKey": "id",
"defName": "",
"comment": null,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": true,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "F30FF970-44DC-4DA4-A059-C9A9FEFE7BCB",
"extProps": {}
},
{
"defKey": "create_time",
"defName": "创建时间",
"comment": "",
"domain": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'CURRENT_TIMESTAMP'",
"hideInGraph": false,
"refDict": "",
"id": "12AC21C8-435E-41B1-A381-9D3FB4AC4424",
"extProps": {}
},
{
"defKey": "update_time",
"defName": "修改时间",
"comment": "",
"domain": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "4BD965E4-8808-4B61-ABDD-EB6A75595205",
"extProps": {}
},
{
"defKey": "parent_id",
"defName": "父类ID",
"comment": "为0时是租户,-1时是平台系统管理",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "E72C91F7-35CE-4D8A-9F0F-7EB58758CCEC",
"extProps": {}
},
{
"defKey": "sort",
"defName": "排序",
"comment": "",
"domain": "",
"type": "INT",
"len": 11,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "1",
"hideInGraph": false,
"refDict": "",
"id": "B8EBA213-A66C-421C-B96A-178B6ECFB7DF",
"extProps": {}
},
{
"defKey": "type",
"defName": "机构类型",
"comment": "",
"domain": "",
"type": "CHAR",
"len": 2,
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "C876E742-DDB9-4F96-AEF6-233422057418",
"extProps": {}
},
{
"defKey": "code",
"defName": "机构编码",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "C47983DA-CF28-43CA-ACBA-7BD975FC49A3",
"extProps": {}
},
{
"defKey": "name",
"defName": "机构名称",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 50,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "B9CB912C-5B14-4570-8DDB-A3FBD6101F56",
"extProps": {}
},
{
"defKey": "phone",
"defName": "电话",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 20,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "730FF10F-F4E1-48B0-911F-B94ED16DF53F",
"extProps": {}
},
{
"defKey": "fax",
"defName": "传真",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "88B6920E-D138-40C5-A40A-9701BE53DAE3",
"extProps": {}
},
{
"defKey": "email",
"defName": "邮箱",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "73711B82-8263-41F6-A6A5-E4357C73F524",
"extProps": {}
},
{
"defKey": "address",
"defName": "地址",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 500,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "7E0AA58A-2E36-4D73-8218-58DB0EF72A73",
"extProps": {}
},
{
"defKey": "remarks",
"defName": "备注",
"comment": "",
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "64A075E5-0090-4B30-80D0-BA73E7DA1EB6",
"extProps": {}
},
{
"defKey": "del_flag",
"defName": "逻辑删除标记(0:显示;1:隐藏)",
"comment": "",
"domain": "",
"type": "CHAR",
"len": 1,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'0'",
"hideInGraph": true,
"refDict": "",
"id": "E7F33E6B-1240-4963-BED6-D6BF7353FB4B",
"extProps": {}
},
{
"defKey": "tenant_id",
"defName": "租户ID",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "7DA90046-5C26-4892-BF78-4EBEE2B8CC3D",
"extProps": {}
},
{
"defKey": "status",
"defName": "0:正常",
"comment": "9:冻结",
"domain": "",
"type": "CHAR",
"len": 2,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "2641CF76-86BD-4E3B-9357-B941C39EC5C1",
"extProps": {}
},
{
"defKey": "logo",
"defName": "logo",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 500,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "C2B0952E-C412-481B-9A8C-91655ADABB78",
"extProps": {}
},
{
"defKey": "home_url",
"defName": "官方网址",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 100,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "6C0BC2AF-EBDB-4842-83CE-B0E18B4FDADA",
"extProps": {}
}
],
"indexes": [
{
"defKey": "uk_tenant_id_code",
"unique": true,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "F0697A77-4A73-4773-BEDF-8ED1F89038CD",
"fieldDefKey": "C47983DA-CF28-43CA-ACBA-7BD975FC49A3"
},
{
"ascOrDesc": "A",
"id": "8B3DF82C-5325-4936-A70B-3E1F31C55AFD",
"fieldDefKey": "7DA90046-5C26-4892-BF78-4EBEE2B8CC3D"
}
],
"id": "426A3C24-CC77-4C0C-A9FE-5E104A158251"
},
{
"defKey": "ids_tenant_id",
"unique": false,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "FF5B6B3C-7537-42E2-AFAE-9ED323145809",
"fieldDefKey": "7DA90046-5C26-4892-BF78-4EBEE2B8CC3D"
}
],
"id": "FABFBBD4-57F0-445B-959B-3125D6D98F3C"
}
],
"nameTemplate": "{defKey}[{defName}]",
"headers": [
{
"freeze": false,
"refKey": "hideInGraph",
"hideInGraph": true
},
{
"freeze": true,
"refKey": "defKey",
"hideInGraph": false
},
{
"freeze": true,
"refKey": "defName",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "primaryKey",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "notNull",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "domain",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "type",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "len",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "scale",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "comment",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "refDict",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "defaultValue",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "isStandard",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "uiHint",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "extProps",
"hideInGraph": true
}
],
"correlations": []
},
{
"id": "17EFFE33-748D-4C81-A177-EAC8FB458722",
"defKey": "sys_user",
"defName": "用户表",
"comment": "",
"properties": {},
"fields": [
{
"defKey": "id",
"defName": "主键ID",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": true,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "74B4BCDB-45B5-4666-B8C5-B8E8B27C6296",
"extProps": {}
},
{
"defKey": "username",
"defName": "用户名",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 64,
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "55C8EA55-6D14-4C37-B846-DB549051E8AB",
"extProps": {}
},
{
"defKey": "email",
"defName": "邮箱",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 64,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "C0C6390C-6D3B-4CF6-8DFB-7A4FFF79C729",
"extProps": {}
},
{
"defKey": "password",
"defName": "密码",
"comment": "",
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "3DDCA7D3-4F2A-4FEA-868F-927219557885",
"extProps": {}
},
{
"defKey": "salt",
"defName": "随机盐",
"comment": "",
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "9A2EDB22-94FD-466F-968E-2307553CD581",
"extProps": {}
},
{
"defKey": "phone",
"defName": "手机号",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 20,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "623C7F86-0716-4874-B9CA-7BC2281BA161",
"extProps": {}
},
{
"defKey": "avatar",
"defName": "头像",
"comment": "",
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "3545CDDB-A6EB-4215-8251-F8798FDA4C5C",
"extProps": {}
},
{
"defKey": "organ_id",
"defName": "机构ID",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "424D1EC2-F97A-4F16-8725-FA1D1A94795B",
"extProps": {}
},
{
"defKey": "create_time",
"defName": "创建时间",
"comment": "",
"domain": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'CURRENT_TIMESTAMP'",
"hideInGraph": false,
"refDict": "",
"id": "08B750DB-1A14-4FEB-AFE7-351FAEA517A6",
"extProps": {}
},
{
"defKey": "update_time",
"defName": "修改时间",
"comment": "",
"domain": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "DE1314B8-27D5-414A-9FCA-276404F7AC6C",
"extProps": {}
},
{
"defKey": "lock_flag",
"defName": "0-正常",
"comment": "9-锁定",
"domain": "",
"type": "CHAR",
"len": 1,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'0'",
"hideInGraph": false,
"refDict": "",
"id": "35727E7D-17B6-40BE-8C85-10C2288D9442",
"extProps": {}
},
{
"defKey": "del_flag",
"defName": "逻辑删除标记(0:显示;1:隐藏)",
"comment": "",
"domain": "",
"type": "CHAR",
"len": 1,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'0'",
"hideInGraph": false,
"refDict": "",
"id": "A052E01D-B166-41C2-AC31-36413FAF20C1",
"extProps": {}
},
{
"defKey": "wx_openid",
"defName": "微信openid",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"id": "F54F9082-FFDF-4973-8A32-0599261239E5",
"extProps": {}
},
{
"defKey": "qq_openid",
"defName": "QQ",
"comment": "openid",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "C0E25533-F7DF-4750-A595-7B49637BD998",
"extProps": {}
},
{
"defKey": "tenant_id",
"defName": "所属租户",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "CE06E04D-FE5D-4314-9907-CE36FE1F82FB",
"extProps": {}
},
{
"defKey": "type",
"defName": "账号类型:-1、系统管理员;1、租户管理员;2、店铺管理员",
"comment": "",
"domain": "",
"type": "CHAR",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "'1'",
"hideInGraph": true,
"refDict": "",
"id": "088C5AF7-9267-49E2-A5BE-4E4F92D605D7",
"extProps": {}
},
{
"defKey": "nick_name",
"defName": "昵称(客服系统中展示的名称)",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 64,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "372BE609-83D9-4E95-9B5D-076B8DEE7221",
"extProps": {}
},
{
"defKey": "shop_id",
"defName": "店铺ID",
"comment": "",
"domain": "",
"type": "VARCHAR",
"len": 64,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"id": "B18398F4-5365-421B-92DC-9987E2DA0C57",
"extProps": {}
}
],
"indexes": [
{
"defKey": "uk_email",
"unique": true,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "CDE04812-B5D8-4040-8347-A49A465A9FBD",
"fieldDefKey": "C0C6390C-6D3B-4CF6-8DFB-7A4FFF79C729"
}
],
"id": "8A2CFF5B-EED3-4EE3-A333-A8ED984D5968"
},
{
"defKey": "uk_phone",
"unique": true,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "C7C0015B-DF07-4174-8ECF-CD901E58E08D",
"fieldDefKey": "623C7F86-0716-4874-B9CA-7BC2281BA161"
}
],
"id": "D791D087-8584-4CE6-8B7D-A4A246AC6FF2"
},
{
"defKey": "uk_qq_openid",
"unique": true,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "6B156097-B428-48B9-8342-B0B7566647FB",
"fieldDefKey": "C0E25533-F7DF-4750-A595-7B49637BD998"
}
],
"id": "0FC6E055-BD12-47B3-B3D8-F7836B70546D"
},
{
"defKey": "uk_username",
"unique": true,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "3496B0A0-7F2A-466F-86BA-6A820DAEC9C1",
"fieldDefKey": "55C8EA55-6D14-4C37-B846-DB549051E8AB"
}
],
"id": "BE657B73-3CE3-461A-8DD5-9A4D510C905F"
},
{
"defKey": "uk_wx_openid",
"unique": true,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "1CB75F74-C44E-4C8D-BE03-0712963F5FEB",
"fieldDefKey": "F54F9082-FFDF-4973-8A32-0599261239E5"
}
],
"id": "D98AC71F-9923-4B07-BAF4-64C8D0AB5B61"
},
{
"defKey": "ids_tenant_id",
"unique": false,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "6DF76335-8643-4DEF-A9AD-F5F065DEAA6E",
"fieldDefKey": "CE06E04D-FE5D-4314-9907-CE36FE1F82FB"
}
],
"id": "33C75F29-4A2E-46EF-89BE-81BFB3F45A0B"
},
{
"defKey": "user_qq_openid",
"unique": false,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "86C83F1B-514C-4C78-96F0-66E90EAF68A4",
"fieldDefKey": "C0E25533-F7DF-4750-A595-7B49637BD998"
}
],
"id": "910E150E-647B-444E-AC8A-EB752EF22194"
},
{
"defKey": "user_wx_openid",
"unique": false,
"defName": null,
"comment": "",
"fields": [
{
"ascOrDesc": "A",
"id": "0C576BA0-7FC2-40FD-BFA3-6B938BE799CD",
"fieldDefKey": "F54F9082-FFDF-4973-8A32-0599261239E5"
}
],
"id": "1CC3A3EF-48BB-45DB-8A8F-D1CC7F90AB4B"
}
],
"nameTemplate": "{defKey}[{defName}]",
"headers": [
{
"freeze": false,
"refKey": "hideInGraph",
"hideInGraph": true
},
{
"freeze": true,
"refKey": "defKey",
"hideInGraph": false
},
{
"freeze": true,
"refKey": "defName",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "primaryKey",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "notNull",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "domain",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "type",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "len",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "scale",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "comment",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "refDict",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "defaultValue",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "isStandard",
"hideInGraph": false
},
{
"freeze": false,
"refKey": "uiHint",
"hideInGraph": true
},
{
"freeze": false,
"refKey": "extProps",
"hideInGraph": true
}
],
"correlations": []
},
{
"id": "16FA304A-607D-4A13-A5BB-118754E9C411",
"env": {
"base": {
"nameSpace": "",
"codeRoot": ""
}
},
"defKey": "sys_wnq_user",
"defName": "员工同步表",
"comment": "",
"properties": {
"partitioned by": "(date string)",
"row format delimited": "",
"fields terminated by ','": "",
"collection items terminated by '-'": "",
"map keys terminated by ':'": "",
"store as textfile;": ""
},
"nameTemplate": "{defKey}[{defName}]",
"headers": [
{
"refKey": "hideInGraph",
"hideInGraph": true
},
{
"refKey": "defKey",
"hideInGraph": false
},
{
"refKey": "defName",
"hideInGraph": false
},
{
"refKey": "primaryKey",
"hideInGraph": false
},
{
"refKey": "notNull",
"hideInGraph": true
},
{
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"refKey": "domain",
"hideInGraph": true
},
{
"refKey": "type",
"hideInGraph": false
},
{
"refKey": "len",
"hideInGraph": false
},
{
"refKey": "scale",
"hideInGraph": false
},
{
"refKey": "comment",
"hideInGraph": true
},
{
"refKey": "refDict",
"hideInGraph": true
},
{
"refKey": "defaultValue",
"hideInGraph": true
},
{
"refKey": "isStandard",
"hideInGraph": false
},
{
"refKey": "uiHint",
"hideInGraph": true
},
{
"refKey": "extProps",
"hideInGraph": true
}
],
"fields": [
{
"defKey": "id",
"defName": "主键ID",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": true,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "B53BAD7B-B8B1-4614-9672-D4B1147DB5DC"
},
{
"defKey": "mdm_code",
"defName": "员工工号",
"comment": "",
"type": "",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"uiHint": "",
"id": "F5A8ACB7-9AAA-40B1-A621-30348340A6AE"
},
{
"defKey": "mdm_name",
"defName": "姓名",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"uiHint": "",
"id": "9EFD09C1-8941-4E97-9326-8630BC1E44EC"
},
{
"defKey": "mdm_cell_phone",
"defName": "手机",
"comment": "",
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"type": "",
"len": 32,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": true,
"refDict": "",
"uiHint": "",
"id": "AF5B3EC3-CC5A-473A-A013-640CCAE52747"
},
{
"defKey": "mdm_nature_emp",
"defName": "用工性质",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "9EA6DD90-089E-436F-9BDF-FE60CE71D8AA"
},
{
"defKey": "mdm_electronic_mail",
"defName": "电子邮件",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "9318516C-AF2C-4628-8E1A-881BD45964D8"
},
{
"defKey": "mdmIsIn_service",
"defName": "是否在职",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "C19EAA18-86E9-4F34-8E24-3AEA16B2A595"
},
{
"defKey": "mdm_dept_code",
"defName": "所属部门编码",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "8768432A-DBA2-43D6-A8E1-D6065CB3875B"
},
{
"defKey": "mdm_hold_post",
"defName": "岗位",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "0585D9E4-38DF-4098-98DB-7EFEF602F53A"
},
{
"defKey": "mdm_data_state",
"defName": "数据状态",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "F1EB70A2-E1FB-4CD6-873D-A0D994574426"
},
{
"defKey": "sync_time",
"defName": "同步时间节点:按mdm推送的更新时间未准",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "7BB6B02F-BB55-4A85-A201-2E6C014A4D6F"
},
{
"defKey": "create_time",
"defName": "创建时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "'CURRENT_TIMESTAMP'",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "2B7E121B-3887-4EE4-B1B2-12A1B70644D3"
},
{
"defKey": "update_time",
"defName": "修改时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "0E8F1847-D46D-41DF-9A89-440861796844"
}
],
"correlations": [],
"indexes": []
},
{
"id": "7376BDC8-33DA-4E89-A034-CDB26C72FB96",
"env": {
"base": {
"nameSpace": "",
"codeRoot": ""
}
},
"defKey": "sys_wnq_region",
"defName": "行政区域",
"comment": "",
"properties": {
"partitioned by": "(date string)",
"row format delimited": "",
"fields terminated by ','": "",
"collection items terminated by '-'": "",
"map keys terminated by ':'": "",
"store as textfile;": ""
},
"nameTemplate": "{defKey}[{defName}]",
"headers": [
{
"refKey": "hideInGraph",
"hideInGraph": true
},
{
"refKey": "defKey",
"hideInGraph": false
},
{
"refKey": "defName",
"hideInGraph": false
},
{
"refKey": "primaryKey",
"hideInGraph": false
},
{
"refKey": "notNull",
"hideInGraph": true
},
{
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"refKey": "domain",
"hideInGraph": true
},
{
"refKey": "type",
"hideInGraph": false
},
{
"refKey": "len",
"hideInGraph": false
},
{
"refKey": "scale",
"hideInGraph": false
},
{
"refKey": "comment",
"hideInGraph": true
},
{
"refKey": "refDict",
"hideInGraph": true
},
{
"refKey": "defaultValue",
"hideInGraph": true
},
{
"refKey": "isStandard",
"hideInGraph": false
},
{
"refKey": "uiHint",
"hideInGraph": true
},
{
"refKey": "extProps",
"hideInGraph": true
}
],
"fields": [
{
"defKey": "id",
"defName": "",
"comment": "",
"type": "INT",
"len": 8,
"scale": "",
"primaryKey": true,
"notNull": true,
"autoIncrement": true,
"defaultValue": "",
"hideInGraph": false,
"domain": "",
"refDict": "",
"extProps": {},
"id": "41C3543A-D094-4C4A-8924-B14607088A43"
},
{
"defKey": "name",
"defName": "地区名称(当前地区)",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
"refDict": "",
"extProps": {},
"id": "6426F6F2-4D17-47B7-B713-7ECDBCDBB63B"
},
{
"defKey": "code",
"defName": "地区代码",
"comment": "",
"type": "VARCHAR",
"len": 8,
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "",
"refDict": "",
"extProps": {},
"id": "D4775553-37E6-4DA6-9C60-7D9477A53B2A"
},
{
"defKey": "parent_id",
"defName": "上级id",
"comment": "",
"type": "INT",
"len": 8,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "",
"refDict": "",
"extProps": {},
"id": "EDB3A0CA-9FDF-4293-84E7-466BEBF9B455"
},
{
"defKey": "province_code",
"defName": "省地区编码",
"comment": "",
"type": "VARCHAR",
"len": 8,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "",
"refDict": "",
"extProps": {},
"id": "4D0ED13F-131F-4BD1-82A2-758D83F9F6F8"
},
{
"defKey": "province_name",
"defName": "省地区名称",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
"refDict": "",
"extProps": {},
"id": "39507D26-7A8C-4109-9C12-3EE1D347E293"
},
{
"defKey": "town_code",
"defName": "市编码",
"comment": "",
"type": "VARCHAR",
"len": 8,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "",
"refDict": "",
"extProps": {},
"id": "E96CA0B1-A562-482C-A458-6131CEC51BE6"
},
{
"defKey": "town_name",
"defName": "市名称",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
"refDict": "",
"extProps": {},
"id": "A37AF675-6E89-4266-84D8-8C6C86B0E733"
},
{
"defKey": "district_code",
"defName": "区编码",
"comment": "",
"type": "VARCHAR",
"len": 8,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "",
"refDict": "",
"extProps": {},
"id": "842B8E8A-0B5B-4F79-9F9D-7A1674F87E00"
},
{
"defKey": "district_name",
"defName": "区名称",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
"refDict": "",
"extProps": {},
"id": "E6EF9997-7684-4814-B42D-903F570CA6DD"
},
{
"defKey": "create_time",
"defName": "创建时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "CURRENT_TIMESTAMP",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "8494E584-8C68-4DF7-834D-455246A506D7"
},
{
"defKey": "update_time",
"defName": "修改时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "7A54A258-CD35-474F-8A70-FA0B2E5BB525"
}
],
"correlations": [],
"indexes": []
},
{
"id": "713A3F96-CB73-4DAD-99A1-34429B058DAA",
"env": {
"base": {
"nameSpace": "",
"codeRoot": ""
}
},
"defKey": "sys_wnq_organ_account_information",
"defName": "租户账户信息表",
"comment": "",
"properties": {
"partitioned by": "(date string)",
"row format delimited": "",
"fields terminated by ','": "",
"collection items terminated by '-'": "",
"map keys terminated by ':'": "",
"store as textfile;": ""
},
"nameTemplate": "{defKey}[{defName}]",
"headers": [
{
"refKey": "hideInGraph",
"hideInGraph": true
},
{
"refKey": "defKey",
"hideInGraph": false
},
{
"refKey": "defName",
"hideInGraph": false
},
{
"refKey": "primaryKey",
"hideInGraph": false
},
{
"refKey": "notNull",
"hideInGraph": true
},
{
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"refKey": "domain",
"hideInGraph": true
},
{
"refKey": "type",
"hideInGraph": false
},
{
"refKey": "len",
"hideInGraph": false
},
{
"refKey": "scale",
"hideInGraph": false
},
{
"refKey": "comment",
"hideInGraph": true
},
{
"refKey": "refDict",
"hideInGraph": true
},
{
"refKey": "defaultValue",
"hideInGraph": true
},
{
"refKey": "isStandard",
"hideInGraph": false
},
{
"refKey": "uiHint",
"hideInGraph": true
},
{
"refKey": "extProps",
"hideInGraph": true
}
],
"fields": [
{
"defKey": "tenant_id",
"defName": "租户号",
"comment": "",
"type": "VARCHAR",
"len": 255,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "",
"refDict": "",
"uiHint": "",
"id": "7A065BCB-BC87-4688-9683-A25825084214"
},
{
"defKey": "id",
"defName": "PK",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": true,
"notNull": true,
"autoIncrement": true,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
"id": "BC2B5972-EBFF-4E96-952F-E37A6946E2FD"
},
{
"defKey": "account_name",
"defName": "开户名",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "BF950C8F-E760-43BC-B8D3-3A133863DDFA"
},
{
"defKey": "opening_bank",
"defName": "开户行",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "A4192207-DA31-4548-9556-261F1D38DDC2"
},
{
"defKey": "bank_account",
"defName": "银行卡号",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "F284B60D-A5EC-45E1-9A3D-DD61E47D3085"
},
{
"defKey": "type",
"defName": "支付类型",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
"id": "E7CFBBF5-685E-49CE-8FAD-9EED937A8D29"
},
{
"defKey": "del_flag",
"defName": "软删除",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
"id": "5F13D233-9502-432A-9CE7-54A3F7F07C64"
},
{
"defKey": "CREATED_TIME",
"defName": "创建时间",
"comment": "",
"domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"uiHint": "",
"id": "806DA59C-A359-4D4F-844B-8F2D26A97CA1"
},
{
"defKey": "UPDATED_TIME",
"defName": "更新时间",
"comment": "",
"domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"uiHint": "",
"id": "AA62C36F-8E1D-4B5D-B48C-828321BD049F"
},
{
"defKey": "linkman",
"defName": "退货地址联系人",
"comment": "",
"type": "VARCHAR",
"len": 128,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "",
"id": "6380985E-CDF0-486B-8236-2D4E4B882F61"
},
{
"defKey": "phone",
"defName": "退货地址手机号",
"comment": "",
"type": "VARCHAR",
"len": 15,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "",
"id": "EFDF4AD4-A3AE-4E3E-B16E-699FA41202EC"
},
{
"defKey": "address",
"defName": "退货地址",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"id": "23E49824-6E4A-45E2-B0F0-8D4EFC2DD02D"
}
],
"correlations": [],
"indexes": []
},
{
"id": "CAE4AA49-77A0-4488-A091-F35DCEED01F1",
"env": {
"base": {
"nameSpace": "",
"codeRoot": ""
}
},
"defKey": "sys_wnq_upms_mdm_log",
"defName": "mdm员工或者部门推送日志表",
"comment": "",
"properties": {
"partitioned by": "(date string)",
"row format delimited": "",
"fields terminated by ','": "",
"collection items terminated by '-'": "",
"map keys terminated by ':'": "",
"store as textfile;": ""
},
"nameTemplate": "{defKey}[{defName}]",
"headers": [
{
"refKey": "hideInGraph",
"hideInGraph": true
},
{
"refKey": "defKey",
"hideInGraph": false
},
{
"refKey": "defName",
"hideInGraph": false
},
{
"refKey": "primaryKey",
"hideInGraph": false
},
{
"refKey": "notNull",
"hideInGraph": true
},
{
"refKey": "autoIncrement",
"hideInGraph": true
},
{
"refKey": "domain",
"hideInGraph": true
},
{
"refKey": "type",
"hideInGraph": false
},
{
"refKey": "len",
"hideInGraph": false
},
{
"refKey": "scale",
"hideInGraph": false
},
{
"refKey": "comment",
"hideInGraph": true
},
{
"refKey": "refDict",
"hideInGraph": true
},
{
"refKey": "defaultValue",
"hideInGraph": true
},
{
"refKey": "isStandard",
"hideInGraph": false
},
{
"refKey": "uiHint",
"hideInGraph": true
},
{
"refKey": "extProps",
"hideInGraph": true
}
],
"fields": [
{
"defKey": "id",
"defName": "",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": true,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "364B4E3C-8C9C-44EE-A181-B0956C154FEE"
},
{
"defKey": "create_time",
"defName": "推送时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "CURRENT_TIMESTAMP",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "6B1066AA-2CA7-4116-8735-8391025386C6"
},
{
"defKey": "update_time",
"defName": "修改时间",
"comment": "",
"type": "TIMESTAMP",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "726D581C-510D-4E04-AD53-9276FDAE0FE2"
},
{
"defKey": "tenant_id",
"defName": "租户ID",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "14EA4E1A-B714-48B3-BC17-E1821CD6AF29"
},
{
"defKey": "mdm_code",
"defName": "部门编码",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": true,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "16120F75-6AA7-4483-868D-F07F511BB081",
"refDict": "",
"extProps": {},
"id": "CD3964DA-C01A-467E-8E02-D6BDABACC36A"
},
{
"defKey": "status",
"defName": "0:执行成功1执行失败",
"comment": "",
"type": "CHAR",
"len": 2,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "6296CF8D-2332-4B79-8F27-7F994CE97CAA"
},
{
"defKey": "remarks",
"defName": "失败原因",
"comment": "",
"type": "VARCHAR",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"refDict": "",
"extProps": {},
"id": "0277AC47-B8B5-4259-9FB5-69EFDB7692A7"
},
{
"defKey": "content",
"defName": "下发元数据",
"comment": "",
"type": "VARCHAR",
"len": 2000,
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "",
"extProps": {},
"id": "2C586147-9762-45AB-AE91-641E3FEDDE84"
}
],
"correlations": [],
"indexes": []
}
],
"views": [],
"dicts": [
{
"defKey": "Gender",
"defName": "性别",
"intro": "",
"items": [
{
"defKey": "M",
"defName": "男",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "1",
"id": "3622D417-DA1A-408F-BEE1-11D328D534A0"
},
{
"defKey": "F",
"defName": "女",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "2",
"id": "380A0790-64A7-481E-831C-32F7BEE1502B"
},
{
"defKey": "U",
"defName": "未知",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "3",
"id": "FA239F4D-1276-40D9-B230-F66BD35C3C27"
}
],
"id": "BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D"
},
{
"defKey": "Political",
"defName": "政治面貌",
"intro": "",
"items": [
{
"defKey": "10",
"defName": "共青团员",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "61F3145A-7599-4CCB-B298-D5EE788107BE"
},
{
"defKey": "20",
"defName": "中共党员",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "ED16D25A-AB2F-4FA0-BB48-2B9031FA28C4"
},
{
"defKey": "30",
"defName": "民主党派",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "0FB7974A-AE11-438F-86E0-B163316F9272"
},
{
"defKey": "40",
"defName": "群众",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "7D247234-7E97-45B1-8C56-4A17A370854A"
},
{
"defKey": "90",
"defName": "未知",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "DA65D752-AF04-4A11-81D8-14A38692A64A"
}
],
"id": "06EED564-BBA9-4747-8D73-AF809A330CB8"
},
{
"defKey": "Marital",
"defName": "婚姻状况",
"intro": "婚姻状况的码表",
"items": [
{
"defKey": "UNMARRIED",
"defName": "未婚",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "1",
"id": "20EE81BC-74EE-47DA-A56F-9663B23F44BD"
},
{
"defKey": "MARRIED",
"defName": "已婚",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "2",
"id": "4DCA10A8-417E-4A8D-BDF6-0A278C060ADC"
},
{
"defKey": "WIDOWED",
"defName": "丧偶",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "3",
"id": "826062A7-057C-4892-B338-06459F5B808D"
},
{
"defKey": "DIVORCE",
"defName": "离婚",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "4",
"id": "B23200B4-5E59-4F5E-A779-D981A040FA32"
},
{
"defKey": "UNSPECIFIED",
"defName": "未说明",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "5",
"id": "A7928FE2-349A-4702-9682-2EF7205E077B"
}
],
"id": "EA1587B7-3954-437A-BFE0-FCB0453BCABA"
},
{
"defKey": "StudentStatus",
"defName": "学生状态",
"intro": "",
"items": [
{
"defKey": "Normal",
"defName": "正常",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "1",
"id": "E9CA1CC9-8851-4F6B-86BA-B9CF0E44EB73"
},
{
"defKey": "Graduated",
"defName": "毕业",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "2",
"id": "DEC51D7C-99DF-430C-817D-0499862D3CCC"
},
{
"defKey": "Studied",
"defName": "肄业",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "3",
"id": "8853D6B6-75D3-4479-9006-FC731CD85B20"
},
{
"defKey": "Stop",
"defName": "休学",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"sort": "4",
"id": "C74BA8CF-1DC6-4C79-BAAC-F11EB9C6AF01"
}
],
"id": "4642BC5F-02EE-4E17-A60C-CF22F86A0282"
},
{
"defKey": "GBNation",
"defName": "民族",
"intro": "",
"items": [
{
"defKey": "01",
"defName": "汉族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "9224DF53-F7C0-447D-B8ED-0A39F799EE19"
},
{
"defKey": "02",
"defName": "蒙古族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "D57818E3-9206-45BB-AE79-27C64A4AB80F"
},
{
"defKey": "03",
"defName": "回族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "0A1A3CA9-6D68-4E15-8BD0-9A2FF428D804"
},
{
"defKey": "04",
"defName": "藏族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "7CC6B6BE-47EA-460E-ACFA-C377468DEA11"
},
{
"defKey": "05",
"defName": "维吾尔族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "A666D51F-D249-4FAC-B1F3-78C371836CB3"
},
{
"defKey": "06",
"defName": "苗族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "A0C9E1BA-D87B-4695-ADFA-287FDA32BB5A"
},
{
"defKey": "07",
"defName": "彝族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "149B5B9E-C1D1-4790-8CCF-0ED5F4B25172"
},
{
"defKey": "08",
"defName": "壮族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "F9A3E65C-BF4D-4C6B-ADB7-8C9CF0487360"
},
{
"defKey": "09",
"defName": "布依族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "14F17DE4-E96A-460B-98A6-F84EC8CF9885"
},
{
"defKey": "10",
"defName": "朝鲜族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "8A81AB18-B1BF-4797-A6E5-DEDB2C6566B0"
},
{
"defKey": "11",
"defName": "满族",
"intro": "",
"parentKey": "",
"enabled": true,
"attr1": "",
"attr2": "",
"attr3": "",
"id": "7D460947-FBD2-4E4D-8366-3B38DCAF09D1"
}
],
"id": "115EDEFC-0323-410E-81AB-CCAB8879837A"
},
{
"defKey": "GradeLevel",
"defName": "受教育程度",
"sort": "",
"intro": "",
"items": [],
"id": "9E7C9788-B805-4C7D-8531-FD1D9DC79B05"
}
],
"viewGroups": [],
"dataTypeMapping": {
"referURL": "",
"mappings": [
{
"defKey": "string",
"id": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"defName": "字串",
"29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "VARCHAR",
"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "VARCHAR2",
"BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARCHAR",
"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "VARCHAR",
"89504F5D-94BF-4C9E-8B2E-44F37305FED5": "VARCHAR",
"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "VARCHAR2",
"592C7013-143D-4E7B-AF64-0D7BF1E28230": "VARCHAR",
"77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "VARCHAR",
"11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING",
"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT",
"797A1496-D649-4261-89B4-544132EC3F36": "String",
"895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String",
"A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String",
"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string",
"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string",
"B91D99E0-9B7C-416C-8737-B760957DAF09": "string"
},
{
"defKey": "double",
"id": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E",
"defName": "小数",
"29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DECIMAL",
"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DECIMAL",
"BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DECIMAL",
"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "NUMERIC",
"89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DECIMAL",
"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DECIMAL",
"592C7013-143D-4E7B-AF64-0D7BF1E28230": "NUMERIC",
"77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "NUMERIC",
"11D1FB71-A587-4217-89BA-611B8A1F83E0": "DOUBLE",
"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "REAL",
"797A1496-D649-4261-89B4-544132EC3F36": "Double",
"895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Double",
"A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Double",
"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "decimal",
"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "double",
"B91D99E0-9B7C-416C-8737-B760957DAF09": "*float64"
},
{
"defKey": "int",
"id": "1D764C4A-6F9F-421E-B11A-6F3E23B51811",
"defName": "整数",
"29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "INT",
"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "INT",
"BFC87171-C74F-494A-B7C2-76B9C55FACC9": "INT",
"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "INTEGER",
"89504F5D-94BF-4C9E-8B2E-44F37305FED5": "INT",
"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "INTEGER",
"592C7013-143D-4E7B-AF64-0D7BF1E28230": "INTEGER",
"77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "INT4",
"11D1FB71-A587-4217-89BA-611B8A1F83E0": "INT",
"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "INTEGER",
"797A1496-D649-4261-89B4-544132EC3F36": "Integer",
"895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Integer",
"A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Integer",
"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "float",
"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "int",
"B91D99E0-9B7C-416C-8737-B760957DAF09": "*int"
},
{
"defKey": "date",
"id": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
"defName": "日期",
"29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "DATETIME",
"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "DATE",
"BFC87171-C74F-494A-B7C2-76B9C55FACC9": "DATETIME",
"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "TIMESTAMP",
"89504F5D-94BF-4C9E-8B2E-44F37305FED5": "DATE",
"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "DATE",
"592C7013-143D-4E7B-AF64-0D7BF1E28230": "DATE",
"77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "DATE",
"11D1FB71-A587-4217-89BA-611B8A1F83E0": "DATETIME",
"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "NUMERIC",
"797A1496-D649-4261-89B4-544132EC3F36": "Date",
"895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "Date",
"A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "Date",
"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "DateTime",
"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "timestamp",
"B91D99E0-9B7C-416C-8737-B760957DAF09": "*time.Time"
},
{
"defKey": "bytes",
"id": "D516E75B-90F5-4741-B9B3-A186A263F04C",
"defName": "二进制",
"29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "BLOB",
"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "BLOB",
"BFC87171-C74F-494A-B7C2-76B9C55FACC9": "VARBINARY",
"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "BYTEA",
"89504F5D-94BF-4C9E-8B2E-44F37305FED5": "BLOB",
"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "BLOB",
"592C7013-143D-4E7B-AF64-0D7BF1E28230": "BYTEA",
"77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "BYTEA",
"11D1FB71-A587-4217-89BA-611B8A1F83E0": "BINARY",
"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "NONE",
"797A1496-D649-4261-89B4-544132EC3F36": "byte[]",
"895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "byte[]",
"A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "byte[]",
"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "binary",
"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "binary",
"B91D99E0-9B7C-416C-8737-B760957DAF09": "[]byte"
},
{
"defKey": "largeText",
"id": "B17BDED3-085F-40E1-9019-3B79CF2BF075",
"defName": "大文本",
"29D1CE08-4C35-4D2D-AAA9-23D93305B52E": "TEXT",
"A4E23CB7-BB01-4BD1-9F71-F73F3E15A542": "CLOB",
"BFC87171-C74F-494A-B7C2-76B9C55FACC9": "TEXT",
"DFBEC1DD-AA84-456E-BBF3-C95DD0DB2022": "TEXT",
"89504F5D-94BF-4C9E-8B2E-44F37305FED5": "CLOB",
"0BBCABA5-B8E4-41B0-B8E4-8F5EA6029307": "CLOB",
"592C7013-143D-4E7B-AF64-0D7BF1E28230": "TEXT",
"77BD85E5-9D0D-4096-8427-CBA306FC9C6A": "TEXT",
"11D1FB71-A587-4217-89BA-611B8A1F83E0": "STRING",
"B363BE0B-F852-49B8-9B2E-F6D2174DEAC1": "TEXT",
"797A1496-D649-4261-89B4-544132EC3F36": "String",
"895CFD1D-4273-4D32-A2C4-CAC70200AB5B": "String",
"A2EE7B4A-CE62-4290-B00C-B26C1BF18073": "String",
"F3AC2415-E86B-40C6-9FEB-F4B7937D2C30": "string",
"81CCA482-3F4D-4EAC-8CF9-F5E7BC098AD2": "string",
"B91D99E0-9B7C-416C-8737-B760957DAF09": "string"
}
]
},
"domains": [
{
"defKey": "DefaultString",
"defName": "默认字串",
"applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"len": 255,
"scale": "",
"uiHint": "",
"id": "9092C4E0-1A54-4859-ABBB-5B62DBC27573"
},
{
"defKey": "IdOrKey",
"defName": "主键标识",
"applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"len": 32,
"scale": "",
"uiHint": "",
"id": "16120F75-6AA7-4483-868D-F07F511BB081"
},
{
"defKey": "Name",
"defName": "名称",
"applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"len": 90,
"scale": "",
"uiHint": "",
"id": "54611CCC-CA4B-42E1-9F32-4944C85B85A6"
},
{
"defKey": "Int",
"defName": "整数",
"applyFor": "1D764C4A-6F9F-421E-B11A-6F3E23B51811",
"len": "",
"scale": "",
"uiHint": "",
"id": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E"
},
{
"defKey": "Double",
"defName": "小数",
"applyFor": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E",
"len": 24,
"scale": 6,
"uiHint": "",
"id": "FF4459C5-6B45-4DBF-8FC0-E06239BC05B4"
},
{
"defKey": "Money",
"defName": "金额",
"applyFor": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E",
"len": 24,
"scale": 6,
"uiHint": "",
"id": "C3B1681B-99F9-4818-9E80-DE1652A51D85"
},
{
"defKey": "DateTime",
"defName": "日期时间",
"applyFor": "89D69E81-EA34-42EE-9FA2-93B8BD27E098",
"len": "",
"scale": "",
"uiHint": "",
"id": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC"
},
{
"defKey": "YesNo",
"defName": "是否",
"applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"len": "1",
"scale": "",
"uiHint": "",
"id": "6F7C1C5C-D159-41E6-BF9D-54DEEFA79AFF"
},
{
"defKey": "Dict",
"defName": "数据字典",
"applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"len": "32",
"scale": "",
"uiHint": "",
"id": "73FD2BAD-2358-4336-B96D-45DC897BD792"
},
{
"defKey": "DescText",
"defName": "描述文本",
"applyFor": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"len": "900",
"scale": "",
"uiHint": "",
"id": "3E948CEC-3070-472C-AF92-F3CA11EC9D15"
}
],
"diagrams": [
{
"defKey": "upms",
"defName": "",
"relationType": "field",
"canvasData": {
"cells": [
{
"id": "265e6ad9-528a-45cd-8ab1-06351a7ed143",
"shape": "table",
"position": {
"x": 90,
"y": 140
},
"count": 0,
"originKey": "181A844D-992E-4114-A88B-D958B183AB91"
}
]
},
"id": "95D2F87B-C5A4-4053-974F-F85B7405E1EE"
}
],
"standardFields": [
{
"defKey": "personInfo",
"defName": "个人基本信息要素",
"fields": [
{
"defKey": "ID_CARD_NO",
"defName": "身份证号",
"comment": "",
"type": "VARCHAR",
"len": "60",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"refDict": "",
"uiHint": "",
"id": "A64A91C8-A41F-4113-92FB-7563D7EF054D"
},
{
"defKey": "MOBILE_PHONE",
"defName": "手机号",
"comment": "",
"type": "VARCHAR",
"len": "60",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"refDict": "",
"uiHint": "",
"id": "479DA2AB-1974-411A-A81E-92FB939E75EB"
},
{
"defKey": "GENDER",
"defName": "性别",
"comment": "",
"type": "VARCHAR",
"len": "32",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
"refDict": "BF9E20E0-80D3-486D-BD58-5FADCF3E4A1D",
"uiHint": "",
"id": "48473E29-6594-4912-AADE-C8AB44FCA3E9"
},
{
"defKey": "BIRTH",
"defName": "出生日期",
"comment": "",
"type": "DATETIME",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
"refDict": "",
"uiHint": "",
"id": "2BD3D2EE-2411-49A6-983D-84B81057312F"
},
{
"defKey": "AVATAR",
"defName": "头像",
"comment": "",
"type": "VARCHAR",
"len": "60",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"refDict": "",
"uiHint": "",
"id": "FDD67CEE-4B52-4BD1-A1A3-9C5EBC6037E6"
},
{
"defKey": "HEIGHT",
"defName": "身高",
"comment": "",
"type": "INT",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
"refDict": "",
"uiHint": "",
"id": "CAAA0E79-41A1-4758-B481-D171168C4D68"
},
{
"defKey": "WEIGHT",
"defName": "体重",
"comment": "",
"type": "INT",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
"refDict": "",
"uiHint": "",
"id": "575482CE-64A6-4CB9-99DC-8E126D190AAA"
},
{
"defKey": "NATION",
"defName": "名族",
"comment": "",
"type": "VARCHAR",
"len": "32",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
"refDict": "115EDEFC-0323-410E-81AB-CCAB8879837A",
"uiHint": "",
"id": "15B0D75D-0B97-4985-A816-D0EAFA90446B"
},
{
"defKey": "POLITICAL",
"defName": "政治面貌",
"comment": "",
"type": "VARCHAR",
"len": "32",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
"refDict": "06EED564-BBA9-4747-8D73-AF809A330CB8",
"uiHint": "",
"id": "F458E86D-84D6-45A1-9DD3-51E6C8170D7F"
},
{
"defKey": "MARITAL",
"defName": "婚姻状况",
"comment": "",
"type": "VARCHAR",
"len": "32",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
"refDict": "EA1587B7-3954-437A-BFE0-FCB0453BCABA",
"uiHint": "",
"id": "7275E578-6893-4922-AC69-95B261BFBD61"
},
{
"defKey": "DOMICILE_PLACE_PROVINCE",
"defName": "籍贯(省)",
"comment": "",
"type": "VARCHAR",
"len": "60",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"refDict": "",
"uiHint": "",
"id": "F04BF130-3EC1-4E02-9DED-3214CA88E352"
},
{
"defKey": "DOMICILE_PLACE_CITY",
"defName": "籍贯(市)",
"comment": "",
"type": "VARCHAR",
"len": "32",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
"refDict": "",
"uiHint": "",
"id": "B97F5BC2-33DE-4857-9DB8-ECFD02C9040C"
},
{
"defKey": "DOMICILE_PLACE_ADDRESS",
"defName": "户籍地址",
"comment": "",
"type": "VARCHAR",
"len": "60",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
"refDict": "",
"uiHint": "",
"id": "812ADF1D-8C03-40CA-B030-E539838FB889"
}
],
"id": "F30202B9-4B5D-4CE7-87CE-B3890C84D3F2"
}
],
"dbConn": [
{
"defKey": "5FAAE58E-6D1A-4CCE-8E18-FCAB9EADD0B7",
"defName": "wnq",
"type": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
"properties": {
"driver_class_name": "com.mysql.cj.jdbc.Driver",
"url": "jdbc:mysql://39.108.104.25:3306/wnq_upms?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC",
"password": "root",
"username": "root",
"customer_driver": ""
}
}
]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jiaochong-5/wnq_pdm.git
git@gitee.com:jiaochong-5/wnq_pdm.git
jiaochong-5
wnq_pdm
wnq_pdm
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385