generator-begcode
Version:
Spring Boot + Angular/React/Vue in one handy generator
1 lines • 13.7 kB
JavaScript
const _0x33b90e=_0x6a7d;(function(_0x3bbd0b,_0x2ad998){const _0x23d579=_0x6a7d;const _0x38d62f=_0x3bbd0b();do{try{const _0x35542b=-parseInt(_0x23d579(0x3b))/0x1+parseInt(_0x23d579(0x2c))/0x2+-parseInt(_0x23d579(0xb))/0x3*(parseInt(_0x23d579(0x1c))/0x4)+parseInt(_0x23d579(0x3))/0x5*(-parseInt(_0x23d579(0x3f))/0x6)+parseInt(_0x23d579(0x31))/0x7*(-parseInt(_0x23d579(0x5))/0x8)+-parseInt(_0x23d579(0x24))/0x9+parseInt(_0x23d579(0x41))/0xa*(parseInt(_0x23d579(0xa))/0xb);if(_0x35542b===_0x2ad998){break;}else{_0x38d62f["\u0070\u0075\u0073\u0068"](_0x38d62f["\u0073\u0068\u0069\u0066\u0074"]());}}catch(_0x296aac){_0x38d62f["\u0070\u0075\u0073\u0068"](_0x38d62f["\u0073\u0068\u0069\u0066\u0074"]());}}while(!![]);})(_0x2b0c,0xcb2b5);import _0x43b18c from"\u0063\u0072\u0079\u0070\u0074\u006f";import{databaseTypes,fieldTypes}from"\u002e\u002e\u002f\u002e\u002e\u002f\u002e\u002e\u002f\u006a\u0064\u006c\u002f\u006a\u0068\u0069\u0070\u0073\u0074\u0065\u0072\u002f\u0069\u006e\u0064\u0065\u0078\u002e\u006a\u0073";import{hibernateSnakeCase}from"\u002e\u002f\u0073\u0074\u0072\u0069\u006e\u0067\u002e\u006a\u0073";import{databaseData}from"\u002e\u002e\u002f\u002e\u002e\u002f\u0073\u0070\u0072\u0069\u006e\u0067\u002d\u0064\u0061\u0074\u0061\u002d\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0061\u006c\u002f\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u002f\u0069\u006e\u0064\u0065\u0078\u002e\u006a\u0073";const dbTypes=fieldTypes;function _0x6a7d(_0x331121,_0x2b0cd2){const _0x6a7dde=_0x2b0c();_0x6a7d=function(_0x391aa2,_0x7b9fbd){_0x391aa2=_0x391aa2-0x0;let _0x5e66d2=_0x6a7dde[_0x391aa2];return _0x5e66d2;};return _0x6a7d(_0x331121,_0x2b0cd2);}function FeZyUB(_0x2d8e48,_0x54917f){if(!![]!=![])return;FeZyUB=function(_0x334f68,_0x32ddf7){_0x334f68=_0x334f68-(0x973c9^0x973c9);var _0x5e4682=_0x5e50e6[_0x334f68];return _0x5e4682;};return FeZyUB(_0x2d8e48,_0x54917f);}FeZyUB();const{STRING:TYPE_STRING,LONG:TYPE_LONG,UUID:TYPE_UUID}=dbTypes['CommonDBTypes'];const{MONGODB,NEO4J,COUCHBASE,CASSANDRA,SQL}=databaseTypes;const databaseTypeDataFallback={'name':_0x33b90e(0x1b),'defaultPrimaryKeyType':TYPE_LONG};export const databaseTypeData={[CASSANDRA]:{"\u006e\u0061\u006d\u0065":_0x33b90e(0x45),"\u0064\u0065\u0066\u0061\u0075\u006c\u0074\u0050\u0072\u0069\u006d\u0061\u0072\u0079\u004b\u0065\u0079\u0054\u0079\u0070\u0065":TYPE_UUID},[COUCHBASE]:{"\u006e\u0061\u006d\u0065":_0x33b90e(0x16),"\u0064\u0065\u0066\u0061\u0075\u006c\u0074\u0050\u0072\u0069\u006d\u0061\u0072\u0079\u004b\u0065\u0079\u0054\u0079\u0070\u0065":TYPE_STRING},[MONGODB]:{'name':_0x33b90e(0x1),"\u0064\u0065\u0066\u0061\u0075\u006c\u0074\u0050\u0072\u0069\u006d\u0061\u0072\u0079\u004b\u0065\u0079\u0054\u0079\u0070\u0065":TYPE_STRING},[NEO4J]:{'name':_0x33b90e(0x0),'defaultPrimaryKeyType':TYPE_STRING},[SQL]:{'name':_0x33b90e(0x42),'defaultPrimaryKeyType':TYPE_LONG}};export const getDatabaseTypeData=_0x14ad58=>{return databaseTypeData[_0x14ad58]??databaseTypeDataFallback;};export const R2DBC_DB_OPTIONS=[{"\u0076\u0061\u006c\u0075\u0065":databaseTypes["\u0050\u004f\u0053\u0054\u0047\u0052\u0045\u0053\u0051\u004c"],"\u006e\u0061\u006d\u0065":_0x33b90e(0x35)},{"\u0076\u0061\u006c\u0075\u0065":databaseTypes['MYSQL'],"\u006e\u0061\u006d\u0065":_0x33b90e(0x46)},{'value':databaseTypes["\u004d\u0041\u0052\u0049\u0041\u0044\u0042"],"\u006e\u0061\u006d\u0065":_0x33b90e(0x43)},{"\u0076\u0061\u006c\u0075\u0065":databaseTypes["\u004d\u0053\u0053\u0051\u004c"],"\u006e\u0061\u006d\u0065":_0x33b90e(0x2b)}];export const SQL_DB_OPTIONS=[{"\u0076\u0061\u006c\u0075\u0065":databaseTypes["\u0050\u004f\u0053\u0054\u0047\u0052\u0045\u0053\u0051\u004c"],'name':_0x33b90e(0x35)},{"\u0076\u0061\u006c\u0075\u0065":databaseTypes["\u004d\u0059\u0053\u0051\u004c"],"\u006e\u0061\u006d\u0065":_0x33b90e(0x46)},{'value':databaseTypes['MARIADB'],'name':_0x33b90e(0x43)},{"\u0076\u0061\u006c\u0075\u0065":databaseTypes['ORACLE'],"\u006e\u0061\u006d\u0065":_0x33b90e(0x3e)},{"\u0076\u0061\u006c\u0075\u0065":databaseTypes["\u004d\u0053\u0053\u0051\u004c"],'name':_0x33b90e(0x2b)},{'value':databaseTypes["\u0044\u0041\u005f\u004d\u0045\u004e\u0047"],"\u006e\u0061\u006d\u0065":_0x33b90e(0x11)},{"\u0076\u0061\u006c\u0075\u0065":databaseTypes['KING_BASE'],'name':_0x33b90e(0x17)}];export function getDBTypeFromDBValue(_0x9718d4){if(SQL_DB_OPTIONS["\u006d\u0061\u0070"](_0x332212=>_0x332212["\u0076\u0061\u006c\u0075\u0065"])["\u0069\u006e\u0063\u006c\u0075\u0064\u0065\u0073"](_0x9718d4)){return SQL;}return _0x9718d4;}export function calculateDbNameWithLimit(_0x2f3cb3,_0x171d12,_0x23baa0,{noSnakeCase=![],prefix='',separator="__".split("").reverse().join("")}={}){const _0x179262=_0x6a7d;const _0x5049eb={"\u0068\u0054\u0054\u0078\u0062":function(_0x3359b2,_0x2c16f9){return _0x3359b2^_0x2c16f9;},'SOFXf':_0x179262(0x18),"\u0044\u0048\u0047\u004c\u0043":_0x179262(0x2f),'vrUqD':function(_0x3501bc,_0x120a89){return _0x3501bc(_0x120a89);},"\u0074\u0048\u0050\u0052\u0048":function(_0x28f265,_0xeb9e57){return _0x28f265-_0xeb9e57;},"\u006b\u0044\u0049\u0061\u006d":function(_0x51f4b8,_0x5bbb11){return _0x51f4b8-_0x5bbb11;},"\u0059\u0076\u0075\u0079\u0067":function(_0x4ec74e,_0x505a71){return _0x4ec74e-_0x505a71;}};const _0x5e7b04=Math["\u0066\u006c\u006f\u006f\u0072"](_0x23baa0/_0x5049eb['hTTxb'](0x9f925,0x9f927));const _0x3cd8fa="\u005f"+_0x43b18c["\u0063\u0072\u0065\u0061\u0074\u0065\u0048\u0061\u0073\u0068"](_0x179262(0x6),{"\u006f\u0075\u0074\u0070\u0075\u0074\u004c\u0065\u006e\u0067\u0074\u0068":0x1})['update'](_0x2f3cb3+"\u002e"+_0x171d12,_0x5049eb["\u0053\u004f\u0046\u0058\u0066"])["\u0064\u0069\u0067\u0065\u0073\u0074"](_0x5049eb['DHGLC']);let _0x561ae7=noSnakeCase?_0x2f3cb3:_0x5049eb["\u0076\u0072\u0055\u0071\u0044"](hibernateSnakeCase,_0x2f3cb3);_0x561ae7=_0x561ae7["\u0073\u0075\u0062\u0073\u0074\u0072\u0069\u006e\u0067"](_0x5049eb["\u0068\u0054\u0054\u0078\u0062"](0x6018f,0x6018f),_0x5049eb["\u0074\u0048\u0050\u0052\u0048"](_0x5e7b04,separator["\u006c\u0065\u006e\u0067\u0074\u0068"]));let _0x315000=noSnakeCase?_0x171d12:hibernateSnakeCase(_0x171d12);_0x315000=_0x315000["\u0073\u0075\u0062\u0073\u0074\u0072\u0069\u006e\u0067"](0x6a324^0x6a324,_0x5049eb['kDIam'](_0x5049eb["\u006b\u0044\u0049\u0061\u006d"](_0x5049eb['kDIam'](_0x5049eb['Yvuyg'](_0x23baa0,_0x561ae7["\u006c\u0065\u006e\u0067\u0074\u0068"]),separator["\u006c\u0065\u006e\u0067\u0074\u0068"]),prefix['length']),_0x3cd8fa['length']));return''+prefix+_0x561ae7+separator+_0x315000+_0x3cd8fa;}export function calculateDbName(_0x143c94,_0x36b83d,{prodDatabaseType:_0x40c693,noSnakeCase=![],prefix='',suffix='',skipCheckLengthOfIdentifier=![]}={},_0x5baac6){const _0x5efc49=_0x6a7d;const _0x1bab42={"\u0069\u0053\u0076\u0051\u0075":function(_0x533fb2,_0x4c989e){return _0x533fb2(_0x4c989e);},"\u006b\u0064\u0055\u007a\u0078":function(_0x29d642,_0x1d5d53){return _0x29d642(_0x1d5d53);},"\u0078\u006d\u0055\u0041\u0043":function(_0x4827d7,_0x27bb05){return _0x4827d7>_0x27bb05;},"\u006b\u006c\u0048\u0042\u0061":function(_0x1886e6,_0x15c33b){return _0x1886e6-_0x15c33b;}};_0x5baac6="\u005f\u005f";const _0x4ac512=noSnakeCase?_0x1a6d43=>_0x1a6d43:hibernateSnakeCase;const _0x2fef54=''+prefix+_0x1bab42["\u0069\u0053\u0076\u0051\u0075"](_0x4ac512,_0x143c94)+_0x5baac6+_0x1bab42["\u006b\u0064\u0055\u007a\u0078"](_0x4ac512,_0x36b83d)+suffix;const{name:_0x3b96d1,constraintNameMaxLength:_0xc561a0}=_0x40c693&&databaseData[_0x40c693]||{};if(_0xc561a0&&_0x1bab42["\u0078\u006d\u0055\u0041\u0043"](_0x2fef54['length'],_0xc561a0)&&!skipCheckLengthOfIdentifier){return{'warning':_0x5efc49(0x20)+_0x2fef54+_0x5efc49(0x3c)+_0x3b96d1+_0x5efc49(0x37)+_0xc561a0+_0x5efc49(0x22),"\u0076\u0061\u006c\u0075\u0065":''+calculateDbNameWithLimit(_0x143c94,_0x36b83d,_0x1bab42["\u006b\u006c\u0048\u0042\u0061"](_0xc561a0,suffix['length']),{'separator':_0x5baac6,"\u006e\u006f\u0053\u006e\u0061\u006b\u0065\u0043\u0061\u0073\u0065":noSnakeCase,"\u0070\u0072\u0065\u0066\u0069\u0078":prefix})+suffix};}return{"\u0076\u0061\u006c\u0075\u0065":_0x2fef54};}function _0x2b0c(){const _0x22f303=["uQvSi".split("").reverse().join(""),"\u0073\u0075\u0062\u0073\u0074\u0072\u0069\u006e\u0067","\u0055\u006e\u006b\u006e\u006f\u0077\u006e","\u0034\u0043\u0054\u0050\u0052\u0065\u0054","\u0062\u0071\u0053\u0078\u0062","xPYbe".split("").reverse().join(""),"\u006d\u0061\u0070",'The\x20generated\x20constraint\x20name\x20\x22',"\u004d\u0059\u0053\u0051\u004c",'\x20character\x20limit).\x20It\x20will\x20be\x20truncated!','The\x20generated\x20join\x20table\x20\x22',"\u0031\u0034\u0037\u0039\u0036\u0033\u0036\u0039\u0059\u006c\u0048\u0076\u0066\u004f","\u004f\u0052\u0041\u0043\u004c\u0045","GNEM_AD".split("").reverse().join(""),"\u0053\u004f\u0046\u0058\u0066","sepyTBDnommoC".split("").reverse().join(""),"\u0076\u0072\u0055\u0071\u0044","_kf".split("").reverse().join(""),'Microsoft\x20SQL\x20Server',"\u0032\u0039\u0039\u0030\u0039\u0039\u0032\u0066\u0052\u0067\u005a\u0069\u0077","ESAB_GNIK".split("").reverse().join(""),"\u005f\u0069\u0064","\u0068\u0065\u0078","\u0063\u0072\u0065\u0061\u0074\u0065\u0048\u0061\u0073\u0068","\u0037\u0039\u0034\u0037\u0032\u0038\u0039\u0057\u007a\u004e\u0044\u004c\u0079","\u0059\u0076\u0075\u0079\u0067","\u006b\u0064\u0055\u007a\u0078","\u0068\u0054\u0054\u0078\u0062","LQSergtsoP".split("").reverse().join(""),"\u0066\u006c\u006f\u006f\u0072",'\x20(which\x20has\x20a\x20',"\u006c\u0065\u006e\u0067\u0074\u0068","\u004d\u0053\u0053\u0051\u004c","aBHlk".split("").reverse().join(""),"\u0031\u0036\u0035\u0032\u0031\u0033\u0038\u006e\u0077\u0051\u006c\u004f\u004a",'\x22\x20is\x20too\x20long\x20for\x20',"AQJBX".split("").reverse().join(""),"elcarO".split("").reverse().join(""),"gYmnrh63579".split("").reverse().join(""),"qnGDb".split("").reverse().join(""),"PXReTP0419".split("").reverse().join(""),"\u0053\u0051\u004c","BDairaM".split("").reverse().join(""),"\u0076\u0061\u006c\u0075\u0065","\u0043\u0061\u0073\u0073\u0061\u006e\u0064\u0072\u0061","\u004d\u0079\u0053\u0051\u004c","\u004e\u0065\u006f\u0034\u006a","\u004d\u006f\u006e\u0067\u006f\u0044\u0042","upBne".split("").reverse().join(""),"PoyxGQ082".split("").reverse().join(""),"CAUmx".split("").reverse().join(""),"\u0038\u004e\u0074\u0043\u006b\u0050\u0064","\u0073\u0068\u0061\u006b\u0065\u0032\u0035\u0036","gWZQb".split("").reverse().join(""),"\u0074\u0048\u0050\u0052\u0048","\u006b\u0044\u0049\u0061\u006d","tcccWb68827".split("").reverse().join(""),"AtCjlL1192314".split("").reverse().join(""),"\u004d\u0041\u0052\u0049\u0041\u0044\u0042","\u0044\u0048\u0047\u004c\u0043","_ler".split("").reverse().join(""),"\u0075\u0070\u0064\u0061\u0074\u0065","\u0050\u004f\u0053\u0054\u0047\u0052\u0045\u0053\u0051\u004c","\u0044\u0061\u004d\u0065\u006e\u0067","\u0075\u0078\u005f","\u0069\u006e\u0063\u006c\u0075\u0064\u0065\u0073","tsegid".split("").reverse().join(""),"YToxi".split("").reverse().join(""),"\u0043\u006f\u0075\u0063\u0068\u0062\u0061\u0073\u0065","esabgniK".split("").reverse().join(""),"8ftu".split("").reverse().join("")];_0x2b0c=function(){return _0x22f303;};return _0x2b0c();}export function getFKConstraintName(_0x81f955,_0x5748b4,{prodDatabaseType:_0x7f900d,noSnakeCase:_0x334720,skipCheckLengthOfIdentifier:_0x28041d}={}){const _0x536738=_0x6a7d;const _0x23734a={"\u0062\u0044\u0047\u006e\u0071":function(_0x4a1062,_0x4832d6,_0x49378d,_0x2c119d){return _0x4a1062(_0x4832d6,_0x49378d,_0x2c119d);},"\u0062\u0071\u0053\u0078\u0062":_0x536738(0x2a)};return _0x23734a["\u0062\u0044\u0047\u006e\u0071"](calculateDbName,_0x81f955,_0x5748b4,{"\u0070\u0072\u006f\u0064\u0044\u0061\u0074\u0061\u0062\u0061\u0073\u0065\u0054\u0079\u0070\u0065":_0x7f900d,"\u006e\u006f\u0053\u006e\u0061\u006b\u0065\u0043\u0061\u0073\u0065":_0x334720,'prefix':_0x23734a['bqSxb'],'suffix':_0x536738(0x2e),"\u0073\u006b\u0069\u0070\u0043\u0068\u0065\u0063\u006b\u004c\u0065\u006e\u0067\u0074\u0068\u004f\u0066\u0049\u0064\u0065\u006e\u0074\u0069\u0066\u0069\u0065\u0072":_0x28041d});}export function getJoinTableName(_0x50d9ed,_0x314ca8,{prodDatabaseType:_0x5d5435,skipCheckLengthOfIdentifier:_0x396da3}={},_0x563b53,_0x1ebda6){const _0x100ef1=_0x6a7d;const _0x3e7e86={'bQZWg':_0x100ef1(0xe),"\u0058\u0042\u004a\u0051\u0041":function(_0x51de72,_0xfd118f){return _0x51de72>_0xfd118f;},'enBpu':function(_0x13cbb1,_0x584bc4,_0xb1a6c5,_0x458d91,_0x4a233f){return _0x13cbb1(_0x584bc4,_0xb1a6c5,_0x458d91,_0x4a233f);}};_0x563b53="__".split("").reverse().join("");_0x1ebda6=_0x3e7e86["\u0062\u0051\u005a\u0057\u0067"];const _0x3f4159=''+_0x1ebda6+hibernateSnakeCase(_0x50d9ed)+_0x563b53+hibernateSnakeCase(_0x314ca8);const{name:_0x16f9cc,tableNameMaxLength:_0x277683}=_0x5d5435&&databaseData[_0x5d5435]||{};if(_0x277683&&_0x3e7e86["\u0058\u0042\u004a\u0051\u0041"](_0x3f4159["\u006c\u0065\u006e\u0067\u0074\u0068"],_0x277683)&&!_0x396da3){return{"\u0077\u0061\u0072\u006e\u0069\u006e\u0067":_0x100ef1(0x23)+_0x3f4159+_0x100ef1(0x3c)+_0x16f9cc+_0x100ef1(0x37)+_0x277683+_0x100ef1(0x22),'value':_0x3e7e86["\u0065\u006e\u0042\u0070\u0075"](calculateDbNameWithLimit,_0x50d9ed,_0x314ca8,_0x277683,{"\u0070\u0072\u0065\u0066\u0069\u0078":_0x1ebda6,'separator':_0x563b53})};}return{"\u0076\u0061\u006c\u0075\u0065":_0x3f4159};}export function getUXConstraintName(_0x35623a,_0x3969fb,{prodDatabaseType:_0x58bf8a,noSnakeCase:_0x1c15e3}={}){const _0x2e48d1=_0x6a7d;const _0x5c3a38={'ebYPx':function(_0x27b562,_0x3d4e39,_0x45612e,_0x8fcae0){return _0x27b562(_0x3d4e39,_0x45612e,_0x8fcae0);},"\u0069\u0078\u006f\u0054\u0059":_0x2e48d1(0x12)};return _0x5c3a38["\u0065\u0062\u0059\u0050\u0078"](calculateDbName,_0x35623a,_0x3969fb,{"\u0070\u0072\u006f\u0064\u0044\u0061\u0074\u0061\u0062\u0061\u0073\u0065\u0054\u0079\u0070\u0065":_0x58bf8a,'noSnakeCase':_0x1c15e3,"\u0070\u0072\u0065\u0066\u0069\u0078":_0x5c3a38["\u0069\u0078\u006f\u0054\u0059"]});}