anncic-apihelper 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configuration.js +1 -1
- package/dist/helper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApicreateService.js +1 -1
- package/dist/templateFun/Action.js +1 -1
- package/dist/templateFun/Common.js +1 -1
- package/dist/templateFun/Entify.js +1 -1
- package/dist/templateFun/Entities.js +1 -1
- package/dist/templateFun/Event.js +1 -1
- package/dist/templateFun/Handler.d.ts +6 -1
- package/dist/templateFun/Handler.js +1 -1
- package/dist/templateFun/Index.js +1 -1
- package/dist/templateFun/Search.js +1 -1
- package/dist/templateFun/Validator.d.ts +3 -1
- package/dist/templateFun/Validator.js +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11_0xe9fb57=a11_0x35c2;function a11_0x35c2(_0x2b44ee,_0x1da6e1){const _0x2700fe=a11_0x2700();return a11_0x35c2=function(_0x35c2a1,_0x41270b){_0x35c2a1=_0x35c2a1-0x7e;let _0x5d1f93=_0x2700fe[_0x35c2a1];return _0x5d1f93;},a11_0x35c2(_0x2b44ee,_0x1da6e1);}(function(_0x429e50,_0x1b62fd){const _0x281f71=a11_0x35c2,_0x282c93=_0x429e50();while(!![]){try{const _0x2ac247=parseInt(_0x281f71(0xa9))/0x1+parseInt(_0x281f71(0x93))/0x2*(-parseInt(_0x281f71(0xa4))/0x3)+parseInt(_0x281f71(0xb4))/0x4*(parseInt(_0x281f71(0x89))/0x5)+parseInt(_0x281f71(0x8b))/0x6*(-parseInt(_0x281f71(0xac))/0x7)+-parseInt(_0x281f71(0x9a))/0x8+parseInt(_0x281f71(0x9b))/0x9+parseInt(_0x281f71(0x84))/0xa;if(_0x2ac247===_0x1b62fd)break;else _0x282c93['push'](_0x282c93['shift']());}catch(_0x2097d1){_0x282c93['push'](_0x282c93['shift']());}}}(a11_0x2700,0x8bd07));function a11_0x2700(){const _0x9adbe7=['\x20\x20\x20\x20@Search(\x27updated_atstart\x27,\x20\x27修改时间:>=\x20起始时间(之后)\x27)\x0a','\x20*\x20**/\x0a','start\x20})\x0a','\x20\x20\x20\x20}\x0a\x0a','4441536BMHToy','6618420SUCzpp','end\x20})\x0a','\x20\x20\x20\x20async\x20updated_atend(query:\x20SelectQueryBuilder<ObjectLiteral>,\x20updated_atend:\x20string)\x20{\x0a','dirname','date','import\x20{\x20Provide,\x20Search,\x20ObjectLiteral,\x20SelectQueryBuilder\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a','Search\x20{\x0a\x0a','text','\x20\x20\x20\x20\x20\x20\x20\x20query.andWhere(`${query.alias}.created_at\x20<\x20:created_atend`,\x20{\x20created_atend\x20})\x0a','3097464cPUpLs','@Provide()\x0a','\x20\x20\x20\x20\x20\x20\x20\x20query.andWhere(`${query.alias}.created_at\x20>=\x20:updated_atstart`,\x20{\x20updated_atstart\x20})\x0a','default','Field','218034KkJYkD','\x20<=\x20:','../helper','28546coFetg',':<=\x20起始时间(之前)\x27)\x0a','indexOf','end\x27,\x20\x27','\x20\x20\x20\x20@Search(\x27updated_atend\x27,\x20\x27修改时间:<\x20起始时间(之前)\x27)\x0a','export\x20class\x20','\x20\x20\x20\x20@Search(\x27created_atstart\x27,\x20\x27创建时间:>=\x20起始时间(之后)\x27)\x0a','\x20*\x20','2165992zcDmuH','created_at','longtext','\x20\x20\x20\x20@Search(\x27','end(query:\x20SelectQueryBuilder<ObjectLiteral>,\x20','\x20\x20\x20\x20\x20\x20\x20\x20query.andWhere(`${query.alias}.created_at\x20>=\x20:created_atstart`,\x20{\x20created_atstart\x20})\x0a','Type','%column%','datetime','utf-8','/searchs/','6581670wgMxxJ','start(query:\x20SelectQueryBuilder<ObjectLiteral>,\x20','\x20\x20\x20\x20async\x20','\x20>=\x20:','\x20\x20\x20\x20async\x20created_atstart(query:\x20SelectQueryBuilder<ObjectLiteral>,\x20created_atstart:\x20string)\x20{\x0a','10UOUcmY','Comment','786jIFhCT','.ts',':>=\x20起始时间(之后)\x27)\x0a','\x20\x20\x20\x20async\x20created_atend(query:\x20SelectQueryBuilder<ObjectLiteral>,\x20created_atend:\x20string)\x20{\x0a','updated_at','writeFileSync','end`,\x20{\x20','mkdirSync','2Xxlsdm','__esModule','path'];a11_0x2700=function(){return _0x9adbe7;};return a11_0x2700();}Object['defineProperty'](exports,a11_0xe9fb57(0x94),{'value':!![]});const fs=require('fs'),path_1=require(a11_0xe9fb57(0x95)),helper_1=require(a11_0xe9fb57(0xab));async function default_1({tablestartUp:_0x50838f,tablestartUpShort:_0x5dc1c4,basedir:_0x202517,Fields:_0x2a5fcf,Comment:_0x200720}){const _0x2347af=a11_0xe9fb57,_0x5d77d2=_0x202517+(_0x2347af(0x83)+_0x5dc1c4+_0x2347af(0x8c));if(!fs['existsSync'](_0x5d77d2)){let _0x574751='',_0x509d8c='';for(let _0x4e52db in _0x2a5fcf){let _0x49f990=_0x2a5fcf[_0x4e52db],_0xe13bb2=(0x0,helper_1['getProp'])(_0x49f990[_0x2347af(0x7f)]);if(_0x49f990['Field']=='displayorder'||_0x49f990[_0x2347af(0xa8)]==_0x2347af(0xb5)||_0x49f990['Field']==_0x2347af(0x8f)||_0x49f990[_0x2347af(0xa8)]=='deleted_at')continue;if(_0xe13bb2=='json'){}else{if(_0xe13bb2==_0x2347af(0xa2)){}else{if(_0xe13bb2==_0x2347af(0xb6)){}else[_0x2347af(0x9f),_0x2347af(0x81),'timestamp'][_0x2347af(0xae)](_0xe13bb2)>-0x1&&(_0x574751+=_0x2347af(0xb7)+_0x49f990['Field']+'start\x27,\x20\x27'+_0x49f990[_0x2347af(0x8a)]+_0x2347af(0x8d),_0x574751+='\x20\x20\x20\x20async\x20'+_0x49f990['Field']+_0x2347af(0x85)+_0x49f990[_0x2347af(0xa8)]+'start:\x20string)\x20{\x0a',_0x574751+='\x20\x20\x20\x20\x20\x20\x20\x20query.andWhere(`${query.alias}.'+_0x49f990[_0x2347af(0xa8)]+_0x2347af(0x87)+_0x49f990[_0x2347af(0xa8)]+'start`,\x20{\x20'+_0x49f990[_0x2347af(0xa8)]+_0x2347af(0x98),_0x574751+=_0x2347af(0x99),_0x574751+=_0x2347af(0xb7)+_0x49f990['Field']+_0x2347af(0xaf)+_0x49f990['Comment']+_0x2347af(0xad),_0x574751+=_0x2347af(0x86)+_0x49f990['Field']+_0x2347af(0xb8)+_0x49f990['Field']+'end:\x20string)\x20{\x0a',_0x574751+='\x20\x20\x20\x20\x20\x20\x20\x20query.andWhere(`${query.alias}.'+_0x49f990[_0x2347af(0xa8)]+_0x2347af(0xaa)+_0x49f990['Field']+_0x2347af(0x91)+_0x49f990[_0x2347af(0xa8)]+_0x2347af(0x9c),_0x574751+=_0x2347af(0x99));}}}_0x574751+=_0x2347af(0xb2),_0x574751+=_0x2347af(0x88),_0x574751+=_0x2347af(0x7e),_0x574751+=_0x2347af(0x99),_0x574751+='\x20\x20\x20\x20@Search(\x27created_atend\x27,\x20\x27创建时间:<\x20起始时间(之前)\x27)\x0a',_0x574751+=_0x2347af(0x8e),_0x574751+=_0x2347af(0xa3),_0x574751+='\x20\x20\x20\x20}\x0a\x0a',_0x574751+=_0x2347af(0x96),_0x574751+='\x20\x20\x20\x20async\x20updated_atstart(query:\x20SelectQueryBuilder<ObjectLiteral>,\x20updated_atstart:\x20string)\x20{\x0a',_0x574751+=_0x2347af(0xa6),_0x574751+=_0x2347af(0x99),_0x574751+=_0x2347af(0xb0),_0x574751+=_0x2347af(0x9d),_0x574751+='\x20\x20\x20\x20\x20\x20\x20\x20query.andWhere(`${query.alias}.created_at\x20<\x20:updated_atend`,\x20{\x20updated_atend\x20})\x0a',_0x574751+=_0x2347af(0x99),_0x509d8c+=_0x2347af(0xa0),_0x509d8c+='/**\x0a',_0x509d8c+=_0x2347af(0xb3)+_0x200720+'-自定义检索\x0a',_0x509d8c+=_0x2347af(0x97),_0x509d8c+=_0x2347af(0xa5),_0x509d8c+=_0x2347af(0xb1)+_0x50838f+_0x2347af(0xa1),_0x509d8c+=_0x2347af(0x80),_0x509d8c+='}',_0x509d8c=_0x509d8c['replace']('%column%',_0x574751),!fs['existsSync']((0x0,path_1[_0x2347af(0x9e)])(_0x5d77d2))&&fs[_0x2347af(0x92)]((0x0,path_1['dirname'])(_0x5d77d2),{'recursive':!![]}),fs[_0x2347af(0x90)](_0x5d77d2,_0x509d8c,_0x2347af(0x82));}}exports[a11_0xe9fb57(0xa7)]=default_1;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export default function ({ tablestartUp, tablestartUpShort, basedir, Fields, Comment, moduleName }: {
|
|
1
|
+
export default function ({ controllers, tablestartUp, tablestartUpShort, basedir, Primary, Fields, Comment, moduleName }: {
|
|
2
|
+
controllers: any;
|
|
2
3
|
tablestartUp: any;
|
|
3
4
|
tablestartUpShort: any;
|
|
4
5
|
basedir: any;
|
|
6
|
+
Primary: any;
|
|
5
7
|
Fields: any;
|
|
6
8
|
Comment: any;
|
|
7
9
|
moduleName: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a12_0x128ac1=a12_0x3288;(function(_0x4f848b,_0x520ed4){const _0x24ce1=a12_0x3288,_0x2fc190=_0x4f848b();while(!![]){try{const _0x25990e=-parseInt(_0x24ce1(0x125))/0x1*(parseInt(_0x24ce1(0xbf))/0x2)+parseInt(_0x24ce1(0x10a))/0x3*(-parseInt(_0x24ce1(0xbd))/0x4)+-parseInt(_0x24ce1(0x113))/0x5+-parseInt(_0x24ce1(0x110))/0x6*(parseInt(_0x24ce1(0x121))/0x7)+parseInt(_0x24ce1(0xd1))/0x8*(parseInt(_0x24ce1(0xee))/0x9)+-parseInt(_0x24ce1(0xd3))/0xa+parseInt(_0x24ce1(0xe9))/0xb*(parseInt(_0x24ce1(0x108))/0xc);if(_0x25990e===_0x520ed4)break;else _0x2fc190['push'](_0x2fc190['shift']());}catch(_0x3809ad){_0x2fc190['push'](_0x2fc190['shift']());}}}(a12_0x4440,0x7bbe0));function a12_0x4440(){const _0x174ac6=['float','defineProperty',':\x20string;\x0a\x0a','tinyint','import\x20{\x20','14LNTajx','\x27;\x0a\x0a','longtext','\x27,\x20RuleType.string().valid(\x27','200tjgOdD','\x20\x20\x20\x20updated_atstart?:\x20string;\x0a\x0a','\x27,\x20\x27','\x27,\x20RuleType.number()','4060UDBYdW','/Search.ts','6332aoXLvr','export\x20class\x20','\x20\x20\x20\x20updated_atend?:\x20string;\x0a\x0a',':\x20number;\x0a\x0a','mkdirSync','text','@/apps/','Null','existsSync','/enum\x27;\x0a','\x20\x20\x20\x20@Rule(\x27','?:\x20any\x20|\x20any[];\x0a\x0a','__esModule',':\x20any\x20|\x20any[];\x0a\x0a','\x20\x20\x20\x20@Rule(\x27修改时间\x27,\x20RuleType.date())\x0a','Type','getEnum','end?:\x20string;\x0a\x0a','88ClJzRb','created_at','1412100uhXLos','replace','double','\x20\x20\x20\x20displayorder?:\x20number;\x0a\x0a','start?:\x20string;\x0a\x0a','\x20*\x20','number','/Update.ts','datetime','Create\x20{\x0a\x0a','displayorder','Enum\x20}\x20from\x20\x27','Search\x20{\x0a\x0a','\x27))','\x27))\x0a','\x27,\x20RuleType.string(),\x20\x27<\x20起始时间(之前)\x27)\x0a','date','getProp','timestamp','\x20*\x20**/\x0a','json','\x27,\x20RuleType.number())\x0a','44IMODaC','?:\x20\x27','indexOf','/validator/','@/app','275067NqStNR','join','writeFileSync','enum','?:\x20number;\x0a\x0a','\x20*\x20数据添加验证\x0a','\x20\x20\x20\x20@Rule(\x27创建时间\x27,\x20RuleType.date())\x0a','\x20\x20\x20\x20created_at?:\x20string;\x0a\x0a','Comment','\x20\x20\x20\x20@Rule(\x27创建时间\x27,\x20RuleType.date(),\x20\x27>=\x20起始时间(之后)\x27)\x0a','\x27,\x20RuleType.string())\x0a','YES','\x20\x20\x20\x20@Rule(\x27修改时间\x27,\x20RuleType.date(),\x20\x27>=\x20起始时间(之后)\x27)\x0a','utf-8','\x20*\x20数据更新验证\x0a','import\x20{\x20Rule,\x20RuleType\x20}\x20from\x20\x27@anncic-api/validator\x27;\x0a','Field','.required()','%DtoColumn%','/Create.ts','?:\x20string;\x0a\x0a','\x27)))\x0a','\x20\x20\x20\x20@Rule(\x27创建时间\x27,\x20RuleType.date(),\x20\x27<\x20起始时间(之前)\x27)\x0a','\x27,\x20RuleType.date()','Update\x20{\x0a\x0a','/**\x0a','6143484dITSks','/entities/','1551pyRMTW','\x20\x20\x20\x20created_atend?:\x20string;\x0a\x0a','\x20\x20\x20\x20@Rule(\x27默认排序\x27,\x20RuleType.number())\x0a','%SearchDtoColumn%','\x20\x20\x20\x20','\x20\x20\x20\x20created_atstart?:\x20string;\x0a\x0a','71646pNgaHU','Enum,\x20\x27','\x27,\x20RuleType.number().valid(...getAnnEnumArray(','2770630WEUuek','\x27\x20|\x20\x27','string','\x27,\x20RuleType.any())\x0a','\x20\x20\x20\x20updated_at?:\x20string;\x0a\x0a','updated_at','default','mediumtext','decimal'];a12_0x4440=function(){return _0x174ac6;};return a12_0x4440();}Object[a12_0x128ac1(0x11d)](exports,a12_0x128ac1(0xcb),{'value':!![]});function a12_0x3288(_0x533e76,_0x386fab){const _0x4440a4=a12_0x4440();return a12_0x3288=function(_0x32888d,_0x442738){_0x32888d=_0x32888d-0xba;let _0x5f165a=_0x4440a4[_0x32888d];return _0x5f165a;},a12_0x3288(_0x533e76,_0x386fab);}const fs=require('fs'),helper_1=require('../helper');async function default_1({tablestartUp:_0x30c645,tablestartUpShort:_0x1255e9,basedir:_0xc356cb,Fields:_0x5cae03,Comment:_0x3b9e00,moduleName:_0x382c8d}){const _0xdd36f6=a12_0x128ac1,_0x1400aa=_0xc356cb+('/validator/'+_0x1255e9);!fs['existsSync'](_0x1400aa)&&fs[_0xdd36f6(0xc3)](_0x1400aa,{'recursive':!![]}),await DTOCreate({'tablestartUp':_0x30c645,'tablestartUpShort':_0x1255e9,'basedir':_0xc356cb,'Fields':_0x5cae03,'Comment':_0x3b9e00,'moduleName':_0x382c8d}),await DTOUpdate({'tablestartUp':_0x30c645,'tablestartUpShort':_0x1255e9,'basedir':_0xc356cb,'Fields':_0x5cae03,'Comment':_0x3b9e00,'moduleName':_0x382c8d}),await DTOSearch({'tablestartUp':_0x30c645,'tablestartUpShort':_0x1255e9,'basedir':_0xc356cb,'Fields':_0x5cae03,'Comment':_0x3b9e00,'moduleName':_0x382c8d});}exports[a12_0x128ac1(0x119)]=default_1;async function DTOCreate({tablestartUp:_0x2a5754,tablestartUpShort:_0x177789,basedir:_0x2fffc4,Fields:_0x14820e,Comment:_0x5ee678,moduleName:_0xa50bb5}){const _0x22df14=a12_0x128ac1,_0x142e5d=_0x2fffc4+(_0x22df14(0xec)+_0x177789+_0x22df14(0x101));if(!fs[_0x22df14(0xc7)](_0x142e5d)){let _0x5c79aa='',_0x1defb0='',_0x36317e=![];for(let _0x805939 in _0x14820e){let _0x5cffbc=_0x14820e[_0x805939],_0x3c531e=(0x0,helper_1[_0x22df14(0xe4)])(_0x5cffbc[_0x22df14(0xce)]);if(_0x5cffbc[_0x22df14(0xfe)]==_0x22df14(0xdd)||_0x5cffbc[_0x22df14(0xfe)]=='created_at'||_0x5cffbc['Field']=='updated_at'||_0x5cffbc[_0x22df14(0xfe)]=='deleted_at')continue;if(['text',_0x22df14(0x123),_0x22df14(0x11a)][_0x22df14(0xeb)](_0x3c531e)!=-0x1)_0x5c79aa+=_0x22df14(0xc9)+_0x5cffbc[_0x22df14(0xf6)]+_0x22df14(0xf8),_0x5c79aa+=_0x22df14(0x10e)+_0x5cffbc[_0x22df14(0xfe)]+_0x22df14(0x102);else{if(['float',_0x22df14(0xd5),_0x22df14(0x11b),'number'][_0x22df14(0xeb)](_0x3c531e)!=-0x1)_0x5c79aa+=_0x22df14(0xc9)+_0x5cffbc[_0x22df14(0xf6)]+_0x22df14(0xbc)+(_0x5cffbc[_0x22df14(0xc6)]!=_0x22df14(0xf9)?_0x22df14(0xff):'')+')\x0a',_0x5c79aa+='\x20\x20\x20\x20'+_0x5cffbc[_0x22df14(0xfe)]+(_0x5cffbc[_0x22df14(0xc6)]!='YES'?'?':'')+_0x22df14(0xc2);else{if([_0x22df14(0x11f)][_0x22df14(0xeb)](_0x3c531e)!=-0x1)_0x36317e=!![],_0x5c79aa+=_0x22df14(0xc9)+_0x5cffbc['Comment']+_0x22df14(0x112)+_0x2a5754+_0x22df14(0x111)+_0x5cffbc[_0x22df14(0xfe)]+_0x22df14(0xe0)+(_0x5cffbc[_0x22df14(0xc6)]!='YES'?'.required()':'')+')\x0a',_0x5c79aa+='\x20\x20\x20\x20'+_0x5cffbc['Field']+(_0x5cffbc[_0x22df14(0xc6)]!='YES'?'?':'')+_0x22df14(0xc2);else{if(_0x3c531e=='json')_0x5c79aa+='\x20\x20\x20\x20@Rule(\x27'+_0x5cffbc[_0x22df14(0xf6)]+'\x27,\x20RuleType.any())\x0a',_0x5c79aa+=_0x22df14(0x10e)+_0x5cffbc['Field']+(_0x5cffbc[_0x22df14(0xc6)]!=_0x22df14(0xf9)?'?':'')+_0x22df14(0xcc);else{if(_0x3c531e==_0x22df14(0xf1)){let _0xd9081d=(0x0,helper_1[_0x22df14(0xcf)])(_0x5cffbc[_0x22df14(0xce)]);_0x5c79aa+=_0x22df14(0xc9)+_0x5cffbc['Comment']+_0x22df14(0x124)+_0xd9081d[_0x22df14(0xef)](_0x22df14(0xbb))+'\x27)'+(_0x5cffbc[_0x22df14(0xc6)]!='YES'?_0x22df14(0xff):'')+')\x0a',_0x5c79aa+=_0x22df14(0x10e)+_0x5cffbc[_0x22df14(0xfe)]+(_0x5cffbc[_0x22df14(0xc6)]!='YES'?'?':'')+':\x20\x27'+_0xd9081d[_0x22df14(0xef)]('\x27\x20|\x20\x27')+_0x22df14(0x122);}else['date',_0x22df14(0xdb),_0x22df14(0xe5)][_0x22df14(0xeb)](_0x3c531e)>-0x1?(_0x5c79aa+=_0x22df14(0xc9)+_0x5cffbc['Comment']+_0x22df14(0x105)+(_0x5cffbc[_0x22df14(0xc6)]!='YES'?_0x22df14(0xff):'')+')\x0a',_0x5c79aa+='\x20\x20\x20\x20'+_0x5cffbc[_0x22df14(0xfe)]+(_0x5cffbc[_0x22df14(0xc6)]!=_0x22df14(0xf9)?'?':'')+_0x22df14(0x11e)):(_0x5c79aa+=_0x22df14(0xc9)+_0x5cffbc[_0x22df14(0xf6)]+'\x27,\x20RuleType.string()'+(_0x5cffbc[_0x22df14(0xc6)]!=_0x22df14(0xf9)?'.required()':'')+')\x0a',_0x5c79aa+=_0x22df14(0x10e)+_0x5cffbc[_0x22df14(0xfe)]+(_0x5cffbc[_0x22df14(0xc6)]!='YES'?'?':'')+':\x20string;\x0a\x0a');}}}}}_0x5c79aa+=_0x22df14(0x10c),_0x5c79aa+=_0x22df14(0xd6),_0x1defb0+=_0x22df14(0xfd),_0x36317e&&(_0x1defb0+=_0x22df14(0x120)+_0x2a5754+'Enum\x20}\x20from\x20\x27'+(typeof _0xa50bb5=='string'?_0x22df14(0xc5)+_0xa50bb5:'@/app')+'/entities/'+_0x177789+_0x22df14(0xc8)),_0x1defb0+='\x0a',_0x1defb0+='/**\x0a',_0x1defb0+='\x20*\x20'+_0x5ee678+'\x0a',_0x1defb0+=_0x22df14(0xf3),_0x1defb0+=_0x22df14(0xe6),_0x1defb0+=_0x22df14(0xc0)+_0x2a5754+_0x22df14(0xdc),_0x1defb0+='%DtoColumn%',_0x1defb0+='}',_0x1defb0=_0x1defb0[_0x22df14(0xd4)](_0x22df14(0x100),_0x5c79aa),fs[_0x22df14(0xf0)](_0x142e5d,_0x1defb0,_0x22df14(0xfb));}}async function DTOUpdate({tablestartUp:_0x502e58,tablestartUpShort:_0x2332c3,basedir:_0x71e1a3,Fields:_0x5b8c5e,Comment:_0x39fbbf,moduleName:_0x13d390}){const _0x2760fa=a12_0x128ac1,_0x197e1b=_0x71e1a3+(_0x2760fa(0xec)+_0x2332c3+_0x2760fa(0xda));if(!fs[_0x2760fa(0xc7)](_0x197e1b)){let _0x15b576='',_0x507812='',_0x231f29=![];for(let _0x2a8813 in _0x5b8c5e){let _0x37fd5f=_0x5b8c5e[_0x2a8813],_0x1f5ad2=(0x0,helper_1[_0x2760fa(0xe4)])(_0x37fd5f[_0x2760fa(0xce)]);if(_0x37fd5f[_0x2760fa(0xfe)]==_0x2760fa(0xdd)||_0x37fd5f[_0x2760fa(0xfe)]==_0x2760fa(0xd2)||_0x37fd5f['Field']==_0x2760fa(0x118)||_0x37fd5f['Field']=='deleted_at')continue;if(['text',_0x2760fa(0x123),_0x2760fa(0x11a)]['indexOf'](_0x1f5ad2)!=-0x1)_0x15b576+='\x20\x20\x20\x20@Rule(\x27'+_0x37fd5f[_0x2760fa(0xf6)]+_0x2760fa(0xf8),_0x15b576+=_0x2760fa(0x10e)+_0x37fd5f[_0x2760fa(0xfe)]+_0x2760fa(0x102);else{if([_0x2760fa(0x11c),_0x2760fa(0xd5),_0x2760fa(0x11b),_0x2760fa(0xd9)][_0x2760fa(0xeb)](_0x1f5ad2)!=-0x1)_0x15b576+=_0x2760fa(0xc9)+_0x37fd5f[_0x2760fa(0xf6)]+_0x2760fa(0xe8),_0x15b576+=_0x2760fa(0x10e)+_0x37fd5f[_0x2760fa(0xfe)]+_0x2760fa(0xf2);else{if([_0x2760fa(0x11f)][_0x2760fa(0xeb)](_0x1f5ad2)!=-0x1)_0x231f29=!![],_0x15b576+='\x20\x20\x20\x20@Rule(\x27'+_0x37fd5f['Comment']+'\x27,\x20RuleType.number().valid(...getAnnEnumArray('+_0x502e58+_0x2760fa(0x111)+_0x37fd5f[_0x2760fa(0xfe)]+'\x27)))\x0a',_0x15b576+=_0x2760fa(0x10e)+_0x37fd5f[_0x2760fa(0xfe)]+_0x2760fa(0xf2);else{if(_0x1f5ad2==_0x2760fa(0xe7))_0x15b576+='\x20\x20\x20\x20@Rule(\x27'+_0x37fd5f[_0x2760fa(0xf6)]+_0x2760fa(0x116),_0x15b576+='\x20\x20\x20\x20'+_0x37fd5f[_0x2760fa(0xfe)]+_0x2760fa(0xca);else{if(_0x1f5ad2==_0x2760fa(0xf1)){let _0x117193=(0x0,helper_1['getEnum'])(_0x37fd5f[_0x2760fa(0xce)]);_0x15b576+=_0x2760fa(0xc9)+_0x37fd5f['Comment']+_0x2760fa(0x124)+_0x117193[_0x2760fa(0xef)]('\x27,\x20\x27')+_0x2760fa(0xe1),_0x15b576+='\x20\x20\x20\x20'+_0x37fd5f[_0x2760fa(0xfe)]+'?:\x20\x27'+_0x117193[_0x2760fa(0xef)]('\x27\x20|\x20\x27')+_0x2760fa(0x122);}else[_0x2760fa(0xe3),'datetime',_0x2760fa(0xe5)][_0x2760fa(0xeb)](_0x1f5ad2)>-0x1?(_0x15b576+=_0x2760fa(0xc9)+_0x37fd5f['Comment']+'\x27,\x20RuleType.date())\x0a',_0x15b576+=_0x2760fa(0x10e)+_0x37fd5f[_0x2760fa(0xfe)]+_0x2760fa(0x102)):(_0x15b576+=_0x2760fa(0xc9)+_0x37fd5f['Comment']+_0x2760fa(0xf8),_0x15b576+=_0x2760fa(0x10e)+_0x37fd5f['Field']+_0x2760fa(0x102));}}}}}_0x15b576+=_0x2760fa(0x10c),_0x15b576+=_0x2760fa(0xd6),_0x507812+='import\x20{\x20Rule,\x20RuleType\x20}\x20from\x20\x27@anncic-api/validator\x27;\x0a',_0x231f29&&(_0x507812+=_0x2760fa(0x120)+_0x502e58+_0x2760fa(0xde)+(typeof _0x13d390==_0x2760fa(0x115)?_0x2760fa(0xc5)+_0x13d390:'@/app')+_0x2760fa(0x109)+_0x2332c3+'/enum\x27;\x0a'),_0x507812+='\x0a',_0x507812+=_0x2760fa(0x107),_0x507812+=_0x2760fa(0xd8)+_0x39fbbf+'\x0a',_0x507812+=_0x2760fa(0xfc),_0x507812+=_0x2760fa(0xe6),_0x507812+=_0x2760fa(0xc0)+_0x502e58+_0x2760fa(0x106),_0x507812+=_0x2760fa(0x100),_0x507812+='}',_0x507812=_0x507812[_0x2760fa(0xd4)](_0x2760fa(0x100),_0x15b576),fs[_0x2760fa(0xf0)](_0x197e1b,_0x507812,'utf-8');}}async function DTOSearch({tablestartUp:_0x4a2f9f,tablestartUpShort:_0x973ab7,basedir:_0x356318,Fields:_0x11e05d,Comment:_0x264fcd,moduleName:_0x1af598}){const _0xa452dd=a12_0x128ac1,_0x46e1e3=_0x356318+(_0xa452dd(0xec)+_0x973ab7+_0xa452dd(0xbe));if(!fs[_0xa452dd(0xc7)](_0x46e1e3)){let _0x596454='',_0x3c3226='',_0x51cd79=![];for(let _0x2bb544 in _0x11e05d){let _0x318afc=_0x11e05d[_0x2bb544],_0x3683c0=(0x0,helper_1[_0xa452dd(0xe4)])(_0x318afc['Type']);if(_0x318afc[_0xa452dd(0xfe)]==_0xa452dd(0xdd)||_0x318afc[_0xa452dd(0xfe)]==_0xa452dd(0xd2)||_0x318afc['Field']==_0xa452dd(0x118)||_0x318afc[_0xa452dd(0xfe)]=='deleted_at')continue;if([_0xa452dd(0xc4),_0xa452dd(0x123),'mediumtext']['indexOf'](_0x3683c0)!=-0x1){}else{if(['float',_0xa452dd(0xd5),'decimal',_0xa452dd(0xd9)][_0xa452dd(0xeb)](_0x3683c0)!=-0x1)_0x596454+='\x20\x20\x20\x20@Rule(\x27'+_0x318afc[_0xa452dd(0xf6)]+'\x27,\x20RuleType.number())\x0a',_0x596454+='\x20\x20\x20\x20'+_0x318afc[_0xa452dd(0xfe)]+'?:\x20number;\x0a\x0a';else{if([_0xa452dd(0x11f)][_0xa452dd(0xeb)](_0x3683c0)!=-0x1)_0x51cd79=!![],_0x596454+=_0xa452dd(0xc9)+_0x318afc[_0xa452dd(0xf6)]+_0xa452dd(0x112)+_0x4a2f9f+_0xa452dd(0x111)+_0x318afc[_0xa452dd(0xfe)]+_0xa452dd(0x103),_0x596454+=_0xa452dd(0x10e)+_0x318afc[_0xa452dd(0xfe)]+_0xa452dd(0xf2);else{if(_0x3683c0=='json'){}else{if(_0x3683c0==_0xa452dd(0xf1)){let _0x375db7=(0x0,helper_1[_0xa452dd(0xcf)])(_0x318afc[_0xa452dd(0xce)]);_0x596454+=_0xa452dd(0xc9)+_0x318afc['Comment']+_0xa452dd(0x124)+_0x375db7[_0xa452dd(0xef)](_0xa452dd(0xbb))+_0xa452dd(0xe1),_0x596454+=_0xa452dd(0x10e)+_0x318afc['Field']+_0xa452dd(0xea)+_0x375db7[_0xa452dd(0xef)](_0xa452dd(0x114))+_0xa452dd(0x122);}else[_0xa452dd(0xe3),_0xa452dd(0xdb),_0xa452dd(0xe5)][_0xa452dd(0xeb)](_0x3683c0)>-0x1?(_0x596454+=_0xa452dd(0xc9)+_0x318afc['Comment']+'\x27,\x20RuleType.string())\x0a',_0x596454+=_0xa452dd(0x10e)+_0x318afc['Field']+_0xa452dd(0x102),_0x596454+='\x20\x20\x20\x20@Rule(\x27'+_0x318afc[_0xa452dd(0xf6)]+'\x27,\x20RuleType.string(),\x20\x27>=\x20起始时间(之后)\x27)\x0a',_0x596454+=_0xa452dd(0x10e)+_0x318afc[_0xa452dd(0xfe)]+_0xa452dd(0xd7),_0x596454+=_0xa452dd(0xc9)+_0x318afc[_0xa452dd(0xf6)]+_0xa452dd(0xe2),_0x596454+=_0xa452dd(0x10e)+_0x318afc[_0xa452dd(0xfe)]+_0xa452dd(0xd0)):(_0x596454+=_0xa452dd(0xc9)+_0x318afc[_0xa452dd(0xf6)]+_0xa452dd(0xf8),_0x596454+=_0xa452dd(0x10e)+_0x318afc[_0xa452dd(0xfe)]+_0xa452dd(0x102));}}}}}_0x596454+=_0xa452dd(0xf4),_0x596454+=_0xa452dd(0xf5),_0x596454+=_0xa452dd(0xf7),_0x596454+=_0xa452dd(0x10f),_0x596454+=_0xa452dd(0x104),_0x596454+=_0xa452dd(0x10b),_0x596454+=_0xa452dd(0xcd),_0x596454+=_0xa452dd(0x117),_0x596454+=_0xa452dd(0xfa),_0x596454+=_0xa452dd(0xba),_0x596454+='\x20\x20\x20\x20@Rule(\x27修改时间\x27,\x20RuleType.date(),\x20\x27<\x20起始时间(之前)\x27)\x0a',_0x596454+=_0xa452dd(0xc1),_0x3c3226+='import\x20{\x20Rule,\x20RuleType\x20}\x20from\x20\x27@anncic-api/validator\x27;\x0a',_0x51cd79&&(_0x3c3226+=_0xa452dd(0x120)+_0x4a2f9f+_0xa452dd(0xde)+(typeof _0x1af598==_0xa452dd(0x115)?_0xa452dd(0xc5)+_0x1af598:_0xa452dd(0xed))+'/entities/'+_0x973ab7+_0xa452dd(0xc8)),_0x3c3226+='\x0a',_0x3c3226+=_0xa452dd(0x107),_0x3c3226+=_0xa452dd(0xd8)+_0x264fcd+'\x0a',_0x3c3226+='\x20*\x20数据检索验证\x0a',_0x3c3226+='\x20*\x20**/\x0a',_0x3c3226+=_0xa452dd(0xc0)+_0x4a2f9f+_0xa452dd(0xdf),_0x3c3226+=_0xa452dd(0x10d),_0x3c3226+='}',_0x3c3226=_0x3c3226[_0xa452dd(0xd4)]('%SearchDtoColumn%',_0x596454),fs[_0xa452dd(0xf0)](_0x46e1e3,_0x3c3226,'utf-8');}}
|
|
1
|
+
'use strict';const a12_0x27e2e9=a12_0x5df1;(function(_0x21b9c8,_0x5e0c2d){const _0x32730f=a12_0x5df1,_0x5ada16=_0x21b9c8();while(!![]){try{const _0x4971d9=parseInt(_0x32730f(0xe9))/0x1*(parseInt(_0x32730f(0x102))/0x2)+-parseInt(_0x32730f(0xd7))/0x3+parseInt(_0x32730f(0xcc))/0x4+-parseInt(_0x32730f(0x104))/0x5+parseInt(_0x32730f(0x10e))/0x6+-parseInt(_0x32730f(0xc4))/0x7+-parseInt(_0x32730f(0xf8))/0x8*(-parseInt(_0x32730f(0x110))/0x9);if(_0x4971d9===_0x5e0c2d)break;else _0x5ada16['push'](_0x5ada16['shift']());}catch(_0x2699cf){_0x5ada16['push'](_0x5ada16['shift']());}}}(a12_0x386f,0x5c2b6));Object[a12_0x27e2e9(0xb9)](exports,'__esModule',{'value':!![]});function a12_0x386f(){const _0x4eec13=['DTOCreate\x20extends\x20OmitDto(','\x20*\x20','\x20\x20\x20\x20created_atstart?:\x20string;\x0a\x0a','/Create.ts','\x27))','Type','\x20\x20\x20\x20@Rule(\x27修改时间\x27,\x20RuleType.date())\x0a','date','1416058irdrfi','\x27,\x20RuleType.date())\x0a','Comment','import\x20{\x20Rule,\x20RuleType,\x20OmitDto\x20}\x20from\x20\x27@anncic-api/validator\x27;\x0a\x0a','deleted_at','\x20*\x20**/\x0a','float','mediumtext','2466872XKzpaU','\x27)))\x0a','Enum,\x20\x27','find','Field',':\x20number;\x0a\x0a','\x27,\x20RuleType.number().valid(...getAnnEnumArray(','@/apps/','getProp','.required()','\x27,\x20RuleType.any())\x0a','1353063oQnbjg','%SearchDtoColumn%','/**\x0a','\x27,\x20RuleType.string(),\x20\x27>=\x20起始时间(之后)\x27)\x0a','double','\x27,\x20RuleType.string().valid(\x27','string',':\x20any\x20|\x20any[];\x0a\x0a','longtext','/enum\x27;\x0a','import\x20{\x20','\x27,\x20RuleType.number()','toUpperCase','utf-8','/Search.ts','tinyint','replace','DTOUpdate\x20{\x0a\x0a','173486orhjQH','\x27,\x20RuleType.number())\x0a','text','indexOf','timestamp','export\x20class\x20','\x20\x20\x20\x20updated_at?:\x20string;\x0a\x0a','Enum\x20}\x20from\x20\x27','Null','getEnum','\x27,\x20RuleType.string(),\x20\x27<\x20起始时间(之前)\x27)\x0a','\x20*\x20数据添加验证\x0a','DTOSearch\x20{\x0a\x0a','DTOUpdate\x20extends\x20OmitDto(','displayorder','1304UdSdJK','datetime','\x27,\x20RuleType.string())\x0a','\x20\x20\x20\x20','DTOSearch\x20extends\x20OmitDto(','\x27;\x0a\x0a','toLowerCase','?:\x20\x27','\x20\x20\x20\x20created_at?:\x20string;\x0a\x0a',':\x20string;\x0a\x0a','2jKtPBK','\x20\x20\x20\x20@Rule(\x27创建时间\x27,\x20RuleType.date())\x0a','1188280SJhHYN','?:\x20string;\x0a\x0a','enum','writeFileSync','json','end?:\x20string;\x0a\x0a','?:\x20number;\x0a\x0a','default','\x27\x20|\x20\x27','/validators/','2528436uYDbdr','\x27,\x20\x27','3141UryQyS','@/app','\x20\x20\x20\x20@Rule(\x27默认排序\x27,\x20RuleType.number())\x0a','YES','join','/entities/',':\x20\x27','\x27))\x0a','number','}\x0a\x0a','%DtoColumn%','\x20\x20\x20\x20@Rule(\x27修改时间\x27,\x20RuleType.date(),\x20\x27>=\x20起始时间(之后)\x27)\x0a','\x20\x20\x20\x20@Rule(\x27','DTOCreate\x20{\x0a\x0a','mkdirSync','DTOSearch,\x20[\x27displayorder\x27])\x20{\x0a\x0a','decimal','created_at','\x20\x20\x20\x20displayorder?:\x20number;\x0a\x0a','\x27,\x20RuleType.date()','existsSync','\x20\x20\x20\x20created_atend?:\x20string;\x0a\x0a','\x20*\x20数据更新验证\x0a','boolean','substring','DTOCreate,\x20[\x27displayorder\x27])\x20{\x0a\x0a','updated_at','defineProperty','\x20\x20\x20\x20@Rule(\x27创建时间\x27,\x20RuleType.date(),\x20\x27<\x20起始时间(之前)\x27)\x0a','import\x20{\x20Rule,\x20RuleType\x20}\x20from\x20\x27@anncic-api/validator\x27;\x0a\x0a'];a12_0x386f=function(){return _0x4eec13;};return a12_0x386f();}const fs=require('fs'),helper_1=require('../helper');function a12_0x5df1(_0x27dc19,_0x593d70){const _0x386ff1=a12_0x386f();return a12_0x5df1=function(_0x5df1f2,_0x48815d){_0x5df1f2=_0x5df1f2-0xb8;let _0x304e51=_0x386ff1[_0x5df1f2];return _0x304e51;},a12_0x5df1(_0x27dc19,_0x593d70);}async function default_1({controllers:_0x54bea4,tablestartUp:_0xb0715e,tablestartUpShort:_0x5b86cb,basedir:_0x522b53,Primary:_0x832322,Fields:_0x4dd8ca,Comment:_0x21deb0,moduleName:_0x414077}){const _0x224742=a12_0x27e2e9,_0x4fa2ee=_0x522b53+(_0x224742(0x10d)+_0x5b86cb);!fs['existsSync'](_0x4fa2ee)&&fs[_0x224742(0x11e)](_0x4fa2ee,{'recursive':!![]}),await DTOCreate({'controllers':_0x54bea4,'tablestartUp':_0xb0715e,'tablestartUpShort':_0x5b86cb,'basedir':_0x522b53,'Fields':_0x4dd8ca,'Comment':_0x21deb0,'moduleName':_0x414077}),await DTOUpdate({'controllers':_0x54bea4,'tablestartUp':_0xb0715e,'tablestartUpShort':_0x5b86cb,'basedir':_0x522b53,'Fields':_0x4dd8ca,'Comment':_0x21deb0,'moduleName':_0x414077}),await DTOSearch({'controllers':_0x54bea4,'tablestartUp':_0xb0715e,'tablestartUpShort':_0x5b86cb,'basedir':_0x522b53,'Fields':_0x4dd8ca,'Primary':_0x832322,'Comment':_0x21deb0,'moduleName':_0x414077});}exports[a12_0x27e2e9(0x10b)]=default_1;async function DTOCreate({controllers:_0x3e8c1c,tablestartUp:_0x4cec90,tablestartUpShort:_0x888b11,basedir:_0x3aade8,Fields:_0x874c7b,Comment:_0x3d6c91,moduleName:_0x5f475c}){const _0x480bd5=a12_0x27e2e9,_0x58076e=_0x3aade8+(_0x480bd5(0x10d)+_0x888b11+_0x480bd5(0xbf));if(!fs[_0x480bd5(0x124)](_0x58076e)){let _0x33d9df='',_0x441426='',_0x30ceb1=![];for(let _0x4eaa46 in _0x874c7b){let _0x115609=_0x874c7b[_0x4eaa46],_0x17777a=(0x0,helper_1[_0x480bd5(0xd4)])(_0x115609[_0x480bd5(0xc1)]);if(_0x115609[_0x480bd5(0xd0)]==_0x480bd5(0xf7)||_0x115609[_0x480bd5(0xd0)]==_0x480bd5(0x121)||_0x115609['Field']=='updated_at'||_0x115609[_0x480bd5(0xd0)]==_0x480bd5(0xc8))continue;if([_0x480bd5(0xeb),_0x480bd5(0xdf),_0x480bd5(0xcb)][_0x480bd5(0xec)](_0x17777a)!=-0x1)_0x33d9df+='\x20\x20\x20\x20@Rule(\x27'+_0x115609[_0x480bd5(0xc6)]+_0x480bd5(0xfa),_0x33d9df+=_0x480bd5(0xfb)+_0x115609[_0x480bd5(0xd0)]+_0x480bd5(0x105);else{if(['float',_0x480bd5(0xdb),_0x480bd5(0x120),_0x480bd5(0x118)][_0x480bd5(0xec)](_0x17777a)!=-0x1)_0x33d9df+=_0x480bd5(0x11c)+_0x115609[_0x480bd5(0xc6)]+_0x480bd5(0xe2)+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?'.required()':'')+')\x0a',_0x33d9df+='\x20\x20\x20\x20'+_0x115609[_0x480bd5(0xd0)]+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?'?':'')+_0x480bd5(0xd1);else{if([_0x480bd5(0xe6)][_0x480bd5(0xec)](_0x17777a)!=-0x1)_0x30ceb1=!![],_0x33d9df+='\x20\x20\x20\x20@Rule(\x27'+_0x115609['Comment']+_0x480bd5(0xd2)+_0x4cec90+_0x480bd5(0xce)+_0x115609[_0x480bd5(0xd0)]+_0x480bd5(0xc0)+(_0x115609[_0x480bd5(0xf1)]!='YES'?_0x480bd5(0xd5):'')+')\x0a',_0x33d9df+='\x20\x20\x20\x20'+_0x115609['Field']+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?'?':'')+':\x20number;\x0a\x0a';else{if(_0x17777a==_0x480bd5(0x108))_0x33d9df+='\x20\x20\x20\x20@Rule(\x27'+_0x115609[_0x480bd5(0xc6)]+'\x27,\x20RuleType.any())\x0a',_0x33d9df+=_0x480bd5(0xfb)+_0x115609[_0x480bd5(0xd0)]+(_0x115609[_0x480bd5(0xf1)]!='YES'?'?':'')+_0x480bd5(0xde);else{if(_0x17777a==_0x480bd5(0x106)){let _0x4c9058=(0x0,helper_1[_0x480bd5(0xf2)])(_0x115609[_0x480bd5(0xc1)]);_0x33d9df+=_0x480bd5(0x11c)+_0x115609['Comment']+_0x480bd5(0xdc)+_0x4c9058[_0x480bd5(0x114)](_0x480bd5(0x10f))+'\x27)'+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?_0x480bd5(0xd5):'')+')\x0a',_0x33d9df+=_0x480bd5(0xfb)+_0x115609[_0x480bd5(0xd0)]+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?'?':'')+_0x480bd5(0x116)+_0x4c9058['join'](_0x480bd5(0x10c))+_0x480bd5(0xfd);}else[_0x480bd5(0xc3),_0x480bd5(0xf9),_0x480bd5(0xed)][_0x480bd5(0xec)](_0x17777a)>-0x1?(_0x33d9df+=_0x480bd5(0x11c)+_0x115609[_0x480bd5(0xc6)]+_0x480bd5(0x123)+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?_0x480bd5(0xd5):'')+')\x0a',_0x33d9df+=_0x480bd5(0xfb)+_0x115609[_0x480bd5(0xd0)]+(_0x115609['Null']!=_0x480bd5(0x113)?'?':'')+':\x20string;\x0a\x0a'):(_0x33d9df+='\x20\x20\x20\x20@Rule(\x27'+_0x115609[_0x480bd5(0xc6)]+'\x27,\x20RuleType.string()'+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?_0x480bd5(0xd5):'')+')\x0a',_0x33d9df+=_0x480bd5(0xfb)+_0x115609['Field']+(_0x115609[_0x480bd5(0xf1)]!=_0x480bd5(0x113)?'?':'')+_0x480bd5(0x101));}}}}}_0x33d9df+=_0x480bd5(0x112),_0x33d9df+=_0x480bd5(0x122);(_0x3e8c1c===null||_0x3e8c1c===void 0x0?void 0x0:_0x3e8c1c['find'](_0x3c6696=>typeof _0x3c6696!=_0x480bd5(0x127)))?_0x441426+='import\x20{\x20Rule,\x20RuleType,\x20OmitDto\x20}\x20from\x20\x27@anncic-api/validator\x27;\x0a\x0a':_0x441426+=_0x480bd5(0xbb);_0x30ceb1&&(_0x441426+=_0x480bd5(0xe1)+_0x4cec90+_0x480bd5(0xf0)+(typeof _0x5f475c==_0x480bd5(0xdd)?_0x480bd5(0xd3)+_0x5f475c:_0x480bd5(0x111))+_0x480bd5(0x115)+_0x888b11+_0x480bd5(0xe0));_0x441426+='\x0a',_0x441426+=_0x480bd5(0xd9),_0x441426+=_0x480bd5(0xbd)+_0x3d6c91+'\x0a',_0x441426+=_0x480bd5(0xf4),_0x441426+='\x20*\x20**/\x0a',_0x441426+=_0x480bd5(0xee)+_0x4cec90+_0x480bd5(0x11d),_0x441426+=_0x480bd5(0x11a),_0x441426+=_0x480bd5(0x119);for(const _0x18bdf3 of _0x3e8c1c){typeof _0x18bdf3==_0x480bd5(0xdd)&&(_0x441426+=_0x480bd5(0xee)+_0x18bdf3[_0x480bd5(0x128)](0x0,0x1)[_0x480bd5(0xe3)]()+_0x18bdf3[_0x480bd5(0x128)](0x1)[_0x480bd5(0xfe)]()+_0x4cec90+_0x480bd5(0xbc)+_0x4cec90+_0x480bd5(0x129),_0x441426+=_0x480bd5(0x119));}_0x441426=_0x441426['replace'](_0x480bd5(0x11a),_0x33d9df),fs['writeFileSync'](_0x58076e,_0x441426,_0x480bd5(0xe4));}}async function DTOUpdate({controllers:_0xc98668,tablestartUp:_0xbd3a6,tablestartUpShort:_0x48a267,basedir:_0x3f1c9c,Fields:_0x59a66a,Comment:_0x4f553b,moduleName:_0x199034}){const _0x5b9381=a12_0x27e2e9,_0x485c14=_0x3f1c9c+(_0x5b9381(0x10d)+_0x48a267+'/Update.ts');if(!fs['existsSync'](_0x485c14)){let _0x12aecf='',_0x51743d='',_0x43eaf7=![];for(let _0xfebf2a in _0x59a66a){let _0x561732=_0x59a66a[_0xfebf2a],_0x8bf4c2=(0x0,helper_1['getProp'])(_0x561732[_0x5b9381(0xc1)]);if(_0x561732[_0x5b9381(0xd0)]==_0x5b9381(0xf7)||_0x561732['Field']==_0x5b9381(0x121)||_0x561732[_0x5b9381(0xd0)]==_0x5b9381(0xb8)||_0x561732['Field']==_0x5b9381(0xc8))continue;if([_0x5b9381(0xeb),'longtext',_0x5b9381(0xcb)][_0x5b9381(0xec)](_0x8bf4c2)!=-0x1)_0x12aecf+='\x20\x20\x20\x20@Rule(\x27'+_0x561732[_0x5b9381(0xc6)]+_0x5b9381(0xfa),_0x12aecf+=_0x5b9381(0xfb)+_0x561732[_0x5b9381(0xd0)]+_0x5b9381(0x105);else{if([_0x5b9381(0xca),_0x5b9381(0xdb),_0x5b9381(0x120),'number'][_0x5b9381(0xec)](_0x8bf4c2)!=-0x1)_0x12aecf+=_0x5b9381(0x11c)+_0x561732[_0x5b9381(0xc6)]+_0x5b9381(0xea),_0x12aecf+='\x20\x20\x20\x20'+_0x561732[_0x5b9381(0xd0)]+'?:\x20number;\x0a\x0a';else{if([_0x5b9381(0xe6)][_0x5b9381(0xec)](_0x8bf4c2)!=-0x1)_0x43eaf7=!![],_0x12aecf+='\x20\x20\x20\x20@Rule(\x27'+_0x561732['Comment']+'\x27,\x20RuleType.number().valid(...getAnnEnumArray('+_0xbd3a6+_0x5b9381(0xce)+_0x561732[_0x5b9381(0xd0)]+_0x5b9381(0xcd),_0x12aecf+='\x20\x20\x20\x20'+_0x561732['Field']+_0x5b9381(0x10a);else{if(_0x8bf4c2=='json')_0x12aecf+=_0x5b9381(0x11c)+_0x561732[_0x5b9381(0xc6)]+_0x5b9381(0xd6),_0x12aecf+='\x20\x20\x20\x20'+_0x561732['Field']+'?:\x20any\x20|\x20any[];\x0a\x0a';else{if(_0x8bf4c2==_0x5b9381(0x106)){let _0x526e2e=(0x0,helper_1[_0x5b9381(0xf2)])(_0x561732['Type']);_0x12aecf+=_0x5b9381(0x11c)+_0x561732[_0x5b9381(0xc6)]+'\x27,\x20RuleType.string().valid(\x27'+_0x526e2e[_0x5b9381(0x114)](_0x5b9381(0x10f))+'\x27))\x0a',_0x12aecf+=_0x5b9381(0xfb)+_0x561732[_0x5b9381(0xd0)]+_0x5b9381(0xff)+_0x526e2e[_0x5b9381(0x114)](_0x5b9381(0x10c))+_0x5b9381(0xfd);}else[_0x5b9381(0xc3),_0x5b9381(0xf9),_0x5b9381(0xed)]['indexOf'](_0x8bf4c2)>-0x1?(_0x12aecf+='\x20\x20\x20\x20@Rule(\x27'+_0x561732[_0x5b9381(0xc6)]+_0x5b9381(0xc5),_0x12aecf+='\x20\x20\x20\x20'+_0x561732[_0x5b9381(0xd0)]+_0x5b9381(0x105)):(_0x12aecf+=_0x5b9381(0x11c)+_0x561732[_0x5b9381(0xc6)]+_0x5b9381(0xfa),_0x12aecf+=_0x5b9381(0xfb)+_0x561732[_0x5b9381(0xd0)]+'?:\x20string;\x0a\x0a');}}}}}_0x12aecf+=_0x5b9381(0x112),_0x12aecf+=_0x5b9381(0x122);(_0xc98668===null||_0xc98668===void 0x0?void 0x0:_0xc98668[_0x5b9381(0xcf)](_0x30f2d1=>typeof _0x30f2d1!=_0x5b9381(0x127)))?_0x51743d+='import\x20{\x20Rule,\x20RuleType,\x20OmitDto\x20}\x20from\x20\x27@anncic-api/validator\x27;\x0a\x0a':_0x51743d+=_0x5b9381(0xbb);_0x43eaf7&&(_0x51743d+=_0x5b9381(0xe1)+_0xbd3a6+_0x5b9381(0xf0)+(typeof _0x199034=='string'?_0x5b9381(0xd3)+_0x199034:_0x5b9381(0x111))+_0x5b9381(0x115)+_0x48a267+_0x5b9381(0xe0));_0x51743d+='\x0a',_0x51743d+=_0x5b9381(0xd9),_0x51743d+=_0x5b9381(0xbd)+_0x4f553b+'\x0a',_0x51743d+=_0x5b9381(0x126),_0x51743d+=_0x5b9381(0xc9),_0x51743d+='export\x20class\x20'+_0xbd3a6+_0x5b9381(0xe8),_0x51743d+=_0x5b9381(0x11a),_0x51743d+=_0x5b9381(0x119);for(const _0x4afd64 of _0xc98668){typeof _0x4afd64==_0x5b9381(0xdd)&&(_0x51743d+='export\x20class\x20'+_0x4afd64[_0x5b9381(0x128)](0x0,0x1)[_0x5b9381(0xe3)]()+_0x4afd64['substring'](0x1)[_0x5b9381(0xfe)]()+_0xbd3a6+_0x5b9381(0xf6)+_0xbd3a6+'DTOUpdate,\x20[\x27displayorder\x27])\x20{\x0a\x0a',_0x51743d+=_0x5b9381(0x119));}_0x51743d=_0x51743d['replace'](_0x5b9381(0x11a),_0x12aecf),fs['writeFileSync'](_0x485c14,_0x51743d,_0x5b9381(0xe4));}}async function DTOSearch({controllers:_0x396c44,tablestartUp:_0x57bf1a,tablestartUpShort:_0x13b099,basedir:_0x1ac77c,Fields:_0x23f510,Primary:_0x20c8e2,Comment:_0x3a4475,moduleName:_0x4f0083}){const _0x37247e=a12_0x27e2e9,_0x49bdde=_0x1ac77c+(_0x37247e(0x10d)+_0x13b099+_0x37247e(0xe5));if(!fs[_0x37247e(0x124)](_0x49bdde)){let _0x5bea87='',_0x3af40c='',_0x32e693=![];for(let _0x6acf9 of[{[_0x20c8e2[_0x37247e(0xd0)]]:_0x20c8e2},_0x23f510]){for(let _0x418770 in _0x6acf9){let _0xcfbd1e=_0x6acf9[_0x418770],_0xf5f91d=(0x0,helper_1[_0x37247e(0xd4)])(_0xcfbd1e[_0x37247e(0xc1)]);if(_0xcfbd1e[_0x37247e(0xd0)]==_0x37247e(0xf7)||_0xcfbd1e[_0x37247e(0xd0)]==_0x37247e(0x121)||_0xcfbd1e[_0x37247e(0xd0)]=='updated_at'||_0xcfbd1e[_0x37247e(0xd0)]==_0x37247e(0xc8))continue;if([_0x37247e(0xeb),_0x37247e(0xdf),_0x37247e(0xcb)][_0x37247e(0xec)](_0xf5f91d)!=-0x1){}else{if([_0x37247e(0xca),_0x37247e(0xdb),_0x37247e(0x120),_0x37247e(0x118)][_0x37247e(0xec)](_0xf5f91d)!=-0x1)_0x5bea87+=_0x37247e(0x11c)+_0xcfbd1e[_0x37247e(0xc6)]+_0x37247e(0xea),_0x5bea87+=_0x37247e(0xfb)+_0xcfbd1e['Field']+'?:\x20number;\x0a\x0a';else{if(['tinyint'][_0x37247e(0xec)](_0xf5f91d)!=-0x1)_0x32e693=!![],_0x5bea87+='\x20\x20\x20\x20@Rule(\x27'+_0xcfbd1e['Comment']+'\x27,\x20RuleType.number().valid(...getAnnEnumArray('+_0x57bf1a+_0x37247e(0xce)+_0xcfbd1e[_0x37247e(0xd0)]+'\x27)))\x0a',_0x5bea87+=_0x37247e(0xfb)+_0xcfbd1e[_0x37247e(0xd0)]+_0x37247e(0x10a);else{if(_0xf5f91d==_0x37247e(0x108)){}else{if(_0xf5f91d==_0x37247e(0x106)){let _0x25e466=(0x0,helper_1['getEnum'])(_0xcfbd1e[_0x37247e(0xc1)]);_0x5bea87+=_0x37247e(0x11c)+_0xcfbd1e[_0x37247e(0xc6)]+'\x27,\x20RuleType.string().valid(\x27'+_0x25e466['join']('\x27,\x20\x27')+_0x37247e(0x117),_0x5bea87+=_0x37247e(0xfb)+_0xcfbd1e[_0x37247e(0xd0)]+'?:\x20\x27'+_0x25e466[_0x37247e(0x114)]('\x27\x20|\x20\x27')+_0x37247e(0xfd);}else[_0x37247e(0xc3),_0x37247e(0xf9),'timestamp']['indexOf'](_0xf5f91d)>-0x1?(_0x5bea87+=_0x37247e(0x11c)+_0xcfbd1e[_0x37247e(0xc6)]+_0x37247e(0xfa),_0x5bea87+='\x20\x20\x20\x20'+_0xcfbd1e[_0x37247e(0xd0)]+_0x37247e(0x105),_0x5bea87+=_0x37247e(0x11c)+_0xcfbd1e['Comment']+_0x37247e(0xda),_0x5bea87+=_0x37247e(0xfb)+_0xcfbd1e[_0x37247e(0xd0)]+'start?:\x20string;\x0a\x0a',_0x5bea87+=_0x37247e(0x11c)+_0xcfbd1e['Comment']+_0x37247e(0xf3),_0x5bea87+='\x20\x20\x20\x20'+_0xcfbd1e[_0x37247e(0xd0)]+_0x37247e(0x109)):(_0x5bea87+=_0x37247e(0x11c)+_0xcfbd1e[_0x37247e(0xc6)]+_0x37247e(0xfa),_0x5bea87+=_0x37247e(0xfb)+_0xcfbd1e[_0x37247e(0xd0)]+_0x37247e(0x105));}}}}}}_0x5bea87+=_0x37247e(0x112),_0x5bea87+=_0x37247e(0x122),_0x5bea87+=_0x37247e(0x103),_0x5bea87+=_0x37247e(0x100),_0x5bea87+='\x20\x20\x20\x20@Rule(\x27创建时间\x27,\x20RuleType.date(),\x20\x27>=\x20起始时间(之后)\x27)\x0a',_0x5bea87+=_0x37247e(0xbe),_0x5bea87+=_0x37247e(0xba),_0x5bea87+=_0x37247e(0x125),_0x5bea87+=_0x37247e(0xc2),_0x5bea87+=_0x37247e(0xef),_0x5bea87+=_0x37247e(0x11b),_0x5bea87+='\x20\x20\x20\x20updated_atstart?:\x20string;\x0a\x0a',_0x5bea87+='\x20\x20\x20\x20@Rule(\x27修改时间\x27,\x20RuleType.date(),\x20\x27<\x20起始时间(之前)\x27)\x0a',_0x5bea87+='\x20\x20\x20\x20updated_atend?:\x20string;\x0a\x0a';(_0x396c44===null||_0x396c44===void 0x0?void 0x0:_0x396c44[_0x37247e(0xcf)](_0x103b67=>typeof _0x103b67!=_0x37247e(0x127)))?_0x3af40c+=_0x37247e(0xc7):_0x3af40c+=_0x37247e(0xbb);_0x32e693&&(_0x3af40c+=_0x37247e(0xe1)+_0x57bf1a+_0x37247e(0xf0)+(typeof _0x4f0083==_0x37247e(0xdd)?_0x37247e(0xd3)+_0x4f0083:_0x37247e(0x111))+_0x37247e(0x115)+_0x13b099+_0x37247e(0xe0));_0x3af40c+='\x0a',_0x3af40c+=_0x37247e(0xd9),_0x3af40c+='\x20*\x20'+_0x3a4475+'\x0a',_0x3af40c+='\x20*\x20数据检索验证\x0a',_0x3af40c+=_0x37247e(0xc9),_0x3af40c+=_0x37247e(0xee)+_0x57bf1a+_0x37247e(0xf5),_0x3af40c+=_0x37247e(0xd8),_0x3af40c+=_0x37247e(0x119);for(const _0x569ca2 of _0x396c44){typeof _0x569ca2==_0x37247e(0xdd)&&(_0x3af40c+=_0x37247e(0xee)+_0x569ca2[_0x37247e(0x128)](0x0,0x1)[_0x37247e(0xe3)]()+_0x569ca2[_0x37247e(0x128)](0x1)[_0x37247e(0xfe)]()+_0x57bf1a+_0x37247e(0xfc)+_0x57bf1a+_0x37247e(0x11f),_0x3af40c+=_0x37247e(0x119));}_0x3af40c=_0x3af40c[_0x37247e(0xe7)](_0x37247e(0xd8),_0x5bea87),fs[_0x37247e(0x107)](_0x49bdde,_0x3af40c,_0x37247e(0xe4));}}
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a13_0x5016af=a13_0x7881;(function(_0x1d9c79,_0x18865d){var _0x17be2b=a13_0x7881,_0x3ac156=_0x1d9c79();while(!![]){try{var _0x460a60=-parseInt(_0x17be2b(0x7f))/0x1+-parseInt(_0x17be2b(0x87))/0x2+-parseInt(_0x17be2b(0x81))/0x3+parseInt(_0x17be2b(0x84))/0x4+-parseInt(_0x17be2b(0x82))/0x5+-parseInt(_0x17be2b(0x88))/0x6*(-parseInt(_0x17be2b(0x83))/0x7)+parseInt(_0x17be2b(0x85))/0x8;if(_0x460a60===_0x18865d)break;else _0x3ac156['push'](_0x3ac156['shift']());}catch(_0x51d7ca){_0x3ac156['push'](_0x3ac156['shift']());}}}(a13_0x53f5,0x85abc));function a13_0x7881(_0x31318e,_0x549fca){var _0x53f52c=a13_0x53f5();return a13_0x7881=function(_0x788101,_0x5d9eb2){_0x788101=_0x788101-0x7f;var _0x5ee8d5=_0x53f52c[_0x788101];return _0x5ee8d5;},a13_0x7881(_0x31318e,_0x549fca);}Object[a13_0x5016af(0x80)](exports,a13_0x5016af(0x86),{'value':!![]});function a13_0x53f5(){var _0x20c07a=['7wEZXvi','734876xnaOkf','3423592cTxCVI','__esModule','1149346TSOzRS','6463554tKuvCy','219812VPcejh','defineProperty','513723NgziGu','878425bltTKn'];a13_0x53f5=function(){return _0x20c07a;};return a13_0x53f5();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-apihelper",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@anncic-api/typeorm": "^1.0.
|
|
17
|
+
"@anncic-api/typeorm": "^1.0.12"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/node": "^18.6.5",
|
|
21
21
|
"javascript-obfuscator": "2.19.0",
|
|
22
22
|
"typescript": "^4.7.4"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "5a1add10415cd9a465caa2a1f8fb4d1ea36ce6f2"
|
|
25
25
|
}
|