anncic-apihelper 3.4.37 → 3.4.39
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.d.ts +6 -6
- package/dist/configuration.js +1 -1
- package/dist/helper.d.ts +2 -2
- package/dist/helper.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/service/ApicreateService.d.ts +15 -15
- package/dist/service/ApicreateService.js +1 -1
- package/dist/templateFun/Action.d.ts +10 -10
- package/dist/templateFun/Action.js +1 -1
- package/dist/templateFun/Common.d.ts +7 -7
- package/dist/templateFun/Common.js +1 -1
- package/dist/templateFun/Entities.d.ts +11 -11
- package/dist/templateFun/Entities.js +1 -1
- package/dist/templateFun/Event.d.ts +7 -7
- package/dist/templateFun/Event.js +1 -1
- package/dist/templateFun/Handler.d.ts +9 -9
- package/dist/templateFun/Handler.js +1 -1
- package/dist/templateFun/Search.d.ts +7 -7
- package/dist/templateFun/Search.js +1 -1
- package/dist/templateFun/Validator.d.ts +11 -11
- package/dist/templateFun/Validator.js +1 -1
- package/dist/templateVue/Api.d.ts +9 -9
- package/dist/templateVue/Api.js +1 -1
- package/dist/templateVue/Layout.d.ts +7 -7
- package/dist/templateVue/Layout.js +1 -1
- package/dist/templateVue/LayoutVue.d.ts +10 -10
- package/dist/templateVue/LayoutVue.js +1 -1
- package/dist/templateVue/Router.d.ts +8 -8
- package/dist/templateVue/Router.js +1 -1
- package/dist/templateVue/Validator.d.ts +10 -10
- package/dist/templateVue/Validator.js +1 -1
- package/dist/templateVueV2/Api.d.ts +9 -9
- package/dist/templateVueV2/Api.js +1 -1
- package/dist/templateVueV2/Layout.d.ts +7 -7
- package/dist/templateVueV2/Layout.js +1 -1
- package/dist/templateVueV2/LayoutVue.d.ts +10 -10
- package/dist/templateVueV2/LayoutVue.js +1 -1
- package/dist/templateVueV2/Router.d.ts +8 -8
- package/dist/templateVueV2/Router.js +1 -1
- package/dist/templateVueV2/Validator.d.ts +8 -8
- package/dist/templateVueV2/Validator.js +1 -1
- package/dist/templateVueV3/Api.d.ts +9 -9
- package/dist/templateVueV3/Api.js +1 -1
- package/dist/templateVueV3/Layout.d.ts +8 -8
- package/dist/templateVueV3/Layout.js +1 -1
- package/dist/templateVueV3/LayoutVue.d.ts +11 -11
- package/dist/templateVueV3/LayoutVue.js +1 -1
- package/dist/templateVueV3/Router.d.ts +8 -8
- package/dist/templateVueV3/Router.js +1 -1
- package/dist/templateVueV3/Validator.d.ts +8 -8
- package/dist/templateVueV3/Validator.js +1 -1
- package/dist/types/index.d.ts +18 -18
- package/dist/types/index.js +1 -1
- package/package.json +4 -4
package/dist/configuration.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MidwayApplicationManager, MidwayConfigService, MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
-
export declare class CustomConfiguration {
|
|
3
|
-
config: MidwayConfigService;
|
|
4
|
-
decorator: MidwayDecoratorService;
|
|
5
|
-
application: MidwayApplicationManager;
|
|
6
|
-
}
|
|
1
|
+
import { MidwayApplicationManager, MidwayConfigService, MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
+
export declare class CustomConfiguration {
|
|
3
|
+
config: MidwayConfigService;
|
|
4
|
+
decorator: MidwayDecoratorService;
|
|
5
|
+
application: MidwayApplicationManager;
|
|
6
|
+
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a0_0x2ee5(){var _0x429783=['length','defineProperty','1135796KvEbKz','decorate','506124gDFDkb','206NDDwuH','Inject','constructor','function','MidwayConfigService','decorator','CustomConfiguration','__metadata','7400sPkARf','__decorate','(((.+)+)+)+$','getOwnPropertyDescriptor','MidwayApplicationManager','__esModule','config','application','25957noAwJW','1233muaCvK','400897Sdqtgo','metadata','toString','1716390abSZPN','object','prototype','design:type','1929bPpRFH','search','5OcGZNT'];a0_0x2ee5=function(){return _0x429783;};return a0_0x2ee5();}function a0_0x31e4(_0xeb8f46,_0x4a9cef){var _0x1ff847=a0_0x2ee5();return a0_0x31e4=function(_0x470fb0,_0x303526){_0x470fb0=_0x470fb0-0xe8;var _0x2ee5d3=_0x1ff847[_0x470fb0];return _0x2ee5d3;},a0_0x31e4(_0xeb8f46,_0x4a9cef);}var a0_0x470f6e=a0_0x31e4;(function(_0x148f68,_0x14e1bb){var _0x517392=a0_0x31e4,_0x1fce68=_0x148f68();while(!![]){try{var _0xb92614=-parseInt(_0x517392(0xf2))/0x1+parseInt(_0x517392(0x103))/0x2*(-parseInt(_0x517392(0xfb))/0x3)+parseInt(_0x517392(0x100))/0x4*(parseInt(_0x517392(0xfd))/0x5)+parseInt(_0x517392(0x102))/0x6+-parseInt(_0x517392(0xf4))/0x7+-parseInt(_0x517392(0xea))/0x8*(-parseInt(_0x517392(0xf3))/0x9)+-parseInt(_0x517392(0xf7))/0xa;if(_0xb92614===_0x14e1bb)break;else _0x1fce68['push'](_0x1fce68['shift']());}catch(_0x527cbf){_0x1fce68['push'](_0x1fce68['shift']());}}}(a0_0x2ee5,0x2a76c));var a0_0x303526=(function(){var _0x1cabb0=!![];return function(_0x25540c,_0x3a7e16){var _0xa9676f=_0x1cabb0?function(){if(_0x3a7e16){var _0x5cd1e5=_0x3a7e16['apply'](_0x25540c,arguments);return _0x3a7e16=null,_0x5cd1e5;}}:function(){};return _0x1cabb0=![],_0xa9676f;};}()),a0_0x470fb0=a0_0x303526(this,function(){var _0x59d2fb=a0_0x31e4;return a0_0x470fb0[_0x59d2fb(0xf6)]()[_0x59d2fb(0xfc)](_0x59d2fb(0xec))[_0x59d2fb(0xf6)]()[_0x59d2fb(0x105)](a0_0x470fb0)[_0x59d2fb(0xfc)]('(((.+)+)+)+$');});a0_0x470fb0();'use strict';var __decorate=this&&this[a0_0x470f6e(0xeb)]||function(_0x4564e4,_0x326e4d,_0x2926e7,_0x4fdc36){var _0x458ca7=a0_0x470f6e,_0x563610=arguments[_0x458ca7(0xfe)],_0x4fd40e=_0x563610<0x3?_0x326e4d:_0x4fdc36===null?_0x4fdc36=Object[_0x458ca7(0xed)](_0x326e4d,_0x2926e7):_0x4fdc36,_0x49a939;if(typeof Reflect===_0x458ca7(0xf8)&&typeof Reflect[_0x458ca7(0x101)]===_0x458ca7(0x106))_0x4fd40e=Reflect[_0x458ca7(0x101)](_0x4564e4,_0x326e4d,_0x2926e7,_0x4fdc36);else{for(var _0x5a9189=_0x4564e4[_0x458ca7(0xfe)]-0x1;_0x5a9189>=0x0;_0x5a9189--)if(_0x49a939=_0x4564e4[_0x5a9189])_0x4fd40e=(_0x563610<0x3?_0x49a939(_0x4fd40e):_0x563610>0x3?_0x49a939(_0x326e4d,_0x2926e7,_0x4fd40e):_0x49a939(_0x326e4d,_0x2926e7))||_0x4fd40e;}return _0x563610>0x3&&_0x4fd40e&&Object['defineProperty'](_0x326e4d,_0x2926e7,_0x4fd40e),_0x4fd40e;},__metadata=this&&this[a0_0x470f6e(0xe9)]||function(_0x46a212,_0x367f09){var _0x17d361=a0_0x470f6e;if(typeof Reflect===_0x17d361(0xf8)&&typeof Reflect[_0x17d361(0xf5)]===_0x17d361(0x106))return Reflect[_0x17d361(0xf5)](_0x46a212,_0x367f09);};Object[a0_0x470f6e(0xff)](exports,a0_0x470f6e(0xef),{'value':!![]}),exports[a0_0x470f6e(0xe8)]=void 0x0;const core_1=require('@midwayjs/core'),core_2=require('@midwayjs/core'),typeorm=require('@anncic-api/typeorm');let CustomConfiguration=class CustomConfiguration{};exports[a0_0x470f6e(0xe8)]=CustomConfiguration,__decorate([(0x0,core_1['Inject'])(),__metadata(a0_0x470f6e(0xfa),core_2[a0_0x470f6e(0x107)])],CustomConfiguration[a0_0x470f6e(0xf9)],a0_0x470f6e(0xf0),void 0x0),__decorate([(0x0,core_1[a0_0x470f6e(0x104)])(),__metadata(a0_0x470f6e(0xfa),core_2['MidwayDecoratorService'])],CustomConfiguration['prototype'],a0_0x470f6e(0x108),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a0_0x470f6e(0xfa),core_2[a0_0x470f6e(0xee)])],CustomConfiguration['prototype'],a0_0x470f6e(0xf1),void 0x0),exports[a0_0x470f6e(0xe8)]=CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'conflictCheck':![],'imports':[typeorm],'namespace':'anncic-apihelper'})],CustomConfiguration);
|
package/dist/helper.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function getProp(type: string): string;
|
|
2
|
-
export declare function getEnum(type: string): Array<string>;
|
|
1
|
+
export declare function getProp(type: string): string;
|
|
2
|
+
export declare function getEnum(type: string): Array<string>;
|
package/dist/helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x164030=a1_0xfc76;(function(_0x2f3e0c,_0x578a7e){const _0xf7986=a1_0xfc76,_0x2c51ef=_0x2f3e0c();while(!![]){try{const _0x8af77=parseInt(_0xf7986(0xce))/0x1*(parseInt(_0xf7986(0xcb))/0x2)+parseInt(_0xf7986(0xd5))/0x3*(-parseInt(_0xf7986(0xcc))/0x4)+parseInt(_0xf7986(0xe3))/0x5+parseInt(_0xf7986(0xc8))/0x6*(-parseInt(_0xf7986(0xd7))/0x7)+parseInt(_0xf7986(0xdd))/0x8+parseInt(_0xf7986(0xdb))/0x9*(parseInt(_0xf7986(0xd2))/0xa)+parseInt(_0xf7986(0xd9))/0xb*(-parseInt(_0xf7986(0xdc))/0xc);if(_0x8af77===_0x578a7e)break;else _0x2c51ef['push'](_0x2c51ef['shift']());}catch(_0x1904c8){_0x2c51ef['push'](_0x2c51ef['shift']());}}}(a1_0x51e6,0xb3d93));const a1_0x12d28a=(function(){let _0x4ec18e=!![];return function(_0x5a3e62,_0x290a76){const _0x260fc1=_0x4ec18e?function(){if(_0x290a76){const _0x5abe7b=_0x290a76['apply'](_0x5a3e62,arguments);return _0x290a76=null,_0x5abe7b;}}:function(){};return _0x4ec18e=![],_0x260fc1;};}()),a1_0x32dd61=a1_0x12d28a(this,function(){const _0x253525=a1_0xfc76;return a1_0x32dd61[_0x253525(0xdf)]()[_0x253525(0xca)](_0x253525(0xda))['toString']()['constructor'](a1_0x32dd61)['search'](_0x253525(0xda));});a1_0x32dd61();'use strict';Object[a1_0x164030(0xcd)](exports,'__esModule',{'value':!![]}),exports[a1_0x164030(0xd4)]=getProp,exports[a1_0x164030(0xd1)]=getEnum;const columnTypes={'json':'json','char':a1_0x164030(0xd6),'varchar':'string','text':a1_0x164030(0xe0),'longtext':'longtext','mediumtext':'mediumtext','int':a1_0x164030(0xc7),'float':a1_0x164030(0xd8),'double':'float','decimal':a1_0x164030(0xe4),'date':a1_0x164030(0xe1),'time':a1_0x164030(0xd3),'datetime':a1_0x164030(0xd3),'timestamp':a1_0x164030(0xc9),'tinyint':a1_0x164030(0xd0)};function a1_0x51e6(){const _0x516a3b=['string','119igSicn','float','143axtgcB','(((.+)+)+)+$','4249917TWErDl','589308wUSklK','5788576BBrtlr','substr','toString','text','date','indexOf','2541465kgEzNQ','decimal','number','191778TinvCc','timestamp','search','28VitIWk','4ZznjjT','defineProperty','86802cveHai','replace','tinyint','getEnum','20cfPimx','datetime','getProp','4419216jTqreO'];a1_0x51e6=function(){return _0x516a3b;};return a1_0x51e6();}function getProp(_0x1301a9){const _0xbad3b8=a1_0x164030;if(columnTypes['hasOwnProperty'](_0x1301a9))return columnTypes[_0x1301a9];else return _0x1301a9[_0xbad3b8(0xe2)]('(')>-0x1||_0x1301a9[_0xbad3b8(0xe2)]('\x20')>-0x1?(_0x1301a9=_0x1301a9[_0xbad3b8(0xde)](0x0,_0x1301a9[_0xbad3b8(0xe2)]('(')>-0x1?_0x1301a9[_0xbad3b8(0xe2)]('('):_0x1301a9[_0xbad3b8(0xe2)]('\x20')),columnTypes[_0x1301a9]||_0x1301a9):_0xbad3b8(0xd6);}function a1_0xfc76(_0x110d0f,_0x1b2a51){const _0xc31b04=a1_0x51e6();return a1_0xfc76=function(_0x32dd61,_0x12d28a){_0x32dd61=_0x32dd61-0xc7;let _0x51e6d8=_0xc31b04[_0x32dd61];return _0x51e6d8;},a1_0xfc76(_0x110d0f,_0x1b2a51);}function getEnum(_0x4d8922){const _0x38e3fd=a1_0x164030;if(getProp(_0x4d8922)=='enum')return _0x4d8922[_0x38e3fd(0xde)](0x5,_0x4d8922['length']-0x6)[_0x38e3fd(0xcf)](/[\'|\"]/g,'')['split'](',');return[];}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ApicreateService } from './service/ApicreateService';
|
|
2
|
-
export { CustomConfiguration as Configuration } from './configuration';
|
|
1
|
+
export { ApicreateService } from './service/ApicreateService';
|
|
2
|
+
export { CustomConfiguration as Configuration } from './configuration';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a2_0x46e8ab=a2_0x1e78;(function(_0x1d3077,_0x57acd4){var _0x19c3c3=a2_0x1e78,_0x47f50f=_0x1d3077();while(!![]){try{var _0x38e70d=-parseInt(_0x19c3c3(0x14a))/0x1+-parseInt(_0x19c3c3(0x155))/0x2*(parseInt(_0x19c3c3(0x14d))/0x3)+-parseInt(_0x19c3c3(0x15a))/0x4*(parseInt(_0x19c3c3(0x14c))/0x5)+parseInt(_0x19c3c3(0x148))/0x6*(-parseInt(_0x19c3c3(0x153))/0x7)+parseInt(_0x19c3c3(0x14f))/0x8*(parseInt(_0x19c3c3(0x14b))/0x9)+-parseInt(_0x19c3c3(0x158))/0xa+parseInt(_0x19c3c3(0x150))/0xb;if(_0x38e70d===_0x57acd4)break;else _0x47f50f['push'](_0x47f50f['shift']());}catch(_0x1af76e){_0x47f50f['push'](_0x47f50f['shift']());}}}(a2_0x5152,0x5c70a));var a2_0x1980a5=(function(){var _0x140ddd=!![];return function(_0xc1e2ae,_0x160619){var _0x41a954=_0x140ddd?function(){var _0x530fa3=a2_0x1e78;if(_0x160619){var _0x15c462=_0x160619[_0x530fa3(0x147)](_0xc1e2ae,arguments);return _0x160619=null,_0x15c462;}}:function(){};return _0x140ddd=![],_0x41a954;};}()),a2_0x1f9ef9=a2_0x1980a5(this,function(){var _0x32422e=a2_0x1e78;return a2_0x1f9ef9[_0x32422e(0x14e)]()['search'](_0x32422e(0x152))[_0x32422e(0x14e)]()['constructor'](a2_0x1f9ef9)['search']('(((.+)+)+)+$');});a2_0x1f9ef9();'use strict';Object['defineProperty'](exports,a2_0x46e8ab(0x156),{'value':!![]}),exports[a2_0x46e8ab(0x157)]=exports[a2_0x46e8ab(0x149)]=void 0x0;var ApicreateService_1=require('./service/ApicreateService');Object[a2_0x46e8ab(0x154)](exports,a2_0x46e8ab(0x149),{'enumerable':!![],'get':function(){var _0x35a23f=a2_0x46e8ab;return ApicreateService_1[_0x35a23f(0x149)];}});function a2_0x1e78(_0x1928f9,_0x4e2fcf){var _0x164e23=a2_0x5152();return a2_0x1e78=function(_0x1f9ef9,_0x1980a5){_0x1f9ef9=_0x1f9ef9-0x147;var _0x5152ac=_0x164e23[_0x1f9ef9];return _0x5152ac;},a2_0x1e78(_0x1928f9,_0x4e2fcf);}function a2_0x5152(){var _0x244cb8=['toString','136QDsVgF','20549474FnDpUE','./configuration','(((.+)+)+)+$','14oXHMbU','defineProperty','160TcDOLU','__esModule','Configuration','351410saTlAw','CustomConfiguration','1445404lscrwM','apply','1884702yjouUN','ApicreateService','608648ESXlDY','317745hZGxWO','10RClkxI','3561WcUufG'];a2_0x5152=function(){return _0x244cb8;};return a2_0x5152();}var configuration_1=require(a2_0x46e8ab(0x151));Object[a2_0x46e8ab(0x154)](exports,a2_0x46e8ab(0x157),{'enumerable':!![],'get':function(){var _0x106b86=a2_0x46e8ab;return configuration_1[_0x106b86(0x159)];}});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { MidwayEnvironmentService } from '@midwayjs/core';
|
|
2
|
-
import { TypeORMDataSourceManager } from '@midwayjs/typeorm';
|
|
3
|
-
import { IApicreate, IApicreateApp, IApicreateBasic, IApicreatePlugin } from '../types';
|
|
4
|
-
export declare class ApicreateService {
|
|
5
|
-
protected app: any;
|
|
6
|
-
protected config: any;
|
|
7
|
-
environment: MidwayEnvironmentService;
|
|
8
|
-
dataSourceManager: TypeORMDataSourceManager;
|
|
9
|
-
createApp(option: IApicreate): Promise<string>;
|
|
10
|
-
createBasic(option: IApicreate): Promise<string>;
|
|
11
|
-
createPlugin(option: IApicreate): Promise<string>;
|
|
12
|
-
protected createAction(option?: IApicreateApp & IApicreateBasic & IApicreatePlugin): Promise<string>;
|
|
13
|
-
protected checkOption(option: IApicreate): Promise<boolean>;
|
|
14
|
-
protected CreateModuleConfig(CreateOption: any): Promise<void>;
|
|
15
|
-
}
|
|
1
|
+
import { MidwayEnvironmentService } from '@midwayjs/core';
|
|
2
|
+
import { TypeORMDataSourceManager } from '@midwayjs/typeorm';
|
|
3
|
+
import { IApicreate, IApicreateApp, IApicreateBasic, IApicreatePlugin } from '../types';
|
|
4
|
+
export declare class ApicreateService {
|
|
5
|
+
protected app: any;
|
|
6
|
+
protected config: any;
|
|
7
|
+
environment: MidwayEnvironmentService;
|
|
8
|
+
dataSourceManager: TypeORMDataSourceManager;
|
|
9
|
+
createApp(option: IApicreate): Promise<string>;
|
|
10
|
+
createBasic(option: IApicreate): Promise<string>;
|
|
11
|
+
createPlugin(option: IApicreate): Promise<string>;
|
|
12
|
+
protected createAction(option?: IApicreateApp & IApicreateBasic & IApicreatePlugin): Promise<string>;
|
|
13
|
+
protected checkOption(option: IApicreate): Promise<boolean>;
|
|
14
|
+
protected CreateModuleConfig(CreateOption: any): Promise<void>;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x4c8470=a3_0x5b54;function a3_0x1553(){const _0x120ed6=['\x22\x20AND\x20table_name\x20=\x20\x27','57805jyJRxi','\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middleware:\x20[],\x0a}','comment','Inject','App','table','hasvue','query','../templateVueV3/Router','Scope','tableprefix','apply','replace','/pages/apps/','33oFPXcH','../templateVueV2/Router','Field','Comment','../templateVueV3/Validator','getBaseDir','dataSourceManager','../templateVueV3/Api','apporbasic','tablestartLowShort','default','../templateVue/Layout','ApicreateService','192217qssPNY','无法生成','design:type','1002519vMFLcN','../templateVueV3/LayoutVue','controllers','basedir','path','7yRiCtE','/exceptions/','module','vuedialog','1744936llutJz','defineProperty','__decorate','object','toUpperCase','@midwayjs/core','(((.+)+)+)+$','metadata','4nHiIvu','/apis/','controller','LIKE\x20\x22','/pages/','PRI','tablestartUpShort','startsWith','isArray','tablestartUpShort2','filter','checkOption','hasDataSource','\x20未连接','cwd','/vue','getDataSource','tablestartUp','typeorm\x20数据源\x20','../templateVueV3/Layout','50ntDuCH','map','createBasic','.ts','MidwayEnvironmentService','../templateFun/Action','Key','join','database','../templateVueV2/Validator','substr','__metadata','connection','string','\x22\x20AND\x20table_name\x20','createPlugin','/config.ts','../templateVue/Router','toLowerCase','@midwayjs/typeorm','utf-8','existsSync','../templateVue/Api','split','createAction','die','search','4xXNxVn','tablestartLow','../templateFun/Common','config','ScopeEnum','dataSource','export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27','SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','substring','Singleton','/apis/apps/','tablestart','../templateVueV2/Layout','basic','error','decorate','=\x20\x22','/apps/','prototype','.js','\x20不存在','app','dirname','__esModule','../templateFun/Validator','trim','CreateModuleConfig','writeFileSync','/api/','228156vQdujh','environment','211833tppZSn','moduleName','../templateFun/Event','length','Fields','822438fyAHgF'];a3_0x1553=function(){return _0x120ed6;};return a3_0x1553();}(function(_0x130a81,_0x42cb4c){const _0x1ad2dd=a3_0x5b54,_0x4dbac8=_0x130a81();while(!![]){try{const _0x5bb006=parseInt(_0x1ad2dd(0x152))/0x1*(-parseInt(_0x1ad2dd(0x111))/0x2)+parseInt(_0x1ad2dd(0x155))/0x3+parseInt(_0x1ad2dd(0x166))/0x4*(parseInt(_0x1ad2dd(0x137))/0x5)+parseInt(_0x1ad2dd(0x135))/0x6+parseInt(_0x1ad2dd(0x15a))/0x7*(parseInt(_0x1ad2dd(0x15e))/0x8)+-parseInt(_0x1ad2dd(0x130))/0x9*(parseInt(_0x1ad2dd(0x17a))/0xa)+-parseInt(_0x1ad2dd(0x145))/0xb*(-parseInt(_0x1ad2dd(0x12e))/0xc);if(_0x5bb006===_0x42cb4c)break;else _0x4dbac8['push'](_0x4dbac8['shift']());}catch(_0x574153){_0x4dbac8['push'](_0x4dbac8['shift']());}}}(a3_0x1553,0x3e764));function a3_0x5b54(_0x5a326f,_0x39d735){const _0x3fb361=a3_0x1553();return a3_0x5b54=function(_0x539391,_0x584416){_0x539391=_0x539391-0x106;let _0x15539a=_0x3fb361[_0x539391];return _0x15539a;},a3_0x5b54(_0x5a326f,_0x39d735);}const a3_0x584416=(function(){let _0x51edbf=!![];return function(_0x1851d6,_0xb68173){const _0x97b98c=_0x51edbf?function(){const _0x342707=a3_0x5b54;if(_0xb68173){const _0x511da4=_0xb68173[_0x342707(0x142)](_0x1851d6,arguments);return _0xb68173=null,_0x511da4;}}:function(){};return _0x51edbf=![],_0x97b98c;};}()),a3_0x539391=a3_0x584416(this,function(){const _0x4b4c59=a3_0x5b54;return a3_0x539391['toString']()[_0x4b4c59(0x110)](_0x4b4c59(0x164))['toString']()['constructor'](a3_0x539391)['search'](_0x4b4c59(0x164));});a3_0x539391();'use strict';var __decorate=this&&this[a3_0x4c8470(0x160)]||function(_0x3fc1cf,_0x4f0a4e,_0x2ab957,_0x5a86aa){const _0x4b2774=a3_0x4c8470;var _0x5419bb=arguments[_0x4b2774(0x133)],_0x3d7504=_0x5419bb<0x3?_0x4f0a4e:_0x5a86aa===null?_0x5a86aa=Object['getOwnPropertyDescriptor'](_0x4f0a4e,_0x2ab957):_0x5a86aa,_0xba73ca;if(typeof Reflect===_0x4b2774(0x161)&&typeof Reflect[_0x4b2774(0x120)]==='function')_0x3d7504=Reflect[_0x4b2774(0x120)](_0x3fc1cf,_0x4f0a4e,_0x2ab957,_0x5a86aa);else{for(var _0x14e7ab=_0x3fc1cf['length']-0x1;_0x14e7ab>=0x0;_0x14e7ab--)if(_0xba73ca=_0x3fc1cf[_0x14e7ab])_0x3d7504=(_0x5419bb<0x3?_0xba73ca(_0x3d7504):_0x5419bb>0x3?_0xba73ca(_0x4f0a4e,_0x2ab957,_0x3d7504):_0xba73ca(_0x4f0a4e,_0x2ab957))||_0x3d7504;}return _0x5419bb>0x3&&_0x3d7504&&Object['defineProperty'](_0x4f0a4e,_0x2ab957,_0x3d7504),_0x3d7504;},__metadata=this&&this[a3_0x4c8470(0x185)]||function(_0x2db58a,_0x3d8c03){const _0x1e3d80=a3_0x4c8470;if(typeof Reflect===_0x1e3d80(0x161)&&typeof Reflect[_0x1e3d80(0x165)]==='function')return Reflect[_0x1e3d80(0x165)](_0x2db58a,_0x3d8c03);};Object[a3_0x4c8470(0x15f)](exports,a3_0x4c8470(0x128),{'value':!![]}),exports[a3_0x4c8470(0x151)]=void 0x0;const fs=require('fs'),path=require(a3_0x4c8470(0x159)),core_1=require(a3_0x4c8470(0x163)),typeorm_1=require(a3_0x4c8470(0x109)),core_2=require('@midwayjs/core'),Common_1=require(a3_0x4c8470(0x113)),Event_1=require(a3_0x4c8470(0x132)),Search_1=require('../templateFun/Search'),Entities_1=require('../templateFun/Entities'),Handler_1=require('../templateFun/Handler'),Validator_1=require(a3_0x4c8470(0x129)),Action_1=require(a3_0x4c8470(0x17f)),Api_1=require(a3_0x4c8470(0x10c)),Router_1=require(a3_0x4c8470(0x107)),Layout_1=require(a3_0x4c8470(0x150)),LayoutVue_1=require('../templateVue/LayoutVue'),Validator_2=require('../templateVue/Validator'),Api_2=require('../templateVueV2/Api'),Router_2=require(a3_0x4c8470(0x146)),Layout_2=require(a3_0x4c8470(0x11d)),LayoutVue_2=require('../templateVueV2/LayoutVue'),Validator_3=require(a3_0x4c8470(0x183)),Api_3=require(a3_0x4c8470(0x14c)),Router_3=require(a3_0x4c8470(0x13f)),Layout_3=require(a3_0x4c8470(0x179)),LayoutVue_3=require(a3_0x4c8470(0x156)),Validator_4=require(a3_0x4c8470(0x149));let ApicreateService=class ApicreateService{async['createApp'](_0x19d178){const _0x241bb0=a3_0x4c8470;return await this[_0x241bb0(0x171)](_0x19d178),await this[_0x241bb0(0x10e)]({..._0x19d178,'apporbasic':'app'});}async[a3_0x4c8470(0x17c)](_0x400165){const _0x3b10d3=a3_0x4c8470;return await this[_0x3b10d3(0x171)](_0x400165),await this[_0x3b10d3(0x10e)]({..._0x400165,'apporbasic':_0x3b10d3(0x11e)});}async[a3_0x4c8470(0x189)](_0x194c14){const _0x438e4c=a3_0x4c8470;return await this[_0x438e4c(0x171)](_0x194c14),await this['createAction']({..._0x194c14,'module':!![]});}async['createAction'](_0x592030){const _0x16de47=a3_0x4c8470;var _0x28c148,_0x242c36;!_0x592030['connection']&&(_0x592030[_0x16de47(0x186)]=_0x16de47(0x14f));!_0x592030[_0x16de47(0x14d)]&&(_0x592030['apporbasic']=_0x16de47(0x126));const _0x34cb67=this['app'][_0x16de47(0x14a)](),_0x3a01ed=this[_0x16de47(0x14b)][_0x16de47(0x176)](_0x592030[_0x16de47(0x186)]),_0x564843=await _0x3a01ed[_0x16de47(0x13e)](_0x16de47(0x118)+this[_0x16de47(0x114)]['dataSource'][_0x592030[_0x16de47(0x186)]][_0x16de47(0x182)]+_0x16de47(0x188)+((_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x13c)])?_0x16de47(0x121)+_0x592030[_0x16de47(0x13c)]+'\x22':_0x16de47(0x169)+(_0x592030[_0x16de47(0x141)]||'')+'%\x22'))||[];for(let _0x398e4b=0x0;_0x398e4b<_0x564843['length'];_0x398e4b++){const _0x3c3124=_0x564843[_0x398e4b][_0x16de47(0x13c)];if((_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030['table'])&&(_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x13c)])!=_0x3c3124)continue;if((_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030['tableprefix'])&&!(_0x3c3124===null||_0x3c3124===void 0x0?void 0x0:_0x3c3124[_0x16de47(0x16d)](_0x592030['tableprefix'])))continue;const _0x185cf9=await _0x3a01ed[_0x16de47(0x13e)]('SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22'+this['config'][_0x16de47(0x116)][_0x592030[_0x16de47(0x186)]][_0x16de47(0x182)]+_0x16de47(0x136)+_0x3c3124+'\x27')||[];if((_0x28c148=_0x185cf9[0x0])===null||_0x28c148===void 0x0?void 0x0:_0x28c148[_0x16de47(0x139)]){const _0x3a92b5={'tablename':_0x3c3124,'Primary':{},'Fields':{},'Comment':(_0x242c36=_0x185cf9[0x0])===null||_0x242c36===void 0x0?void 0x0:_0x242c36[_0x16de47(0x139)],'vuedialog':_0x592030[_0x16de47(0x15d)],'apporbasic':_0x592030[_0x16de47(0x14d)]};_0x3a92b5[_0x16de47(0x11c)]=_0x3c3124[_0x16de47(0x184)]((_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x184)])||0x0,_0x3c3124[_0x16de47(0x133)]),_0x3a92b5['basedir']=(_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x15c)])?_0x34cb67+_0x16de47(0x122)+_0x3a92b5['tablestart'][_0x16de47(0x10d)]('_')[0x0]['toLowerCase']():_0x34cb67+'/'+_0x592030[_0x16de47(0x14d)];const _0x13dfe3=_0x3a92b5[_0x16de47(0x11c)][_0x16de47(0x10d)]('_')[_0x16de47(0x170)](_0x588350=>_0x588350&&_0x588350[_0x16de47(0x12a)]());(_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x15c)])&&(await this[_0x16de47(0x12b)](_0x3a92b5),_0x3a92b5[_0x16de47(0x131)]=_0x13dfe3[0x0]['toLowerCase']());_0x3a92b5[_0x16de47(0x112)]=_0x13dfe3[_0x16de47(0x17b)](_0x471a81=>_0x471a81['toLowerCase']())['join'](''),_0x3a92b5['tablestartUp']=_0x13dfe3['map'](_0x41e159=>''+_0x41e159[_0x16de47(0x119)](0x0,0x1)[_0x16de47(0x162)]()+_0x41e159[_0x16de47(0x119)](0x1)[_0x16de47(0x108)]())[_0x16de47(0x181)]('');(_0x3a92b5===null||_0x3a92b5===void 0x0?void 0x0:_0x3a92b5[_0x16de47(0x131)])&&_0x13dfe3['length']>0x1&&_0x13dfe3[0x0][_0x16de47(0x108)]()==_0x3a92b5['moduleName']?(_0x3a92b5[_0x16de47(0x16c)]=_0x3a92b5[_0x16de47(0x177)][_0x16de47(0x119)](_0x3a92b5[_0x16de47(0x131)][_0x16de47(0x133)],_0x3a92b5[_0x16de47(0x177)][_0x16de47(0x133)]),_0x3a92b5['tablestartLowShort']=_0x3a92b5[_0x16de47(0x112)][_0x16de47(0x119)](_0x3a92b5['moduleName'][_0x16de47(0x133)],_0x3a92b5[_0x16de47(0x112)]['length'])):(_0x3a92b5[_0x16de47(0x16c)]=_0x3a92b5['tablestartUp'],_0x3a92b5[_0x16de47(0x14e)]=_0x3a92b5[_0x16de47(0x112)]);_0x3a92b5[_0x16de47(0x16f)]=_0x3a92b5[_0x16de47(0x16c)][_0x16de47(0x143)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x16de47(0x181)]('-')[_0x16de47(0x108)]()[_0x16de47(0x143)](/\/\-/g,'/');for(let _0x21e53f of await _0x3a01ed[_0x16de47(0x13e)]('SHOW\x20FULL\x20COLUMNS\x20FROM\x20`'+_0x3c3124+'`')){_0x21e53f[_0x16de47(0x180)]==_0x16de47(0x16b)?_0x3a92b5['Primary']=_0x21e53f:_0x3a92b5[_0x16de47(0x134)][_0x21e53f[_0x16de47(0x147)]]=_0x21e53f;}if((_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x168)])&&!fs[_0x16de47(0x10b)](_0x3a92b5[_0x16de47(0x158)]+_0x16de47(0x15b)+_0x3a92b5[_0x16de47(0x16c)]+_0x16de47(0x17d))){var _0x408eb9=[];if(typeof(_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x168)])==_0x16de47(0x187))_0x408eb9=[_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x168)]];else Array['isArray'](_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x168)])?_0x408eb9=_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x168)]:_0x408eb9=[!![]];_0x3a92b5[_0x16de47(0x157)]=_0x408eb9,await(0x0,Search_1[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Entities_1[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Common_1['default'])(_0x3a92b5),await(0x0,Event_1[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Handler_1[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Validator_1[_0x16de47(0x14f)])(_0x3a92b5);for(let _0x2e43a5 of _0x408eb9){_0x3a92b5[_0x16de47(0x168)]=_0x2e43a5,await(0x0,Action_1[_0x16de47(0x14f)])(_0x3a92b5);}}if(_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x13d)]){var _0x408eb9=[];if(typeof(_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x168)])==_0x16de47(0x187))_0x408eb9=[_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030[_0x16de47(0x168)]];else Array[_0x16de47(0x16e)](_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030['controller'])?_0x408eb9=_0x592030===null||_0x592030===void 0x0?void 0x0:_0x592030['controller']:_0x408eb9=[!![]];if(_0x592030[_0x16de47(0x13d)]=='v2')for(let _0x1365c0 of _0x408eb9){_0x3a92b5[_0x16de47(0x168)]=_0x1365c0;let _0x11fb17=process[_0x16de47(0x174)]()+'/vue'+(typeof _0x3a92b5[_0x16de47(0x168)]==_0x16de47(0x187)?'/'+_0x3a92b5[_0x16de47(0x168)]:'');_0x3a92b5[_0x16de47(0x131)]?_0x11fb17=_0x11fb17+(_0x16de47(0x11b)+_0x3a92b5['moduleName']+_0x16de47(0x167)+_0x3a92b5['tablestartUpShort']+'.js'):_0x11fb17=_0x11fb17+(_0x16de47(0x167)+_0x3a92b5[_0x16de47(0x14d)]+_0x16de47(0x167)+_0x3a92b5[_0x16de47(0x16c)]+_0x16de47(0x124)),!fs[_0x16de47(0x10b)](_0x11fb17)&&(await(0x0,Api_2[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Router_2[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Layout_2['default'])(_0x3a92b5),await(0x0,LayoutVue_2[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Validator_3[_0x16de47(0x14f)])(_0x3a92b5));}else{if(_0x592030['hasvue']=='v3')for(let _0x14f75a of _0x408eb9){_0x3a92b5['controller']=_0x14f75a;let _0x2e7dfb=process['cwd']()+'/vue'+(typeof _0x3a92b5[_0x16de47(0x168)]==_0x16de47(0x187)?'/'+_0x3a92b5[_0x16de47(0x168)]:'');_0x3a92b5['moduleName']?_0x2e7dfb=_0x2e7dfb+(_0x16de47(0x11b)+_0x3a92b5[_0x16de47(0x131)]+'/apis/'+_0x3a92b5['tablestartUpShort']+_0x16de47(0x124)):_0x2e7dfb=_0x2e7dfb+(_0x16de47(0x167)+_0x3a92b5[_0x16de47(0x14d)]+'/apis/'+_0x3a92b5[_0x16de47(0x16c)]+_0x16de47(0x124)),!fs[_0x16de47(0x10b)](_0x2e7dfb)&&(await(0x0,Api_3[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Router_3[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Layout_3['default'])(_0x3a92b5),await(0x0,LayoutVue_3[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Validator_4['default'])(_0x3a92b5));}else for(let _0x497cb2 of _0x408eb9){_0x3a92b5[_0x16de47(0x168)]=_0x497cb2;let _0x49bd21=process[_0x16de47(0x174)]()+_0x16de47(0x175)+(typeof _0x3a92b5[_0x16de47(0x168)]=='string'?'/'+_0x3a92b5['controller']:'');_0x3a92b5[_0x16de47(0x131)]?_0x49bd21=_0x49bd21+(_0x16de47(0x144)+_0x3a92b5[_0x16de47(0x131)]+_0x16de47(0x12d)+_0x3a92b5[_0x16de47(0x16f)]+'.js'):_0x49bd21=_0x49bd21+(_0x16de47(0x16a)+_0x3a92b5[_0x16de47(0x14d)]+_0x16de47(0x12d)+_0x3a92b5['tablestartUpShort2']+_0x16de47(0x124)),!fs[_0x16de47(0x10b)](_0x49bd21)&&(await(0x0,Api_1[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Router_1['default'])(_0x3a92b5),await(0x0,Layout_1[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,LayoutVue_1[_0x16de47(0x14f)])(_0x3a92b5),await(0x0,Validator_2[_0x16de47(0x14f)])(_0x3a92b5));}}}}else console[_0x16de47(0x11f)]('表:'+_0x3c3124+'\x20表注释不存在');}return _0x16de47(0x10f);}async['checkOption'](_0x386986){const _0x3aba1a=a3_0x4c8470;var _0x5b3e31,_0x2bb7b9,_0x5eb48d;if(!this['environment']['isDevelopmentEnvironment']()||!((_0x5b3e31=this[_0x3aba1a(0x114)])===null||_0x5b3e31===void 0x0?void 0x0:_0x5b3e31[_0x3aba1a(0x116)])||!this['app']['getConfig']('apitest'))throw new Error(_0x3aba1a(0x153));!_0x386986[_0x3aba1a(0x186)]&&(_0x386986[_0x3aba1a(0x186)]=_0x3aba1a(0x14f));if(!((_0x5eb48d=(_0x2bb7b9=this[_0x3aba1a(0x114)])===null||_0x2bb7b9===void 0x0?void 0x0:_0x2bb7b9[_0x3aba1a(0x116)])===null||_0x5eb48d===void 0x0?void 0x0:_0x5eb48d[_0x386986[_0x3aba1a(0x186)]]))throw new Error('typeorm\x20未配置数据源\x20'+_0x386986[_0x3aba1a(0x186)]);if(!this['dataSourceManager'][_0x3aba1a(0x172)](_0x386986[_0x3aba1a(0x186)]))throw new Error(_0x3aba1a(0x178)+_0x386986['connection']+_0x3aba1a(0x125));if(!this[_0x3aba1a(0x14b)]['isConnected'](_0x386986[_0x3aba1a(0x186)]))throw new Error(_0x3aba1a(0x178)+_0x386986[_0x3aba1a(0x186)]+_0x3aba1a(0x173));return!![];}async[a3_0x4c8470(0x12b)](_0x459bbb){const _0x25c99d=a3_0x4c8470,_0x52a283=_0x459bbb[_0x25c99d(0x11c)]['split']('_')[0x0]['toLowerCase']();if(!fs[_0x25c99d(0x10b)](_0x459bbb[_0x25c99d(0x158)]+_0x25c99d(0x106))){let _0x1149c5=_0x25c99d(0x117)+(_0x459bbb[_0x25c99d(0x148)]||_0x52a283)+_0x25c99d(0x138);fs['mkdirSync'](path[_0x25c99d(0x127)](_0x459bbb[_0x25c99d(0x158)]+_0x25c99d(0x106)),{'recursive':!![]}),fs[_0x25c99d(0x12c)](_0x459bbb['basedir']+_0x25c99d(0x106),_0x1149c5,_0x25c99d(0x10a));}}};__decorate([(0x0,core_2[a3_0x4c8470(0x13b)])(),__metadata(a3_0x4c8470(0x154),Object)],ApicreateService['prototype'],'app',void 0x0),__decorate([(0x0,core_2['Config'])('typeorm'),__metadata(a3_0x4c8470(0x154),Object)],ApicreateService[a3_0x4c8470(0x123)],a3_0x4c8470(0x114),void 0x0),__decorate([(0x0,core_2[a3_0x4c8470(0x13a)])(),__metadata('design:type',core_1[a3_0x4c8470(0x17e)])],ApicreateService['prototype'],a3_0x4c8470(0x12f),void 0x0),__decorate([(0x0,core_2[a3_0x4c8470(0x13a)])(),__metadata(a3_0x4c8470(0x154),typeorm_1['TypeORMDataSourceManager'])],ApicreateService[a3_0x4c8470(0x123)],a3_0x4c8470(0x14b),void 0x0),ApicreateService=__decorate([(0x0,core_2['Provide'])(a3_0x4c8470(0x151)),(0x0,core_2[a3_0x4c8470(0x140)])(core_2[a3_0x4c8470(0x115)][a3_0x4c8470(0x11a)])],ApicreateService),exports[a3_0x4c8470(0x151)]=ApicreateService;
|
|
1
|
+
const a3_0x31ae63=a3_0x42d4;function a3_0x425c(){const _0x4370f0=['trim','/api/','../templateFun/Action','default','split','config','typeorm\x20数据源\x20','controller','../templateVueV2/Validator','(((.+)+)+)+$','constructor','Fields','mkdirSync','5944970PhFNJS','tablestartUpShort2','\x20未连接','../templateVueV3/LayoutVue','/pages/','.js','comment','\x22\x20AND\x20table_name\x20=\x20\x27','SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','basic','../templateFun/Search','Config','22224nQHfvH','typeorm','isDevelopmentEnvironment','replace','../templateVueV3/Router','checkOption','231jlXiPm','Field','toString','PRI','__metadata','map','search','tablestartLowShort','join','=\x20\x22','tablestart','hasvue','substring','createBasic','/vue','31662OBZEQd','11237XixGdB','../templateFun/Common','CreateModuleConfig','typeorm\x20未配置数据源\x20','hasDataSource','../templateFun/Event','100232cltlZB','MidwayEnvironmentService','Primary','../templateVueV2/Api','getBaseDir','tablestartLow','18HDGVOo','cwd','2005030FxedMF','metadata','dirname','../templateVue/LayoutVue','object','Comment','isConnected','\x22\x20AND\x20table_name\x20','tablestartUpShort','../templateVueV3/Validator','/apps/','34OZDaeW','moduleName','tablestartUp','die','createPlugin','../templateFun/Entities','function','/exceptions/','isArray','length','LIKE\x20\x22','path','Inject','264WfkiJc','/apis/','defineProperty','environment','vuedialog','getDataSource','writeFileSync','Key','ApicreateService','dataSourceManager','toUpperCase','__esModule','basedir','startsWith','query','existsSync','tableprefix','dataSource','prototype','table','/config.ts','module','substr','2122352ALKhqr','apitest','createAction','.ts','apporbasic','toLowerCase','../templateVueV3/Api','__decorate','app','string','../templateFun/Validator','SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','../templateVue/Router','connection','\x20不存在','@midwayjs/core','81wKMIcc','../templateVueV2/LayoutVue','decorate'];a3_0x425c=function(){return _0x4370f0;};return a3_0x425c();}(function(_0x39b9c3,_0x2f5301){const _0xdff603=a3_0x42d4,_0x962f60=_0x39b9c3();while(!![]){try{const _0x5cc6e1=parseInt(_0xdff603(0x156))/0x1*(parseInt(_0xdff603(0x16f))/0x2)+parseInt(_0xdff603(0x124))/0x3*(parseInt(_0xdff603(0x15c))/0x4)+parseInt(_0xdff603(0x164))/0x5+-parseInt(_0xdff603(0x155))/0x6*(-parseInt(_0xdff603(0x146))/0x7)+-parseInt(_0xdff603(0x193))/0x8*(parseInt(_0xdff603(0x162))/0x9)+-parseInt(_0xdff603(0x134))/0xa+parseInt(_0xdff603(0x17c))/0xb*(parseInt(_0xdff603(0x140))/0xc);if(_0x5cc6e1===_0x2f5301)break;else _0x962f60['push'](_0x962f60['shift']());}catch(_0x528613){_0x962f60['push'](_0x962f60['shift']());}}}(a3_0x425c,0x58679));const a3_0xcda981=(function(){let _0x4dcaad=!![];return function(_0x311c72,_0x173fbd){const _0x334030=_0x4dcaad?function(){if(_0x173fbd){const _0x4a4bcc=_0x173fbd['apply'](_0x311c72,arguments);return _0x173fbd=null,_0x4a4bcc;}}:function(){};return _0x4dcaad=![],_0x334030;};}()),a3_0x253043=a3_0xcda981(this,function(){const _0xed9343=a3_0x42d4;return a3_0x253043[_0xed9343(0x148)]()[_0xed9343(0x14c)]('(((.+)+)+)+$')[_0xed9343(0x148)]()[_0xed9343(0x131)](a3_0x253043)[_0xed9343(0x14c)](_0xed9343(0x130));});a3_0x253043();function a3_0x42d4(_0x18adf5,_0x4fb124){const _0x2e0121=a3_0x425c();return a3_0x42d4=function(_0x253043,_0xcda981){_0x253043=_0x253043-0x11c;let _0x425ceb=_0x2e0121[_0x253043];return _0x425ceb;},a3_0x42d4(_0x18adf5,_0x4fb124);}'use strict';var __decorate=this&&this[a3_0x31ae63(0x19a)]||function(_0x7cdb4b,_0x570092,_0x373e4e,_0x147d02){const _0x473831=a3_0x31ae63;var _0x5e234f=arguments[_0x473831(0x178)],_0xe7c2d=_0x5e234f<0x3?_0x570092:_0x147d02===null?_0x147d02=Object['getOwnPropertyDescriptor'](_0x570092,_0x373e4e):_0x147d02,_0x33d7cf;if(typeof Reflect===_0x473831(0x168)&&typeof Reflect[_0x473831(0x126)]===_0x473831(0x175))_0xe7c2d=Reflect[_0x473831(0x126)](_0x7cdb4b,_0x570092,_0x373e4e,_0x147d02);else{for(var _0x534d29=_0x7cdb4b[_0x473831(0x178)]-0x1;_0x534d29>=0x0;_0x534d29--)if(_0x33d7cf=_0x7cdb4b[_0x534d29])_0xe7c2d=(_0x5e234f<0x3?_0x33d7cf(_0xe7c2d):_0x5e234f>0x3?_0x33d7cf(_0x570092,_0x373e4e,_0xe7c2d):_0x33d7cf(_0x570092,_0x373e4e))||_0xe7c2d;}return _0x5e234f>0x3&&_0xe7c2d&&Object[_0x473831(0x17e)](_0x570092,_0x373e4e,_0xe7c2d),_0xe7c2d;},__metadata=this&&this[a3_0x31ae63(0x14a)]||function(_0x239d88,_0x4c6164){const _0x1ffe9e=a3_0x31ae63;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x1ffe9e(0x175))return Reflect[_0x1ffe9e(0x165)](_0x239d88,_0x4c6164);};Object[a3_0x31ae63(0x17e)](exports,a3_0x31ae63(0x187),{'value':!![]}),exports['ApicreateService']=void 0x0;const fs=require('fs'),path=require(a3_0x31ae63(0x17a)),core_1=require(a3_0x31ae63(0x123)),typeorm_1=require('@midwayjs/typeorm'),core_2=require('@midwayjs/core'),Common_1=require(a3_0x31ae63(0x157)),Event_1=require(a3_0x31ae63(0x15b)),Search_1=require(a3_0x31ae63(0x13e)),Entities_1=require(a3_0x31ae63(0x174)),Handler_1=require('../templateFun/Handler'),Validator_1=require(a3_0x31ae63(0x11e)),Action_1=require(a3_0x31ae63(0x129)),Api_1=require('../templateVue/Api'),Router_1=require(a3_0x31ae63(0x120)),Layout_1=require('../templateVue/Layout'),LayoutVue_1=require(a3_0x31ae63(0x167)),Validator_2=require('../templateVue/Validator'),Api_2=require(a3_0x31ae63(0x15f)),Router_2=require('../templateVueV2/Router'),Layout_2=require('../templateVueV2/Layout'),LayoutVue_2=require(a3_0x31ae63(0x125)),Validator_3=require(a3_0x31ae63(0x12f)),Api_3=require(a3_0x31ae63(0x199)),Router_3=require(a3_0x31ae63(0x144)),Layout_3=require('../templateVueV3/Layout'),LayoutVue_3=require(a3_0x31ae63(0x137)),Validator_4=require(a3_0x31ae63(0x16d));let ApicreateService=class ApicreateService{async['createApp'](_0x29f047){const _0x143608=a3_0x31ae63;return await this['checkOption'](_0x29f047),await this[_0x143608(0x195)]({..._0x29f047,'apporbasic':_0x143608(0x11c)});}async[a3_0x31ae63(0x153)](_0x3e8f7a){const _0x2e2521=a3_0x31ae63;return await this[_0x2e2521(0x145)](_0x3e8f7a),await this[_0x2e2521(0x195)]({..._0x3e8f7a,'apporbasic':_0x2e2521(0x13d)});}async[a3_0x31ae63(0x173)](_0x42c23b){const _0x1891f8=a3_0x31ae63;return await this[_0x1891f8(0x145)](_0x42c23b),await this[_0x1891f8(0x195)]({..._0x42c23b,'module':!![]});}async[a3_0x31ae63(0x195)](_0x542f48){const _0x447e0f=a3_0x31ae63;var _0x5299f6,_0x5e3da4;!_0x542f48[_0x447e0f(0x121)]&&(_0x542f48[_0x447e0f(0x121)]=_0x447e0f(0x12a));!_0x542f48[_0x447e0f(0x197)]&&(_0x542f48[_0x447e0f(0x197)]=_0x447e0f(0x11c));const _0x5b1388=this[_0x447e0f(0x11c)][_0x447e0f(0x160)](),_0x184599=this['dataSourceManager'][_0x447e0f(0x181)](_0x542f48['connection']),_0x5b761c=await _0x184599['query'](_0x447e0f(0x13c)+this[_0x447e0f(0x12c)][_0x447e0f(0x18d)][_0x542f48[_0x447e0f(0x121)]]['database']+_0x447e0f(0x16b)+((_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48['table'])?_0x447e0f(0x14f)+_0x542f48[_0x447e0f(0x18f)]+'\x22':_0x447e0f(0x179)+(_0x542f48[_0x447e0f(0x18c)]||'')+'%\x22'))||[];for(let _0x4eb702=0x0;_0x4eb702<_0x5b761c[_0x447e0f(0x178)];_0x4eb702++){const _0x32c4fe=_0x5b761c[_0x4eb702]['table'];if((_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48['table'])&&(_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x18f)])!=_0x32c4fe)continue;if((_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x18c)])&&!(_0x32c4fe===null||_0x32c4fe===void 0x0?void 0x0:_0x32c4fe[_0x447e0f(0x189)](_0x542f48[_0x447e0f(0x18c)])))continue;const _0x2d224b=await _0x184599[_0x447e0f(0x18a)](_0x447e0f(0x11f)+this[_0x447e0f(0x12c)]['dataSource'][_0x542f48[_0x447e0f(0x121)]]['database']+_0x447e0f(0x13b)+_0x32c4fe+'\x27')||[];if((_0x5299f6=_0x2d224b[0x0])===null||_0x5299f6===void 0x0?void 0x0:_0x5299f6['comment']){const _0x31bb3c={'tablename':_0x32c4fe,'Primary':{},'Fields':{},'Comment':(_0x5e3da4=_0x2d224b[0x0])===null||_0x5e3da4===void 0x0?void 0x0:_0x5e3da4[_0x447e0f(0x13a)],'vuedialog':_0x542f48[_0x447e0f(0x180)],'apporbasic':_0x542f48[_0x447e0f(0x197)]};_0x31bb3c['tablestart']=_0x32c4fe[_0x447e0f(0x192)]((_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48['substr'])||0x0,_0x32c4fe[_0x447e0f(0x178)]),_0x31bb3c['basedir']=(_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x191)])?_0x5b1388+_0x447e0f(0x16e)+_0x31bb3c[_0x447e0f(0x150)][_0x447e0f(0x12b)]('_')[0x0][_0x447e0f(0x198)]():_0x5b1388+'/'+_0x542f48[_0x447e0f(0x197)];const _0x135203=_0x31bb3c[_0x447e0f(0x150)][_0x447e0f(0x12b)]('_')['filter'](_0xd80c65=>_0xd80c65&&_0xd80c65[_0x447e0f(0x127)]());(_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48['module'])&&(await this['CreateModuleConfig'](_0x31bb3c),_0x31bb3c['moduleName']=_0x135203[0x0][_0x447e0f(0x198)]());_0x31bb3c[_0x447e0f(0x161)]=_0x135203['map'](_0x5597b6=>_0x5597b6[_0x447e0f(0x198)]())['join'](''),_0x31bb3c[_0x447e0f(0x171)]=_0x135203[_0x447e0f(0x14b)](_0xa09ed4=>''+_0xa09ed4['substring'](0x0,0x1)[_0x447e0f(0x186)]()+_0xa09ed4[_0x447e0f(0x152)](0x1)[_0x447e0f(0x198)]())[_0x447e0f(0x14e)]('');(_0x31bb3c===null||_0x31bb3c===void 0x0?void 0x0:_0x31bb3c[_0x447e0f(0x170)])&&_0x135203[_0x447e0f(0x178)]>0x1&&_0x135203[0x0]['toLowerCase']()==_0x31bb3c[_0x447e0f(0x170)]?(_0x31bb3c[_0x447e0f(0x16c)]=_0x31bb3c[_0x447e0f(0x171)]['substring'](_0x31bb3c[_0x447e0f(0x170)][_0x447e0f(0x178)],_0x31bb3c['tablestartUp'][_0x447e0f(0x178)]),_0x31bb3c['tablestartLowShort']=_0x31bb3c['tablestartLow'][_0x447e0f(0x152)](_0x31bb3c[_0x447e0f(0x170)][_0x447e0f(0x178)],_0x31bb3c[_0x447e0f(0x161)][_0x447e0f(0x178)])):(_0x31bb3c[_0x447e0f(0x16c)]=_0x31bb3c['tablestartUp'],_0x31bb3c[_0x447e0f(0x14d)]=_0x31bb3c[_0x447e0f(0x161)]);_0x31bb3c['tablestartUpShort2']=_0x31bb3c[_0x447e0f(0x16c)][_0x447e0f(0x143)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x447e0f(0x14e)]('-')['toLowerCase']()[_0x447e0f(0x143)](/\/\-/g,'/');for(let _0x486283 of await _0x184599[_0x447e0f(0x18a)]('SHOW\x20FULL\x20COLUMNS\x20FROM\x20`'+_0x32c4fe+'`')){_0x486283[_0x447e0f(0x183)]==_0x447e0f(0x149)?_0x31bb3c[_0x447e0f(0x15e)]=_0x486283:_0x31bb3c[_0x447e0f(0x132)][_0x486283[_0x447e0f(0x147)]]=_0x486283;}if((_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x12e)])&&!fs[_0x447e0f(0x18b)](_0x31bb3c[_0x447e0f(0x188)]+_0x447e0f(0x176)+_0x31bb3c['tablestartUpShort']+_0x447e0f(0x196))){var _0x580480=[];if(typeof(_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48['controller'])==_0x447e0f(0x11d))_0x580480=[_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48['controller']];else Array[_0x447e0f(0x177)](_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x12e)])?_0x580480=_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x12e)]:_0x580480=[!![]];_0x31bb3c['controllers']=_0x580480,await(0x0,Search_1[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Entities_1['default'])(_0x31bb3c),await(0x0,Common_1[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Event_1[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Handler_1[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Validator_1['default'])(_0x31bb3c);for(let _0x1815d5 of _0x580480){_0x31bb3c[_0x447e0f(0x12e)]=_0x1815d5,await(0x0,Action_1[_0x447e0f(0x12a)])(_0x31bb3c);}}if(_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x151)]){var _0x580480=[];if(typeof(_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x12e)])==_0x447e0f(0x11d))_0x580480=[_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x12e)]];else Array[_0x447e0f(0x177)](_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x12e)])?_0x580480=_0x542f48===null||_0x542f48===void 0x0?void 0x0:_0x542f48[_0x447e0f(0x12e)]:_0x580480=[!![]];if(_0x542f48[_0x447e0f(0x151)]=='v2')for(let _0x18e9fd of _0x580480){_0x31bb3c[_0x447e0f(0x12e)]=_0x18e9fd;let _0x1b1b61=process[_0x447e0f(0x163)]()+_0x447e0f(0x154)+(typeof _0x31bb3c[_0x447e0f(0x12e)]==_0x447e0f(0x11d)?'/'+_0x31bb3c[_0x447e0f(0x12e)]:'');_0x31bb3c['moduleName']?_0x1b1b61=_0x1b1b61+('/apis/apps/'+_0x31bb3c['moduleName']+_0x447e0f(0x17d)+_0x31bb3c[_0x447e0f(0x16c)]+_0x447e0f(0x139)):_0x1b1b61=_0x1b1b61+(_0x447e0f(0x17d)+_0x31bb3c['apporbasic']+_0x447e0f(0x17d)+_0x31bb3c[_0x447e0f(0x16c)]+'.js'),!fs['existsSync'](_0x1b1b61)&&(await(0x0,Api_2[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Router_2[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Layout_2['default'])(_0x31bb3c),await(0x0,LayoutVue_2[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Validator_3[_0x447e0f(0x12a)])(_0x31bb3c));}else{if(_0x542f48[_0x447e0f(0x151)]=='v3')for(let _0x2313be of _0x580480){_0x31bb3c[_0x447e0f(0x12e)]=_0x2313be;let _0x257a31=process['cwd']()+_0x447e0f(0x154)+(typeof _0x31bb3c[_0x447e0f(0x12e)]==_0x447e0f(0x11d)?'/'+_0x31bb3c['controller']:'');_0x31bb3c[_0x447e0f(0x170)]?_0x257a31=_0x257a31+('/apis/apps/'+_0x31bb3c['moduleName']+'/apis/'+_0x31bb3c[_0x447e0f(0x16c)]+_0x447e0f(0x139)):_0x257a31=_0x257a31+(_0x447e0f(0x17d)+_0x31bb3c[_0x447e0f(0x197)]+'/apis/'+_0x31bb3c['tablestartUpShort']+_0x447e0f(0x139)),!fs[_0x447e0f(0x18b)](_0x257a31)&&(await(0x0,Api_3['default'])(_0x31bb3c),await(0x0,Router_3[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Layout_3['default'])(_0x31bb3c),await(0x0,LayoutVue_3['default'])(_0x31bb3c),await(0x0,Validator_4['default'])(_0x31bb3c));}else for(let _0x5a11b7 of _0x580480){_0x31bb3c['controller']=_0x5a11b7;let _0x235ab0=process[_0x447e0f(0x163)]()+'/vue'+(typeof _0x31bb3c[_0x447e0f(0x12e)]=='string'?'/'+_0x31bb3c[_0x447e0f(0x12e)]:'');_0x31bb3c['moduleName']?_0x235ab0=_0x235ab0+('/pages/apps/'+_0x31bb3c[_0x447e0f(0x170)]+'/api/'+_0x31bb3c[_0x447e0f(0x135)]+_0x447e0f(0x139)):_0x235ab0=_0x235ab0+(_0x447e0f(0x138)+_0x31bb3c['apporbasic']+_0x447e0f(0x128)+_0x31bb3c[_0x447e0f(0x135)]+_0x447e0f(0x139)),!fs[_0x447e0f(0x18b)](_0x235ab0)&&(await(0x0,Api_1[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,Router_1['default'])(_0x31bb3c),await(0x0,Layout_1[_0x447e0f(0x12a)])(_0x31bb3c),await(0x0,LayoutVue_1['default'])(_0x31bb3c),await(0x0,Validator_2[_0x447e0f(0x12a)])(_0x31bb3c));}}}}else console['error']('表:'+_0x32c4fe+'\x20表注释不存在');}return _0x447e0f(0x172);}async[a3_0x31ae63(0x145)](_0x3193bb){const _0xf3a6f8=a3_0x31ae63;var _0xb195ed,_0x2964c2,_0x2357fd;if(!this[_0xf3a6f8(0x17f)][_0xf3a6f8(0x142)]()||!((_0xb195ed=this[_0xf3a6f8(0x12c)])===null||_0xb195ed===void 0x0?void 0x0:_0xb195ed['dataSource'])||!this['app']['getConfig'](_0xf3a6f8(0x194)))throw new Error('无法生成');!_0x3193bb[_0xf3a6f8(0x121)]&&(_0x3193bb[_0xf3a6f8(0x121)]=_0xf3a6f8(0x12a));if(!((_0x2357fd=(_0x2964c2=this['config'])===null||_0x2964c2===void 0x0?void 0x0:_0x2964c2['dataSource'])===null||_0x2357fd===void 0x0?void 0x0:_0x2357fd[_0x3193bb[_0xf3a6f8(0x121)]]))throw new Error(_0xf3a6f8(0x159)+_0x3193bb[_0xf3a6f8(0x121)]);if(!this['dataSourceManager'][_0xf3a6f8(0x15a)](_0x3193bb['connection']))throw new Error(_0xf3a6f8(0x12d)+_0x3193bb[_0xf3a6f8(0x121)]+_0xf3a6f8(0x122));if(!this[_0xf3a6f8(0x185)][_0xf3a6f8(0x16a)](_0x3193bb[_0xf3a6f8(0x121)]))throw new Error(_0xf3a6f8(0x12d)+_0x3193bb[_0xf3a6f8(0x121)]+_0xf3a6f8(0x136));return!![];}async[a3_0x31ae63(0x158)](_0x4800f3){const _0x4e4bfa=a3_0x31ae63,_0x61e83f=_0x4800f3[_0x4e4bfa(0x150)][_0x4e4bfa(0x12b)]('_')[0x0][_0x4e4bfa(0x198)]();if(!fs['existsSync'](_0x4800f3[_0x4e4bfa(0x188)]+_0x4e4bfa(0x190))){let _0x553736='export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27'+(_0x4800f3[_0x4e4bfa(0x169)]||_0x61e83f)+'\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middleware:\x20[],\x0a}';fs[_0x4e4bfa(0x133)](path[_0x4e4bfa(0x166)](_0x4800f3[_0x4e4bfa(0x188)]+_0x4e4bfa(0x190)),{'recursive':!![]}),fs[_0x4e4bfa(0x182)](_0x4800f3['basedir']+_0x4e4bfa(0x190),_0x553736,'utf-8');}}};exports[a3_0x31ae63(0x184)]=ApicreateService,__decorate([(0x0,core_2['App'])(),__metadata('design:type',Object)],ApicreateService[a3_0x31ae63(0x18e)],a3_0x31ae63(0x11c),void 0x0),__decorate([(0x0,core_2[a3_0x31ae63(0x13f)])(a3_0x31ae63(0x141)),__metadata('design:type',Object)],ApicreateService[a3_0x31ae63(0x18e)],'config',void 0x0),__decorate([(0x0,core_2[a3_0x31ae63(0x17b)])(),__metadata('design:type',core_1[a3_0x31ae63(0x15d)])],ApicreateService[a3_0x31ae63(0x18e)],a3_0x31ae63(0x17f),void 0x0),__decorate([(0x0,core_2[a3_0x31ae63(0x17b)])(),__metadata('design:type',typeorm_1['TypeORMDataSourceManager'])],ApicreateService[a3_0x31ae63(0x18e)],a3_0x31ae63(0x185),void 0x0),exports['ApicreateService']=ApicreateService=__decorate([(0x0,core_2['Provide'])(a3_0x31ae63(0x184)),(0x0,core_2['Scope'])(core_2['ScopeEnum']['Singleton'])],ApicreateService);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export default function ({ controller, tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
-
controller: any;
|
|
3
|
-
tablestartUp: any;
|
|
4
|
-
tablestartUpShort: any;
|
|
5
|
-
basedir: any;
|
|
6
|
-
Primary: any;
|
|
7
|
-
Comment: any;
|
|
8
|
-
moduleName: any;
|
|
9
|
-
apporbasic: any;
|
|
10
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ controller, tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
+
controller: any;
|
|
3
|
+
tablestartUp: any;
|
|
4
|
+
tablestartUpShort: any;
|
|
5
|
+
basedir: any;
|
|
6
|
+
Primary: any;
|
|
7
|
+
Comment: any;
|
|
8
|
+
moduleName: any;
|
|
9
|
+
apporbasic: any;
|
|
10
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a4_0x17cdc3=a4_0x3cc9;function a4_0x3cc9(_0x2fa426,_0x125dd3){const _0xb58a22=a4_0x2a13();return a4_0x3cc9=function(_0x123d01,_0x2cec4a){_0x123d01=_0x123d01-0x102;let _0x2a13b8=_0xb58a22[_0x123d01];return _0x2a13b8;},a4_0x3cc9(_0x2fa426,_0x125dd3);}(function(_0x1c78b5,_0x1027f0){const _0x3e46a3=a4_0x3cc9,_0x4a41ca=_0x1c78b5();while(!![]){try{const _0x12eea5=parseInt(_0x3e46a3(0x11c))/0x1+parseInt(_0x3e46a3(0x143))/0x2+-parseInt(_0x3e46a3(0x118))/0x3*(parseInt(_0x3e46a3(0x104))/0x4)+parseInt(_0x3e46a3(0x120))/0x5*(-parseInt(_0x3e46a3(0x146))/0x6)+parseInt(_0x3e46a3(0x116))/0x7*(parseInt(_0x3e46a3(0x109))/0x8)+-parseInt(_0x3e46a3(0x144))/0x9+parseInt(_0x3e46a3(0x13d))/0xa*(parseInt(_0x3e46a3(0x126))/0xb);if(_0x12eea5===_0x1027f0)break;else _0x4a41ca['push'](_0x4a41ca['shift']());}catch(_0x306de3){_0x4a41ca['push'](_0x4a41ca['shift']());}}}(a4_0x2a13,0xb3156));const a4_0x2cec4a=(function(){let _0x27a30e=!![];return function(_0x4ceaa8,_0x3371d5){const _0x3aee65=_0x27a30e?function(){if(_0x3371d5){const _0xcc6bab=_0x3371d5['apply'](_0x4ceaa8,arguments);return _0x3371d5=null,_0xcc6bab;}}:function(){};return _0x27a30e=![],_0x3aee65;};}()),a4_0x123d01=a4_0x2cec4a(this,function(){const _0x5533fc=a4_0x3cc9;return a4_0x123d01[_0x5533fc(0x121)]()[_0x5533fc(0x114)](_0x5533fc(0x13b))[_0x5533fc(0x121)]()['constructor'](a4_0x123d01)['search'](_0x5533fc(0x13b));});a4_0x123d01();'use strict';Object[a4_0x17cdc3(0x132)](exports,'__esModule',{'value':!![]}),exports['default']=default_1;const fs=require('fs'),path_1=require(a4_0x17cdc3(0x105)),helper_1=require('../helper');function a4_0x2a13(){const _0x37f860=['9940dXSefs','\x20\x20\x20\x20\x20\x20\x20\x20const\x20[pagelist,\x20pagetotal]\x20=\x20await\x20this.','Handler.detail(conditions);\x0a\x0a','utf-8','export\x20class\x20','Handler\x20}\x20from\x20\x27','724474zHYwye','8106021iEYhvQ','Type','318bFFUFU','\x20\x20\x20\x20async\x20detail(','/validators/','/Create\x27;\x0a',')\x20{\x0a','/handlers/','\x20\x20\x20\x20@Action.get(\x27列表\x27,\x20\x27list\x27)\x0a','DTOUpdate\x20}\x20from\x20\x27','4792276Qqkwyd','path','\x20\x20\x20\x20async\x20remove(conditions:\x20','\x20};\x0a\x0a','Handler.create(params);\x0a\x0a','2056cMbvwV','number','\x20\x20\x20\x20async\x20update(','\x20\x20\x20\x20@Action.get(\x27详情\x27,\x20\x27detail/:','\x20\x20\x20\x20@Action.post(\x27修改\x27,\x20\x27edit/:','/controller/','@/apps/','DTOSearch,\x20pageinfo:\x20PageDTO)\x20{\x0a\x0a','string','import\x20{\x20','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(pagelist,\x20{\x20pageinfo,\x20pagetotal\x20});\x0a','search','\x27;\x0a','38619JUpapF','DTOSearch\x20}\x20from\x20\x27','3TxfKwU','Handler.remove(conditions);\x0a\x0a','\x20\x20\x20\x20@Action.post(\x22删除\x22,\x20\x27remove\x27)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(removes);\x0a','420551mfXYaD','writeFileSync','import\x20{\x20Inject,\x20Action,\x20PageDTO\x20}\x20from\x20\x27anncic-api\x27;\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a','47035EmJFlJ','toString','.ts','DTOSearch\x20=\x20{\x20',',\x20params:\x20','\x20\x20\x20\x20\x20\x20\x20\x20const\x20conditions:\x20','12507CewYgr','DTOUpdate)\x20{\x0a','\x20\x20\x20\x20@Inject()\x20protected\x20','DTOSearch)\x20{\x0a\x0a','import\x20{\x20Context\x20}\x20from\x20\x27@midwayjs/koa\x27;\x0a','substring','\x20\x20\x20\x20async\x20create(params:\x20','@Action(__filename,\x20\x27','Field','dirname','mkdirSync','\x20\x20\x20\x20@Action.post(\x27添加\x27,\x20\x27add\x27)\x0a','defineProperty','text','\x27)\x0a','Handler.update(conditions,\x20params);\x0a\x0a','mediumtext','\x20\x20\x20\x20}\x0a\x0a\x0a','Handler:\x20','\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.','toUpperCase','(((.+)+)+)+$','Handler.list(conditions,\x20pageinfo);\x0a\x0a'];a4_0x2a13=function(){return _0x37f860;};return a4_0x2a13();}async function default_1({controller:_0xf5aba2,tablestartUp:_0x33689e,tablestartUpShort:_0x1d44bc,basedir:_0x578825,Primary:_0x3b3037,Comment:_0x1704ed,moduleName:_0x5487ca,apporbasic:_0x46397a}){const _0x22f4ba=a4_0x17cdc3;if(_0xf5aba2){const _0x18bc13=_0x578825+(typeof _0xf5aba2=='string'?_0x22f4ba(0x10e)+_0xf5aba2+'/'+_0x1d44bc+_0x22f4ba(0x122):_0x22f4ba(0x10e)+_0x1d44bc+'.ts');if(!fs['existsSync'](_0x18bc13)){let _0x16e7a6='',_0x20a203=[_0x22f4ba(0x133),_0x22f4ba(0x136),'string']['indexOf']((0x0,helper_1['getProp'])(_0x3b3037[_0x22f4ba(0x145)]))==-0x1;_0x16e7a6+=_0x22f4ba(0x12a),_0x16e7a6+=_0x22f4ba(0x11e),_0x16e7a6+=_0x22f4ba(0x112)+_0x33689e+_0x22f4ba(0x142)+(typeof _0x5487ca=='string'?'@/apps/'+_0x5487ca:'@/'+_0x46397a)+_0x22f4ba(0x14b)+_0x1d44bc+_0x22f4ba(0x115),_0x16e7a6+='import\x20{\x20'+_0x33689e+'DTOCreate\x20}\x20from\x20\x27'+(typeof _0x5487ca=='string'?_0x22f4ba(0x10f)+_0x5487ca:'@/'+_0x46397a)+'/validators/'+_0x1d44bc+_0x22f4ba(0x149),_0x16e7a6+=_0x22f4ba(0x112)+_0x33689e+_0x22f4ba(0x103)+(typeof _0x5487ca=='string'?'@/apps/'+_0x5487ca:'@/'+_0x46397a)+_0x22f4ba(0x148)+_0x1d44bc+'/Update\x27;\x0a',_0x16e7a6+=_0x22f4ba(0x112)+_0x33689e+_0x22f4ba(0x117)+(typeof _0x5487ca=='string'?_0x22f4ba(0x10f)+_0x5487ca:'@/'+_0x46397a)+_0x22f4ba(0x148)+_0x1d44bc+'/Search\x27;\x0a\x0a',_0x16e7a6+=_0x22f4ba(0x12d)+_0x1704ed+_0x22f4ba(0x134),_0x16e7a6+=_0x22f4ba(0x141)+(typeof _0xf5aba2==_0x22f4ba(0x111)?_0xf5aba2[_0x22f4ba(0x12b)](0x0,0x1)[_0x22f4ba(0x13a)]()+_0xf5aba2['substring'](0x1):'')+_0x33689e+'Controller\x20{\x0a\x0a',_0x16e7a6+='\x20\x20\x20\x20@Inject()\x20protected\x20ctx:\x20Context;\x0a\x0a',_0x16e7a6+=_0x22f4ba(0x128)+_0x33689e+_0x22f4ba(0x138)+_0x33689e+'Handler\x0a\x0a\x0a',_0x16e7a6+=_0x22f4ba(0x102),_0x16e7a6+='\x20\x20\x20\x20async\x20index(conditions:\x20'+_0x33689e+_0x22f4ba(0x110),_0x16e7a6+=_0x22f4ba(0x13e)+_0x33689e+_0x22f4ba(0x13c),_0x16e7a6+=_0x22f4ba(0x113),_0x16e7a6+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x16e7a6+=_0x22f4ba(0x10c)+_0x3b3037[_0x22f4ba(0x12e)]+_0x22f4ba(0x134),_0x16e7a6+=_0x22f4ba(0x147)+_0x3b3037[_0x22f4ba(0x12e)]+':\x20'+(_0x20a203?_0x22f4ba(0x10a):_0x22f4ba(0x111))+_0x22f4ba(0x14a),_0x16e7a6+=_0x22f4ba(0x125)+_0x33689e+_0x22f4ba(0x123)+_0x3b3037[_0x22f4ba(0x12e)]+_0x22f4ba(0x107),_0x16e7a6+=_0x22f4ba(0x139)+_0x33689e+_0x22f4ba(0x13f),_0x16e7a6+=_0x22f4ba(0x11f),_0x16e7a6+=_0x22f4ba(0x137),_0x16e7a6+=_0x22f4ba(0x131),_0x16e7a6+=_0x22f4ba(0x12c)+_0x33689e+'DTOCreate)\x20{\x0a\x0a',_0x16e7a6+=_0x22f4ba(0x139)+_0x33689e+_0x22f4ba(0x108),_0x16e7a6+='\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a',_0x16e7a6+=_0x22f4ba(0x137),_0x16e7a6+=_0x22f4ba(0x10d)+_0x3b3037['Field']+_0x22f4ba(0x134),_0x16e7a6+=_0x22f4ba(0x10b)+_0x3b3037[_0x22f4ba(0x12e)]+':\x20'+(_0x20a203?_0x22f4ba(0x10a):_0x22f4ba(0x111))+_0x22f4ba(0x124)+_0x33689e+_0x22f4ba(0x127),_0x16e7a6+=_0x22f4ba(0x125)+_0x33689e+_0x22f4ba(0x123)+_0x3b3037['Field']+_0x22f4ba(0x107),_0x16e7a6+=_0x22f4ba(0x139)+_0x33689e+_0x22f4ba(0x135),_0x16e7a6+=_0x22f4ba(0x11f),_0x16e7a6+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x16e7a6+=_0x22f4ba(0x11a),_0x16e7a6+=_0x22f4ba(0x106)+_0x33689e+_0x22f4ba(0x129),_0x16e7a6+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20removes\x20=\x20await\x20this.'+_0x33689e+_0x22f4ba(0x119),_0x16e7a6+=_0x22f4ba(0x11b),_0x16e7a6+=_0x22f4ba(0x137),_0x16e7a6+='}',!fs['existsSync']((0x0,path_1[_0x22f4ba(0x12f)])(_0x18bc13))&&fs[_0x22f4ba(0x130)]((0x0,path_1[_0x22f4ba(0x12f)])(_0x18bc13),{'recursive':!![]}),fs[_0x22f4ba(0x11d)](_0x18bc13,_0x16e7a6,_0x22f4ba(0x140));}}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default function ({ tablestartUp, tablestartUpShort, basedir, Comment, Fields }: {
|
|
2
|
-
tablestartUp: any;
|
|
3
|
-
tablestartUpShort: any;
|
|
4
|
-
basedir: any;
|
|
5
|
-
Comment: any;
|
|
6
|
-
Fields: any;
|
|
7
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablestartUp, tablestartUpShort, basedir, Comment, Fields }: {
|
|
2
|
+
tablestartUp: any;
|
|
3
|
+
tablestartUpShort: any;
|
|
4
|
+
basedir: any;
|
|
5
|
+
Comment: any;
|
|
6
|
+
Fields: any;
|
|
7
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x39309a=a5_0x57c9;(function(_0x5d7b88,_0x2a1820){const _0x4b5339=a5_0x57c9,_0x336d31=_0x5d7b88();while(!![]){try{const _0x502b4a=-parseInt(_0x4b5339(0x13b))/0x1*(parseInt(_0x4b5339(0x130))/0x2)+-parseInt(_0x4b5339(0x12d))/0x3+-parseInt(_0x4b5339(0x122))/0x4+-parseInt(_0x4b5339(0x13e))/0x5+-parseInt(_0x4b5339(0x137))/0x6*(parseInt(_0x4b5339(0x11b))/0x7)+-parseInt(_0x4b5339(0x135))/0x8*(parseInt(_0x4b5339(0x127))/0x9)+parseInt(_0x4b5339(0x11c))/0xa*(parseInt(_0x4b5339(0x144))/0xb);if(_0x502b4a===_0x2a1820)break;else _0x336d31['push'](_0x336d31['shift']());}catch(_0x42f25e){_0x336d31['push'](_0x336d31['shift']());}}}(a5_0x46ce,0x8fa12));const a5_0x4bc149=(function(){let _0x4dfdfd=!![];return function(_0xa5a79c,_0x473b12){const _0x1f2e87=_0x4dfdfd?function(){const _0x538a97=a5_0x57c9;if(_0x473b12){const _0x41fdef=_0x473b12[_0x538a97(0x11e)](_0xa5a79c,arguments);return _0x473b12=null,_0x41fdef;}}:function(){};return _0x4dfdfd=![],_0x1f2e87;};}()),a5_0x304039=a5_0x4bc149(this,function(){const _0x18c065=a5_0x57c9;return a5_0x304039['toString']()[_0x18c065(0x12a)](_0x18c065(0x141))[_0x18c065(0x121)]()[_0x18c065(0x120)](a5_0x304039)[_0x18c065(0x12a)](_0x18c065(0x141));});a5_0x304039();'use strict';function a5_0x57c9(_0x44ca47,_0x15906){const _0xa176fc=a5_0x46ce();return a5_0x57c9=function(_0x304039,_0x4bc149){_0x304039=_0x304039-0x11b;let _0x46ce91=_0xa176fc[_0x304039];return _0x46ce91;},a5_0x57c9(_0x44ca47,_0x15906);}Object[a5_0x39309a(0x12f)](exports,'__esModule',{'value':!![]}),exports[a5_0x39309a(0x132)]=default_1;const fs=require('fs'),path=require(a5_0x39309a(0x145)),helper_1=require(a5_0x39309a(0x143));async function default_1({tablestartUp:_0x4b0134,tablestartUpShort:_0x55aee8,basedir:_0x541202,Comment:_0x5b8f2c,Fields:_0x21a813}){await entity_emum({'tablestartUp':_0x4b0134,'tablestartUpShort':_0x55aee8,'basedir':_0x541202,'Comment':_0x5b8f2c,'Fields':_0x21a813}),await entity_exceptions({'tablestartUp':_0x4b0134,'tablestartUpShort':_0x55aee8,'basedir':_0x541202,'Comment':_0x5b8f2c});}function a5_0x46ce(){const _0x468488=['Comment','existsSync','587145sWpvkz','Type','\x27,\x20\x27关闭','(((.+)+)+)+$','utf-8','../helper','163669uajODA','path','14oRuKdM','2180DyMZxZ','.ts','apply','export\x20class\x20','constructor','toString','1639836OgCnKH','\x27,\x20\x27开启','/**\x0a','\x20\x20\x20\x20@AnnEnumMsg(\x27','mkdirSync','2718EevBNg','_ON:\x20number\x20=\x201;\x0a\x0a','dirname','search','toUpperCase','writeFileSync','394536VrwFzp','\x20*\x20','defineProperty','52kvBDvp','\x27)\x0a','default','/exceptions/','\x20\x20\x20\x20static\x20readonly\x20','26008eQYRSk','getProp','203160iHlmSX','\x20*\x20**/\x0a','Error\x20extends\x20AnnError\x20{\x0a\x0a','_OFF:\x20number\x20=\x200;\x0a\x0a\x0a','36419XTaIFE'];a5_0x46ce=function(){return _0x468488;};return a5_0x46ce();}async function entity_emum({tablestartUp:_0x16ce95,tablestartUpShort:_0x2ecdfc,basedir:_0x44a71b,Comment:_0x34f961,Fields:_0x4f302b}){const _0x247e23=a5_0x39309a,_0x244eba=_0x44a71b+('/enums/'+_0x2ecdfc+_0x247e23(0x11d));if(!fs[_0x247e23(0x13d)](_0x244eba)){let _0x1bfaf8='';_0x1bfaf8+=_0x247e23(0x124),_0x1bfaf8+=_0x247e23(0x12e)+_0x34f961+'-常量设置\x0a',_0x1bfaf8+=_0x247e23(0x138),_0x1bfaf8+=_0x247e23(0x11f)+_0x16ce95+'Enum\x20{\x0a\x0a';for(let _0x5adfef in _0x4f302b){let _0x185fb4=_0x4f302b[_0x5adfef],_0x13b49e=(0x0,helper_1[_0x247e23(0x136)])(_0x185fb4[_0x247e23(0x13f)]);['tinyint']['indexOf'](_0x13b49e)!=-0x1&&(_0x1bfaf8+=_0x247e23(0x125)+_0x5adfef+_0x247e23(0x123)+_0x185fb4[_0x247e23(0x13c)]+'\x27)\x0a',_0x1bfaf8+=_0x247e23(0x134)+_0x5adfef[_0x247e23(0x12b)]()+_0x247e23(0x128),_0x1bfaf8+=_0x247e23(0x125)+_0x5adfef+_0x247e23(0x140)+_0x185fb4[_0x247e23(0x13c)]+_0x247e23(0x131),_0x1bfaf8+='\x20\x20\x20\x20static\x20readonly\x20'+_0x5adfef['toUpperCase']()+_0x247e23(0x13a));}_0x1bfaf8+='}',!fs[_0x247e23(0x13d)](path['dirname'](_0x244eba))&&fs[_0x247e23(0x126)](path[_0x247e23(0x129)](_0x244eba),{'recursive':!![]}),fs[_0x247e23(0x12c)](_0x244eba,_0x1bfaf8,'utf-8');}}async function entity_exceptions({tablestartUp:_0x4ac1e5,tablestartUpShort:_0x186cbe,basedir:_0x3649c7,Comment:_0xdfafde}){const _0xad777f=a5_0x39309a,_0xb6b74d=_0x3649c7+(_0xad777f(0x133)+_0x186cbe+_0xad777f(0x11d));if(!fs[_0xad777f(0x13d)](_0xb6b74d)){let _0x3b75d7='';_0x3b75d7+=_0xad777f(0x124),_0x3b75d7+=_0xad777f(0x12e)+_0xdfafde+'-错误信息设置\x0a',_0x3b75d7+=_0xad777f(0x138),_0x3b75d7+=_0xad777f(0x11f)+_0x4ac1e5+_0xad777f(0x139),_0x3b75d7+='}',!fs[_0xad777f(0x13d)](path['dirname'](_0xb6b74d))&&fs[_0xad777f(0x126)](path[_0xad777f(0x129)](_0xb6b74d),{'recursive':!![]}),fs[_0xad777f(0x12c)](_0xb6b74d,_0x3b75d7,_0xad777f(0x142));}}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export default function ({ tablename, tablestartUp, tablestartUpShort, basedir, Primary, Fields, Comment, moduleName, apporbasic }: {
|
|
2
|
-
tablename: any;
|
|
3
|
-
tablestartUp: any;
|
|
4
|
-
tablestartUpShort: any;
|
|
5
|
-
basedir: any;
|
|
6
|
-
Primary: any;
|
|
7
|
-
Fields: any;
|
|
8
|
-
Comment: any;
|
|
9
|
-
moduleName: any;
|
|
10
|
-
apporbasic: any;
|
|
11
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablename, tablestartUp, tablestartUpShort, basedir, Primary, Fields, Comment, moduleName, apporbasic }: {
|
|
2
|
+
tablename: any;
|
|
3
|
+
tablestartUp: any;
|
|
4
|
+
tablestartUpShort: any;
|
|
5
|
+
basedir: any;
|
|
6
|
+
Primary: any;
|
|
7
|
+
Fields: any;
|
|
8
|
+
Comment: any;
|
|
9
|
+
moduleName: any;
|
|
10
|
+
apporbasic: any;
|
|
11
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x1b55a5=a6_0x31b0;(function(_0x4630d1,_0xc14ca1){const _0x15dca4=a6_0x31b0,_0x1e9a14=_0x4630d1();while(!![]){try{const _0x470e37=-parseInt(_0x15dca4(0x185))/0x1+parseInt(_0x15dca4(0x1a2))/0x2+parseInt(_0x15dca4(0x1b4))/0x3+-parseInt(_0x15dca4(0x1bd))/0x4+-parseInt(_0x15dca4(0x1b2))/0x5+-parseInt(_0x15dca4(0x186))/0x6*(parseInt(_0x15dca4(0x164))/0x7)+parseInt(_0x15dca4(0x198))/0x8;if(_0x470e37===_0xc14ca1)break;else _0x1e9a14['push'](_0x1e9a14['shift']());}catch(_0x4a2b52){_0x1e9a14['push'](_0x1e9a14['shift']());}}}(a6_0x239d,0xde25b));const a6_0x32c294=(function(){let _0x19c3ec=!![];return function(_0x212254,_0x18b5ec){const _0x308eba=_0x19c3ec?function(){const _0x50f365=a6_0x31b0;if(_0x18b5ec){const _0x2f524b=_0x18b5ec[_0x50f365(0x1ab)](_0x212254,arguments);return _0x18b5ec=null,_0x2f524b;}}:function(){};return _0x19c3ec=![],_0x308eba;};}()),a6_0x580b32=a6_0x32c294(this,function(){const _0x53bb57=a6_0x31b0;return a6_0x580b32[_0x53bb57(0x1bb)]()[_0x53bb57(0x196)](_0x53bb57(0x17c))[_0x53bb57(0x1bb)]()[_0x53bb57(0x1bf)](a6_0x580b32)[_0x53bb57(0x196)](_0x53bb57(0x17c));});a6_0x580b32();function a6_0x31b0(_0x563b80,_0x458c2a){const _0x3e2ddb=a6_0x239d();return a6_0x31b0=function(_0x580b32,_0x32c294){_0x580b32=_0x580b32-0x163;let _0x239d7c=_0x3e2ddb[_0x580b32];return _0x239d7c;},a6_0x31b0(_0x563b80,_0x458c2a);}'use strict';Object['defineProperty'](exports,a6_0x1b55a5(0x1ba),{'value':!![]});const fs=require('fs'),path_1=require('path'),helper_1=require(a6_0x1b55a5(0x177));async function default_1({tablename:_0x343bf3,tablestartUp:_0x734f1e,tablestartUpShort:_0x21be0f,basedir:_0x524f7a,Primary:_0x2e07a9,Fields:_0x51ecaa,Comment:_0x36a01e,moduleName:_0x5aa9f9,apporbasic:_0x57a576}){await entity({'tablename':_0x343bf3,'tablestartUp':_0x734f1e,'tablestartUpShort':_0x21be0f,'basedir':_0x524f7a,'Primary':_0x2e07a9,'Fields':_0x51ecaa,'Comment':_0x36a01e,'moduleName':_0x5aa9f9,'apporbasic':_0x57a576}),await repository({'tablestartUp':_0x734f1e,'tablestartUpShort':_0x21be0f,'basedir':_0x524f7a,'Comment':_0x36a01e,'moduleName':_0x5aa9f9,'apporbasic':_0x57a576});}function a6_0x239d(){const _0x4abb62=['decimal','\x20\x20\x20\x20@Column(\x27longtext\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27decimal\x27,\x20{\x20comment:\x20\x27','longtext',':\x20number;\x0a\x0a','Null','text','datetime','indexOf','default','float','../helper','/entity.ts','/**\x0a','@ProvideEntity({\x20tableName:\x20\x27','\x20\x20\x20\x20@DeleteDateColumn({\x20comment:\x20\x27删除时间\x27,\x20type:\x20\x27timestamp\x27,\x20select:\x20false\x20})\x0a','(((.+)+)+)+$','utf-8','\x27\x20},\x20{\x20orderBy:\x20{\x20displayorder:\x20\x27DESC\x27\x20}\x20})\x0a','enum',':\x20\x27','\x20\x20\x20\x20@UpdateDateColumn({\x20comment:\x20\x27修改时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','\x20\x20\x20\x20@Column({\x20comment:\x20\x27默认显示排序\x27,\x20nullable:\x20true,\x20unique:\x20false\x20})\x0a','//\x20import\x20{\x20ManyToOne,\x20JoinColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','\x20\x20\x20\x20@Column(\x27enum\x27,\x20{\x20comment:\x20\x27','206015qQltfg','8524902HienJw','Type','Comment','Field','deleted_at','\x20\x20\x20\x20','\x27,\x20enum:\x20[\x27',':\x20any\x20|\x20any[];\x0a\x0a','import\x20{\x20ProvideEntity,\x20ProvideSearch,\x20','\x27]\x20})\x0a','/entities/','\x27;\x0a\x0a','YES',',\x20unique:\x20false\x20})\x0a','%column%','timestamp','search','\x20\x20\x20\x20@CreateDateColumn({\x20comment:\x20\x27创建时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','19619768RmLgjG','\x20*\x20','false',':\x20string;\x0a\x0a','Search\x20}\x20from\x20\x27','/index.ts','\x27,\x20default:\x20\x27','\x27,\x20precision:\x2024,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','existsSync','replace','1985954TJCqCV','-实体\x0a','\x20\x20\x20\x20updated_at:\x20Date;\x0a\x0a','true','@ProvideRepository(','\x20\x20\x20\x20deleted_at:\x20Date;\x0a\x0a','number','created_at','\x20\x20\x20\x20@Column({\x20comment:\x20\x27','apply','mediumtext','@ProvideSearch(','dirname','Entity)\x0a','date','join','2304500CnnbWK','\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','2311254ksbgFN','json',',\x20Column\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a','import\x20{\x20','getProp','\x20})\x0a','__esModule','toString','Entity\x20{\x0a\x0a','4872876OCQBot','\x27,\x20length:\x20188\x20})\x0a','constructor','\x20\x20\x20\x20@PrimaryColumn({\x20comment:\x20\x27','-实体处理器\x0a','displayorder','tinyint','\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27float\x27,\x20{\x20comment:\x20\x27','export\x20class\x20','writeFileSync','\x20\x20\x20\x20displayorder:\x20number;\x0a\x0a','\x20\x20\x20\x20@Column(\x27double\x27,\x20{\x20comment:\x20\x27','Entity>{\x0a\x0a','PrimaryColumn','mkdirSync','7VlkHiV','Search)\x0a','\x20*\x20**/\x0a','/entity\x27;\x0a\x0a','\x27,\x20nullable:\x20','string','\x20\x20\x20\x20@Column(\x27tinyint\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27date\x27,\x20{\x20comment:\x20\x27'];a6_0x239d=function(){return _0x4abb62;};return a6_0x239d();}exports[a6_0x1b55a5(0x175)]=default_1;async function entity({tablename:_0x1489e5,tablestartUp:_0x18fb5e,tablestartUpShort:_0x2a2d1f,basedir:_0x3b4495,Primary:_0x37950a,Fields:_0x59ccef,Comment:_0x5906c1,moduleName:_0x39e6c8,apporbasic:_0x3f5699}){const _0x41d84a=a6_0x1b55a5,_0x5a5429=_0x3b4495+(_0x41d84a(0x190)+_0x2a2d1f+_0x41d84a(0x178));if(!fs[_0x41d84a(0x1a0)](_0x5a5429)){let _0x3a8043='',_0x349e6c='',_0x1cb6a5=[_0x41d84a(0x172),_0x41d84a(0x1ac),'string'][_0x41d84a(0x174)]((0x0,helper_1['getProp'])(_0x37950a[_0x41d84a(0x187)]))==-0x1;_0x1cb6a5?(_0x3a8043+='\x20\x20\x20\x20@PrimaryGeneratedColumn()\x0a',_0x3a8043+=_0x41d84a(0x18b)+_0x37950a[_0x41d84a(0x189)]+_0x41d84a(0x170)):(_0x3a8043+=_0x41d84a(0x1c0)+(_0x37950a[_0x41d84a(0x188)]||'标识')+_0x41d84a(0x1be),_0x3a8043+=_0x41d84a(0x18b)+_0x37950a['Field']+_0x41d84a(0x19b));for(let _0x295837 in _0x59ccef){let _0x410cb6=_0x59ccef[_0x295837],_0x3bcb6e=(0x0,helper_1[_0x41d84a(0x1b8)])(_0x410cb6[_0x41d84a(0x187)]);if(_0x410cb6[_0x41d84a(0x189)]==_0x41d84a(0x1c2)||_0x410cb6['Field']==_0x41d84a(0x1a9)||_0x410cb6[_0x41d84a(0x189)]=='updated_at'||_0x410cb6['Field']==_0x41d84a(0x18a))continue;if(_0x3bcb6e==_0x41d84a(0x1b5))_0x3a8043+='\x20\x20\x20\x20@Column(\x27json\x27,\x20{\x20comment:\x20\x27'+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x168)+(_0x410cb6['Null']==_0x41d84a(0x192)?'true':_0x41d84a(0x19a))+_0x41d84a(0x193),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x18d);else{if(_0x3bcb6e==_0x41d84a(0x17f)){let _0x245057=(0x0,helper_1['getEnum'])(_0x410cb6[_0x41d84a(0x187)]);_0x3a8043+=_0x41d84a(0x184)+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x19e)+(_0x245057[0x0]||'')+_0x41d84a(0x18c)+_0x245057['join']('\x27,\x20\x27')+_0x41d84a(0x18f),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x180)+_0x245057[_0x41d84a(0x1b1)]('\x27\x20|\x20\x27')+_0x41d84a(0x191);}else{if(_0x3bcb6e==_0x41d84a(0x176))_0x3a8043+=_0x41d84a(0x1c5)+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x1b3)+(_0x410cb6[_0x41d84a(0x171)]==_0x41d84a(0x192)?_0x41d84a(0x1a5):_0x41d84a(0x19a))+_0x41d84a(0x1b9),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x170);else{if(_0x3bcb6e=='double')_0x3a8043+=_0x41d84a(0x1c9)+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x1b3)+(_0x410cb6['Null']==_0x41d84a(0x192)?_0x41d84a(0x1a5):_0x41d84a(0x19a))+_0x41d84a(0x1b9),_0x3a8043+='\x20\x20\x20\x20'+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x170);else{if(_0x3bcb6e==_0x41d84a(0x16c))_0x3a8043+=_0x41d84a(0x16e)+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x19f)+(_0x410cb6[_0x41d84a(0x171)]=='YES'?'true':_0x41d84a(0x19a))+'\x20})\x0a',_0x3a8043+='\x20\x20\x20\x20'+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x170);else{if(_0x3bcb6e==_0x41d84a(0x1a8))_0x3a8043+=_0x41d84a(0x1aa)+_0x410cb6[_0x41d84a(0x188)]+'\x27,\x20nullable:\x20'+(_0x410cb6[_0x41d84a(0x171)]=='YES'?_0x41d84a(0x1a5):_0x41d84a(0x19a))+_0x41d84a(0x193),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x170);else{if(_0x3bcb6e==_0x41d84a(0x1c3))_0x3a8043+=_0x41d84a(0x16a)+_0x410cb6[_0x41d84a(0x188)]+'\x27,\x20nullable:\x20'+(_0x410cb6['Null']==_0x41d84a(0x192)?'true':_0x41d84a(0x19a))+_0x41d84a(0x193),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6['Field']+':\x20number;\x0a\x0a';else{if(_0x3bcb6e==_0x41d84a(0x1b0))_0x3a8043+=_0x41d84a(0x16b)+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x168)+(_0x410cb6['Null']=='YES'?_0x41d84a(0x1a5):'false')+_0x41d84a(0x1b9),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x19b);else{if(_0x3bcb6e==_0x41d84a(0x173))_0x3a8043+=_0x41d84a(0x1c4)+_0x410cb6[_0x41d84a(0x188)]+'\x27,\x20nullable:\x20'+(_0x410cb6[_0x41d84a(0x171)]=='YES'?_0x41d84a(0x1a5):_0x41d84a(0x19a))+'\x20})\x0a',_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6['Field']+':\x20string;\x0a\x0a';else{if(_0x3bcb6e==_0x41d84a(0x195))_0x3a8043+=_0x41d84a(0x1c4)+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x168)+(_0x410cb6[_0x41d84a(0x171)]==_0x41d84a(0x192)?_0x41d84a(0x1a5):_0x41d84a(0x19a))+_0x41d84a(0x1b9),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x19b);else{if(_0x3bcb6e==_0x41d84a(0x172))_0x3a8043+='\x20\x20\x20\x20@Column(\x27text\x27,\x20{\x20comment:\x20\x27'+_0x410cb6[_0x41d84a(0x188)]+_0x41d84a(0x168)+(_0x410cb6[_0x41d84a(0x171)]==_0x41d84a(0x192)?_0x41d84a(0x1a5):_0x41d84a(0x19a))+_0x41d84a(0x193),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x19b);else{if(_0x3bcb6e==_0x41d84a(0x16f))_0x3a8043+=_0x41d84a(0x16d)+_0x410cb6['Comment']+_0x41d84a(0x168)+(_0x410cb6['Null']=='YES'?_0x41d84a(0x1a5):_0x41d84a(0x19a))+',\x20unique:\x20false\x20})\x0a',_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x19b);else _0x3bcb6e=='mediumtext'?(_0x3a8043+='\x20\x20\x20\x20@Column(\x27mediumtext\x27,\x20{\x20comment:\x20\x27'+_0x410cb6['Comment']+_0x41d84a(0x168)+(_0x410cb6[_0x41d84a(0x171)]==_0x41d84a(0x192)?'true':_0x41d84a(0x19a))+_0x41d84a(0x193),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6['Field']+_0x41d84a(0x19b)):(_0x3a8043+=_0x41d84a(0x1aa)+_0x410cb6[_0x41d84a(0x188)]+'\x27,\x20nullable:\x20'+(_0x410cb6['Null']==_0x41d84a(0x192)?_0x41d84a(0x1a5):_0x41d84a(0x19a))+_0x41d84a(0x193),_0x3a8043+=_0x41d84a(0x18b)+_0x410cb6[_0x41d84a(0x189)]+_0x41d84a(0x19b));}}}}}}}}}}}}_0x349e6c+=_0x41d84a(0x183),_0x349e6c+='import\x20{\x20CreateDateColumn,\x20UpdateDateColumn,\x20DeleteDateColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a',_0x349e6c+=_0x41d84a(0x18e)+(_0x1cb6a5?'PrimaryGeneratedColumn':_0x41d84a(0x1cb))+_0x41d84a(0x1b6),_0x349e6c+=_0x41d84a(0x1b7)+_0x18fb5e+_0x41d84a(0x19c)+(typeof _0x39e6c8==_0x41d84a(0x169)?'@/apps/'+_0x39e6c8:'@/'+_0x3f5699)+'/searchs/'+_0x2a2d1f+_0x41d84a(0x191),_0x349e6c+=_0x41d84a(0x179),_0x349e6c+=_0x41d84a(0x199)+_0x5906c1+_0x41d84a(0x1a3),_0x349e6c+=_0x41d84a(0x166),_0x349e6c+=_0x41d84a(0x1ad)+_0x18fb5e+_0x41d84a(0x165),_0x349e6c+=_0x41d84a(0x17a)+_0x1489e5+_0x41d84a(0x17e),_0x349e6c+=_0x41d84a(0x1c6)+_0x18fb5e+_0x41d84a(0x1bc),_0x349e6c+='%column%',_0x349e6c+=_0x41d84a(0x182),_0x349e6c+=_0x41d84a(0x1c8),_0x349e6c+=_0x41d84a(0x197),_0x349e6c+='\x20\x20\x20\x20created_at:\x20Date;\x0a\x0a',_0x349e6c+=_0x41d84a(0x181),_0x349e6c+=_0x41d84a(0x1a4),_0x349e6c+=_0x41d84a(0x17b),_0x349e6c+=_0x41d84a(0x1a7),_0x349e6c+='}',_0x349e6c=_0x349e6c[_0x41d84a(0x1a1)](_0x41d84a(0x194),_0x3a8043),!fs[_0x41d84a(0x1a0)]((0x0,path_1['dirname'])(_0x5a5429))&&fs[_0x41d84a(0x163)]((0x0,path_1[_0x41d84a(0x1ae)])(_0x5a5429),{'recursive':!![]}),fs['writeFileSync'](_0x5a5429,_0x349e6c,'utf-8');}}async function repository({tablestartUp:_0x347ef5,tablestartUpShort:_0x3ee751,basedir:_0x3445d0,Comment:_0x2234bd,moduleName:_0x20986f,apporbasic:_0x4dd985}){const _0x3e5195=a6_0x1b55a5,_0x5e761e=_0x3445d0+(_0x3e5195(0x190)+_0x3ee751+_0x3e5195(0x19d));if(!fs[_0x3e5195(0x1a0)](_0x5e761e)){let _0xa58a58='';_0xa58a58+=_0x3e5195(0x179),_0xa58a58+=_0x3e5195(0x199)+_0x2234bd+_0x3e5195(0x1c1),_0xa58a58+=_0x3e5195(0x166),_0xa58a58+='import\x20{\x20ProvideRepository,\x20Repository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a',_0xa58a58+=_0x3e5195(0x1b7)+_0x347ef5+'Entity\x20}\x20from\x20\x27'+(typeof _0x20986f==_0x3e5195(0x169)?'@/apps/'+_0x20986f:'@/'+_0x4dd985)+'/entities/'+_0x3ee751+_0x3e5195(0x167),_0xa58a58+=_0x3e5195(0x1a6)+_0x347ef5+_0x3e5195(0x1af),_0xa58a58+=_0x3e5195(0x1c6)+_0x347ef5+'\x20extends\x20Repository<'+_0x347ef5+_0x3e5195(0x1ca),_0xa58a58+='}',!fs[_0x3e5195(0x1a0)]((0x0,path_1[_0x3e5195(0x1ae)])(_0x5e761e))&&fs[_0x3e5195(0x163)]((0x0,path_1[_0x3e5195(0x1ae)])(_0x5e761e),{'recursive':!![]}),fs[_0x3e5195(0x1c7)](_0x5e761e,_0xa58a58,_0x3e5195(0x17d));}}
|
|
1
|
+
function a6_0x25a5(_0x4e342c,_0x48f9f2){const _0x31e823=a6_0x5802();return a6_0x25a5=function(_0x207759,_0x6ad766){_0x207759=_0x207759-0x91;let _0x58027b=_0x31e823[_0x207759];return _0x58027b;},a6_0x25a5(_0x4e342c,_0x48f9f2);}const a6_0x1f6ffa=a6_0x25a5;(function(_0x206e39,_0x2dd6b5){const _0x2e3d80=a6_0x25a5,_0x267dba=_0x206e39();while(!![]){try{const _0x16ceca=parseInt(_0x2e3d80(0xb4))/0x1*(-parseInt(_0x2e3d80(0xe8))/0x2)+parseInt(_0x2e3d80(0x9d))/0x3*(-parseInt(_0x2e3d80(0xc1))/0x4)+parseInt(_0x2e3d80(0xa0))/0x5+-parseInt(_0x2e3d80(0xb1))/0x6+parseInt(_0x2e3d80(0xa7))/0x7*(parseInt(_0x2e3d80(0xee))/0x8)+parseInt(_0x2e3d80(0xda))/0x9+-parseInt(_0x2e3d80(0x98))/0xa*(-parseInt(_0x2e3d80(0xb9))/0xb);if(_0x16ceca===_0x2dd6b5)break;else _0x267dba['push'](_0x267dba['shift']());}catch(_0x38cc9f){_0x267dba['push'](_0x267dba['shift']());}}}(a6_0x5802,0x4b3c8));const a6_0x6ad766=(function(){let _0x9fbae3=!![];return function(_0x4e42dd,_0x2071e5){const _0x572e4d=_0x9fbae3?function(){const _0x220687=a6_0x25a5;if(_0x2071e5){const _0x695926=_0x2071e5[_0x220687(0x96)](_0x4e42dd,arguments);return _0x2071e5=null,_0x695926;}}:function(){};return _0x9fbae3=![],_0x572e4d;};}()),a6_0x207759=a6_0x6ad766(this,function(){const _0x467e7e=a6_0x25a5;return a6_0x207759[_0x467e7e(0xd2)]()[_0x467e7e(0x91)]('(((.+)+)+)+$')[_0x467e7e(0xd2)]()[_0x467e7e(0x97)](a6_0x207759)[_0x467e7e(0x91)](_0x467e7e(0xe2));});a6_0x207759();function a6_0x5802(){const _0xdadaa9=['displayorder','existsSync','Comment','\x20\x20\x20\x20@Column(\x27mediumtext\x27,\x20{\x20comment:\x20\x27','(((.+)+)+)+$',',\x20unique:\x20false\x20})\x0a','default','replace','Type','Null','859700NKdNjH','\x20\x20\x20\x20@Column(\x27text\x27,\x20{\x20comment:\x20\x27','/searchs/','\x27,\x20nullable:\x20','\x20\x20\x20\x20@Column(\x27tinyint\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27float\x27,\x20{\x20comment:\x20\x27','256OhHAzI','updated_at','\x27,\x20length:\x20188\x20})\x0a','\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','timestamp','\x20\x20\x20\x20@UpdateDateColumn({\x20comment:\x20\x27修改时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','tinyint','__esModule','/entity\x27;\x0a\x0a','/entity.ts','search','\x20*\x20**/\x0a','false','\x20\x20\x20\x20@PrimaryColumn({\x20comment:\x20\x27','deleted_at','apply','constructor','10vtFcqs','@ProvideEntity({\x20tableName:\x20\x27','indexOf','text',':\x20any\x20|\x20any[];\x0a\x0a','643995cfsNlN','mediumtext','\x20\x20\x20\x20@Column(\x27decimal\x27,\x20{\x20comment:\x20\x27','1111425xryXRC','export\x20class\x20','-实体处理器\x0a','/index.ts','\x20\x20\x20\x20displayorder:\x20number;\x0a\x0a','writeFileSync','\x20\x20\x20\x20updated_at:\x20Date;\x0a\x0a','19544IAxNOO','enum','path','\x27\x20|\x20\x27','import\x20{\x20','\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@PrimaryGeneratedColumn()\x0a','\x20*\x20','@ProvideSearch(','utf-8','2637924rlhccg','\x27;\x0a\x0a','Entity\x20}\x20from\x20\x27','1lhqvAc','getEnum','%column%',',\x20Column\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a','\x27,\x20\x27','10110221WaRojc','@/apps/','import\x20{\x20ProvideEntity,\x20ProvideSearch,\x20','Field','double',':\x20string;\x0a\x0a','import\x20{\x20CreateDateColumn,\x20UpdateDateColumn,\x20DeleteDateColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','\x20\x20\x20\x20@Column(\x27enum\x27,\x20{\x20comment:\x20\x27','8uWtNbI','\x20\x20\x20\x20@Column({\x20comment:\x20\x27','\x20extends\x20Repository<','\x20\x20\x20\x20deleted_at:\x20Date;\x0a\x0a','json','\x20\x20\x20\x20@Column(\x27double\x27,\x20{\x20comment:\x20\x27','\x27,\x20precision:\x2024,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','PrimaryColumn','@ProvideRepository(','join','\x20\x20\x20\x20@CreateDateColumn({\x20comment:\x20\x27创建时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','Search\x20}\x20from\x20\x27','datetime','/**\x0a','true','string','\x20\x20\x20\x20created_at:\x20Date;\x0a\x0a','toString','YES','getProp',':\x20number;\x0a\x0a','\x20\x20\x20\x20@Column(\x27json\x27,\x20{\x20comment:\x20\x27','dirname','\x20\x20\x20\x20','/entities/','3386358rusbvh','import\x20{\x20ProvideRepository,\x20Repository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','../helper','\x20})\x0a'];a6_0x5802=function(){return _0xdadaa9;};return a6_0x5802();}'use strict';Object['defineProperty'](exports,a6_0x1f6ffa(0xf5),{'value':!![]}),exports[a6_0x1f6ffa(0xe4)]=default_1;const fs=require('fs'),path_1=require(a6_0x1f6ffa(0xa9)),helper_1=require(a6_0x1f6ffa(0xdc));async function default_1({tablename:_0x351bd4,tablestartUp:_0x4ac9a0,tablestartUpShort:_0x4ec980,basedir:_0x53e8f4,Primary:_0x1d3ff0,Fields:_0x4955b8,Comment:_0x81f31e,moduleName:_0x3c8e59,apporbasic:_0x57bc7c}){await entity({'tablename':_0x351bd4,'tablestartUp':_0x4ac9a0,'tablestartUpShort':_0x4ec980,'basedir':_0x53e8f4,'Primary':_0x1d3ff0,'Fields':_0x4955b8,'Comment':_0x81f31e,'moduleName':_0x3c8e59,'apporbasic':_0x57bc7c}),await repository({'tablestartUp':_0x4ac9a0,'tablestartUpShort':_0x4ec980,'basedir':_0x53e8f4,'Comment':_0x81f31e,'moduleName':_0x3c8e59,'apporbasic':_0x57bc7c});}async function entity({tablename:_0x3b5200,tablestartUp:_0x54cc25,tablestartUpShort:_0x56ab2e,basedir:_0xbaea02,Primary:_0x524bf6,Fields:_0x39a314,Comment:_0x141bb7,moduleName:_0x7defd0,apporbasic:_0x478ba5}){const _0x4c3d78=a6_0x1f6ffa,_0x154e8b=_0xbaea02+(_0x4c3d78(0xd9)+_0x56ab2e+_0x4c3d78(0xf7));if(!fs[_0x4c3d78(0xdf)](_0x154e8b)){let _0x15184e='',_0x4a5fe6='',_0x135740=[_0x4c3d78(0x9b),_0x4c3d78(0x9e),_0x4c3d78(0xd0)][_0x4c3d78(0x9a)]((0x0,helper_1[_0x4c3d78(0xd4)])(_0x524bf6[_0x4c3d78(0xe6)]))==-0x1;_0x135740?(_0x15184e+=_0x4c3d78(0xad),_0x15184e+=_0x4c3d78(0xd8)+_0x524bf6[_0x4c3d78(0xbc)]+_0x4c3d78(0xd5)):(_0x15184e+=_0x4c3d78(0x94)+(_0x524bf6[_0x4c3d78(0xe0)]||'标识')+_0x4c3d78(0xf0),_0x15184e+=_0x4c3d78(0xd8)+_0x524bf6['Field']+_0x4c3d78(0xbe));for(let _0x3f622f in _0x39a314){let _0x32b23b=_0x39a314[_0x3f622f],_0x5c9056=(0x0,helper_1[_0x4c3d78(0xd4)])(_0x32b23b[_0x4c3d78(0xe6)]);if(_0x32b23b[_0x4c3d78(0xbc)]==_0x4c3d78(0xde)||_0x32b23b['Field']=='created_at'||_0x32b23b[_0x4c3d78(0xbc)]==_0x4c3d78(0xef)||_0x32b23b[_0x4c3d78(0xbc)]==_0x4c3d78(0x95))continue;if(_0x5c9056==_0x4c3d78(0xc5))_0x15184e+=_0x4c3d78(0xd6)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b[_0x4c3d78(0xe7)]==_0x4c3d78(0xd3)?_0x4c3d78(0xcf):_0x4c3d78(0x93))+_0x4c3d78(0xe3),_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+_0x4c3d78(0x9c);else{if(_0x5c9056==_0x4c3d78(0xa8)){let _0x195621=(0x0,helper_1[_0x4c3d78(0xb5)])(_0x32b23b['Type']);_0x15184e+=_0x4c3d78(0xc0)+_0x32b23b['Comment']+'\x27,\x20default:\x20\x27'+(_0x195621[0x0]||'')+'\x27,\x20enum:\x20[\x27'+_0x195621[_0x4c3d78(0xca)](_0x4c3d78(0xb8))+'\x27]\x20})\x0a',_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+':\x20\x27'+_0x195621[_0x4c3d78(0xca)](_0x4c3d78(0xaa))+_0x4c3d78(0xb2);}else{if(_0x5c9056=='float')_0x15184e+=_0x4c3d78(0xed)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xf1)+(_0x32b23b['Null']==_0x4c3d78(0xd3)?_0x4c3d78(0xcf):_0x4c3d78(0x93))+_0x4c3d78(0xdd),_0x15184e+='\x20\x20\x20\x20'+_0x32b23b['Field']+_0x4c3d78(0xd5);else{if(_0x5c9056==_0x4c3d78(0xbd))_0x15184e+=_0x4c3d78(0xc6)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xf1)+(_0x32b23b[_0x4c3d78(0xe7)]=='YES'?'true':_0x4c3d78(0x93))+'\x20})\x0a',_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b['Field']+':\x20number;\x0a\x0a';else{if(_0x5c9056=='decimal')_0x15184e+=_0x4c3d78(0x9f)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xc7)+(_0x32b23b[_0x4c3d78(0xe7)]==_0x4c3d78(0xd3)?'true':_0x4c3d78(0x93))+_0x4c3d78(0xdd),_0x15184e+='\x20\x20\x20\x20'+_0x32b23b[_0x4c3d78(0xbc)]+_0x4c3d78(0xd5);else{if(_0x5c9056=='number')_0x15184e+=_0x4c3d78(0xc2)+_0x32b23b[_0x4c3d78(0xe0)]+'\x27,\x20nullable:\x20'+(_0x32b23b[_0x4c3d78(0xe7)]=='YES'?_0x4c3d78(0xcf):_0x4c3d78(0x93))+_0x4c3d78(0xe3),_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+':\x20number;\x0a\x0a';else{if(_0x5c9056==_0x4c3d78(0xf4))_0x15184e+=_0x4c3d78(0xec)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b[_0x4c3d78(0xe7)]==_0x4c3d78(0xd3)?_0x4c3d78(0xcf):_0x4c3d78(0x93))+',\x20unique:\x20false\x20})\x0a',_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+_0x4c3d78(0xd5);else{if(_0x5c9056=='date')_0x15184e+='\x20\x20\x20\x20@Column(\x27date\x27,\x20{\x20comment:\x20\x27'+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b[_0x4c3d78(0xe7)]==_0x4c3d78(0xd3)?_0x4c3d78(0xcf):_0x4c3d78(0x93))+'\x20})\x0a',_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b['Field']+_0x4c3d78(0xbe);else{if(_0x5c9056==_0x4c3d78(0xcd))_0x15184e+='\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27'+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b[_0x4c3d78(0xe7)]==_0x4c3d78(0xd3)?_0x4c3d78(0xcf):_0x4c3d78(0x93))+'\x20})\x0a',_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+_0x4c3d78(0xbe);else{if(_0x5c9056==_0x4c3d78(0xf2))_0x15184e+=_0x4c3d78(0xac)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b['Null']==_0x4c3d78(0xd3)?'true':'false')+_0x4c3d78(0xdd),_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+_0x4c3d78(0xbe);else{if(_0x5c9056==_0x4c3d78(0x9b))_0x15184e+=_0x4c3d78(0xe9)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b[_0x4c3d78(0xe7)]=='YES'?'true':_0x4c3d78(0x93))+_0x4c3d78(0xe3),_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+':\x20string;\x0a\x0a';else{if(_0x5c9056=='longtext')_0x15184e+='\x20\x20\x20\x20@Column(\x27longtext\x27,\x20{\x20comment:\x20\x27'+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b['Null']==_0x4c3d78(0xd3)?_0x4c3d78(0xcf):_0x4c3d78(0x93))+_0x4c3d78(0xe3),_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+_0x4c3d78(0xbe);else _0x5c9056=='mediumtext'?(_0x15184e+=_0x4c3d78(0xe1)+_0x32b23b[_0x4c3d78(0xe0)]+'\x27,\x20nullable:\x20'+(_0x32b23b[_0x4c3d78(0xe7)]=='YES'?_0x4c3d78(0xcf):_0x4c3d78(0x93))+_0x4c3d78(0xe3),_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b[_0x4c3d78(0xbc)]+_0x4c3d78(0xbe)):(_0x15184e+=_0x4c3d78(0xc2)+_0x32b23b[_0x4c3d78(0xe0)]+_0x4c3d78(0xeb)+(_0x32b23b[_0x4c3d78(0xe7)]=='YES'?_0x4c3d78(0xcf):_0x4c3d78(0x93))+_0x4c3d78(0xe3),_0x15184e+=_0x4c3d78(0xd8)+_0x32b23b['Field']+_0x4c3d78(0xbe));}}}}}}}}}}}}_0x4a5fe6+='//\x20import\x20{\x20ManyToOne,\x20JoinColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a',_0x4a5fe6+=_0x4c3d78(0xbf),_0x4a5fe6+=_0x4c3d78(0xbb)+(_0x135740?'PrimaryGeneratedColumn':_0x4c3d78(0xc8))+_0x4c3d78(0xb7),_0x4a5fe6+='import\x20{\x20'+_0x54cc25+_0x4c3d78(0xcc)+(typeof _0x7defd0==_0x4c3d78(0xd0)?'@/apps/'+_0x7defd0:'@/'+_0x478ba5)+_0x4c3d78(0xea)+_0x56ab2e+_0x4c3d78(0xb2),_0x4a5fe6+=_0x4c3d78(0xce),_0x4a5fe6+=_0x4c3d78(0xae)+_0x141bb7+'-实体\x0a',_0x4a5fe6+=_0x4c3d78(0x92),_0x4a5fe6+=_0x4c3d78(0xaf)+_0x54cc25+'Search)\x0a',_0x4a5fe6+=_0x4c3d78(0x99)+_0x3b5200+'\x27\x20},\x20{\x20orderBy:\x20{\x20displayorder:\x20\x27DESC\x27\x20}\x20})\x0a',_0x4a5fe6+=_0x4c3d78(0xa1)+_0x54cc25+'Entity\x20{\x0a\x0a',_0x4a5fe6+='%column%',_0x4a5fe6+='\x20\x20\x20\x20@Column({\x20comment:\x20\x27默认显示排序\x27,\x20nullable:\x20true,\x20unique:\x20false\x20})\x0a',_0x4a5fe6+=_0x4c3d78(0xa4),_0x4a5fe6+=_0x4c3d78(0xcb),_0x4a5fe6+=_0x4c3d78(0xd1),_0x4a5fe6+=_0x4c3d78(0xf3),_0x4a5fe6+=_0x4c3d78(0xa6),_0x4a5fe6+='\x20\x20\x20\x20@DeleteDateColumn({\x20comment:\x20\x27删除时间\x27,\x20type:\x20\x27timestamp\x27,\x20select:\x20false\x20})\x0a',_0x4a5fe6+=_0x4c3d78(0xc4),_0x4a5fe6+='}',_0x4a5fe6=_0x4a5fe6[_0x4c3d78(0xe5)](_0x4c3d78(0xb6),_0x15184e),!fs[_0x4c3d78(0xdf)]((0x0,path_1[_0x4c3d78(0xd7)])(_0x154e8b))&&fs['mkdirSync']((0x0,path_1[_0x4c3d78(0xd7)])(_0x154e8b),{'recursive':!![]}),fs[_0x4c3d78(0xa5)](_0x154e8b,_0x4a5fe6,_0x4c3d78(0xb0));}}async function repository({tablestartUp:_0x1f5d60,tablestartUpShort:_0x2baee7,basedir:_0x49ae19,Comment:_0xe2f0f0,moduleName:_0x36d64e,apporbasic:_0x284e33}){const _0xc96df=a6_0x1f6ffa,_0xcc666c=_0x49ae19+(_0xc96df(0xd9)+_0x2baee7+_0xc96df(0xa3));if(!fs[_0xc96df(0xdf)](_0xcc666c)){let _0x2eb0b8='';_0x2eb0b8+=_0xc96df(0xce),_0x2eb0b8+=_0xc96df(0xae)+_0xe2f0f0+_0xc96df(0xa2),_0x2eb0b8+=_0xc96df(0x92),_0x2eb0b8+=_0xc96df(0xdb),_0x2eb0b8+=_0xc96df(0xab)+_0x1f5d60+_0xc96df(0xb3)+(typeof _0x36d64e==_0xc96df(0xd0)?_0xc96df(0xba)+_0x36d64e:'@/'+_0x284e33)+'/entities/'+_0x2baee7+_0xc96df(0xf6),_0x2eb0b8+=_0xc96df(0xc9)+_0x1f5d60+'Entity)\x0a',_0x2eb0b8+=_0xc96df(0xa1)+_0x1f5d60+_0xc96df(0xc3)+_0x1f5d60+'Entity>{\x0a\x0a',_0x2eb0b8+='}',!fs['existsSync']((0x0,path_1[_0xc96df(0xd7)])(_0xcc666c))&&fs['mkdirSync']((0x0,path_1[_0xc96df(0xd7)])(_0xcc666c),{'recursive':!![]}),fs[_0xc96df(0xa5)](_0xcc666c,_0x2eb0b8,_0xc96df(0xb0));}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default function ({ tablestartUp, tablestartUpShort, basedir, moduleName, apporbasic }: {
|
|
2
|
-
tablestartUp: any;
|
|
3
|
-
tablestartUpShort: any;
|
|
4
|
-
basedir: any;
|
|
5
|
-
moduleName: any;
|
|
6
|
-
apporbasic: any;
|
|
7
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablestartUp, tablestartUpShort, basedir, moduleName, apporbasic }: {
|
|
2
|
+
tablestartUp: any;
|
|
3
|
+
tablestartUpShort: any;
|
|
4
|
+
basedir: any;
|
|
5
|
+
moduleName: any;
|
|
6
|
+
apporbasic: any;
|
|
7
|
+
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x2f9d9a=a7_0x5072;function a7_0x1088(){const _0x586305=['25870BLAJnR','9919456mPKmOY','constructor','__esModule','defineProperty','utf-8','1684020OPFhir','toString','/entities/','@/apps/','mkdirSync','\x20\x20\x20\x20@Inject()\x20protected\x20EventService:\x20EventService;\x0a\x0a','default','1595AXMbFg','path','807461vXiXMu','/listeners/','apply','Event\x20{\x0a\x0a','writeFileSync','import\x20{\x20','2392944uTVmDz','4756172uWDrbj','dirname','3128670CVaRGI','string','3uhtRJw','\x20\x20\x20\x20@InjectRepository(','2ELixYr','.ts','export\x20class\x20',';\x0a\x0a\x0a','\x20}\x20from\x20\x27','(((.+)+)+)+$','21Lnhzfr','\x27;\x0a\x0a','existsSync'];a7_0x1088=function(){return _0x586305;};return a7_0x1088();}function a7_0x5072(_0x10f22d,_0x2b33a4){const _0xd4e98f=a7_0x1088();return a7_0x5072=function(_0x3291a4,_0x8ac6d){_0x3291a4=_0x3291a4-0x130;let _0x108806=_0xd4e98f[_0x3291a4];return _0x108806;},a7_0x5072(_0x10f22d,_0x2b33a4);}(function(_0xccc53a,_0xb09fa7){const _0x94fa67=a7_0x5072,_0x5e1923=_0xccc53a();while(!![]){try{const _0x4052cd=-parseInt(_0x94fa67(0x151))/0x1*(parseInt(_0x94fa67(0x139))/0x2)+-parseInt(_0x94fa67(0x137))/0x3*(-parseInt(_0x94fa67(0x133))/0x4)+parseInt(_0x94fa67(0x148))/0x5+parseInt(_0x94fa67(0x132))/0x6*(parseInt(_0x94fa67(0x13f))/0x7)+-parseInt(_0x94fa67(0x143))/0x8+parseInt(_0x94fa67(0x135))/0x9+parseInt(_0x94fa67(0x142))/0xa*(-parseInt(_0x94fa67(0x14f))/0xb);if(_0x4052cd===_0xb09fa7)break;else _0x5e1923['push'](_0x5e1923['shift']());}catch(_0x5730ec){_0x5e1923['push'](_0x5e1923['shift']());}}}(a7_0x1088,0x9e111));const a7_0x8ac6d=(function(){let _0x3849fa=!![];return function(_0x17cb6f,_0x449e57){const _0x218dfe=_0x3849fa?function(){const _0x303b5e=a7_0x5072;if(_0x449e57){const _0x462abb=_0x449e57[_0x303b5e(0x153)](_0x17cb6f,arguments);return _0x449e57=null,_0x462abb;}}:function(){};return _0x3849fa=![],_0x218dfe;};}()),a7_0x3291a4=a7_0x8ac6d(this,function(){const _0x2d64fc=a7_0x5072;return a7_0x3291a4[_0x2d64fc(0x149)]()['search'](_0x2d64fc(0x13e))['toString']()[_0x2d64fc(0x144)](a7_0x3291a4)['search'](_0x2d64fc(0x13e));});a7_0x3291a4();'use strict';Object[a7_0x2f9d9a(0x146)](exports,a7_0x2f9d9a(0x145),{'value':!![]}),exports[a7_0x2f9d9a(0x14e)]=default_1;const fs=require('fs'),path_1=require(a7_0x2f9d9a(0x150));async function default_1({tablestartUp:_0x50cb79,tablestartUpShort:_0x757c07,basedir:_0x62f6f8,moduleName:_0x48661e,apporbasic:_0x1890cb}){const _0x4d3479=a7_0x2f9d9a,_0x2b77d1=_0x62f6f8+(_0x4d3479(0x152)+_0x757c07+_0x4d3479(0x13a));if(!fs[_0x4d3479(0x141)](_0x2b77d1)){let _0x1b5002='';_0x1b5002+='import\x20{\x20Event,\x20EventService\x20}\x20from\x20\x27@anncic-api/event\x27;\x0a',_0x1b5002+='import\x20{\x20Inject,\x20InjectRepository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a',_0x1b5002+=_0x4d3479(0x131)+_0x50cb79+_0x4d3479(0x13d)+(typeof _0x48661e==_0x4d3479(0x136)?_0x4d3479(0x14b)+_0x48661e:'@/'+_0x1890cb)+_0x4d3479(0x14a)+_0x757c07+_0x4d3479(0x140),_0x1b5002+='@Event()\x0a',_0x1b5002+=_0x4d3479(0x13b)+_0x50cb79+_0x4d3479(0x154),_0x1b5002+=_0x4d3479(0x14d),_0x1b5002+=_0x4d3479(0x138)+_0x50cb79+')\x20protected\x20'+_0x50cb79+':\x20'+_0x50cb79+_0x4d3479(0x13c),_0x1b5002+='}',!fs[_0x4d3479(0x141)]((0x0,path_1[_0x4d3479(0x134)])(_0x2b77d1))&&fs[_0x4d3479(0x14c)]((0x0,path_1['dirname'])(_0x2b77d1),{'recursive':!![]}),fs[_0x4d3479(0x130)](_0x2b77d1,_0x1b5002,_0x4d3479(0x147));}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export default function ({ tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
-
tablestartUp: any;
|
|
3
|
-
tablestartUpShort: any;
|
|
4
|
-
basedir: any;
|
|
5
|
-
Primary: any;
|
|
6
|
-
Comment: any;
|
|
7
|
-
moduleName: any;
|
|
8
|
-
apporbasic: any;
|
|
9
|
-
}): Promise<void>;
|
|
1
|
+
export default function ({ tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName, apporbasic }: {
|
|
2
|
+
tablestartUp: any;
|
|
3
|
+
tablestartUpShort: any;
|
|
4
|
+
basedir: any;
|
|
5
|
+
Primary: any;
|
|
6
|
+
Comment: any;
|
|
7
|
+
moduleName: any;
|
|
8
|
+
apporbasic: any;
|
|
9
|
+
}): Promise<void>;
|