anncic-apihelper 3.4.32 → 3.4.33
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 -7
- 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 +3 -3
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
|
+
var a0_0x16ccff=a0_0x18e5;(function(_0x48ea3e,_0xd6f18f){var _0x57e952=a0_0x18e5,_0x2a00a5=_0x48ea3e();while(!![]){try{var _0x5d2fe4=parseInt(_0x57e952(0x1f6))/0x1+-parseInt(_0x57e952(0x1f1))/0x2+-parseInt(_0x57e952(0x1f9))/0x3+parseInt(_0x57e952(0x1fc))/0x4+-parseInt(_0x57e952(0x1f4))/0x5+parseInt(_0x57e952(0x1f2))/0x6+parseInt(_0x57e952(0x1fb))/0x7;if(_0x5d2fe4===_0xd6f18f)break;else _0x2a00a5['push'](_0x2a00a5['shift']());}catch(_0x5bc234){_0x2a00a5['push'](_0x2a00a5['shift']());}}}(a0_0x31c9,0xb24e6));var a0_0x14e0ae=(function(){var _0x3291a7=!![];return function(_0x54a021,_0x495a7a){var _0x11f800=_0x3291a7?function(){var _0x5ed3db=a0_0x18e5;if(_0x495a7a){var _0xb84559=_0x495a7a[_0x5ed3db(0x1fa)](_0x54a021,arguments);return _0x495a7a=null,_0xb84559;}}:function(){};return _0x3291a7=![],_0x11f800;};}()),a0_0x115650=a0_0x14e0ae(this,function(){var _0x3c81ff=a0_0x18e5;return a0_0x115650[_0x3c81ff(0x1ee)]()['search'](_0x3c81ff(0x1f3))[_0x3c81ff(0x1ee)]()[_0x3c81ff(0x1e7)](a0_0x115650)['search']('(((.+)+)+)+$');});a0_0x115650();'use strict';var __decorate=this&&this[a0_0x16ccff(0x1f7)]||function(_0x38efff,_0x1cddfd,_0x4091f8,_0x2234cf){var _0xd5c75=a0_0x16ccff,_0xca4000=arguments['length'],_0x4eb6ce=_0xca4000<0x3?_0x1cddfd:_0x2234cf===null?_0x2234cf=Object[_0xd5c75(0x1e9)](_0x1cddfd,_0x4091f8):_0x2234cf,_0x56dd89;if(typeof Reflect==='object'&&typeof Reflect[_0xd5c75(0x1e2)]===_0xd5c75(0x200))_0x4eb6ce=Reflect[_0xd5c75(0x1e2)](_0x38efff,_0x1cddfd,_0x4091f8,_0x2234cf);else{for(var _0x56d4ae=_0x38efff['length']-0x1;_0x56d4ae>=0x0;_0x56d4ae--)if(_0x56dd89=_0x38efff[_0x56d4ae])_0x4eb6ce=(_0xca4000<0x3?_0x56dd89(_0x4eb6ce):_0xca4000>0x3?_0x56dd89(_0x1cddfd,_0x4091f8,_0x4eb6ce):_0x56dd89(_0x1cddfd,_0x4091f8))||_0x4eb6ce;}return _0xca4000>0x3&&_0x4eb6ce&&Object[_0xd5c75(0x1f5)](_0x1cddfd,_0x4091f8,_0x4eb6ce),_0x4eb6ce;},__metadata=this&&this[a0_0x16ccff(0x1ea)]||function(_0x153653,_0x1a8630){var _0x1da4f7=a0_0x16ccff;if(typeof Reflect===_0x1da4f7(0x1e1)&&typeof Reflect[_0x1da4f7(0x1e6)]==='function')return Reflect['metadata'](_0x153653,_0x1a8630);};Object['defineProperty'](exports,a0_0x16ccff(0x1ff),{'value':!![]}),exports[a0_0x16ccff(0x1e8)]=void 0x0;function a0_0x31c9(){var _0x52683b=['application','2579172wMUHAc','6481548pFqfRs','(((.+)+)+)+$','1892480WFUlIP','defineProperty','1140067ShHdVY','__decorate','config','789570gEHTRj','apply','823368ptSjsb','1294660rcArgs','prototype','design:type','__esModule','function','object','decorate','MidwayDecoratorService','Inject','anncic-apihelper','metadata','constructor','CustomConfiguration','getOwnPropertyDescriptor','__metadata','@midwayjs/core','decorator','MidwayConfigService','toString','@anncic-api/typeorm'];a0_0x31c9=function(){return _0x52683b;};return a0_0x31c9();}function a0_0x18e5(_0x522f7e,_0x39ebf2){var _0x408261=a0_0x31c9();return a0_0x18e5=function(_0x115650,_0x14e0ae){_0x115650=_0x115650-0x1e1;var _0x31c9fc=_0x408261[_0x115650];return _0x31c9fc;},a0_0x18e5(_0x522f7e,_0x39ebf2);}const core_1=require(a0_0x16ccff(0x1eb)),core_2=require(a0_0x16ccff(0x1eb)),typeorm=require(a0_0x16ccff(0x1ef));let CustomConfiguration=class CustomConfiguration{};__decorate([(0x0,core_1['Inject'])(),__metadata(a0_0x16ccff(0x1fe),core_2[a0_0x16ccff(0x1ed)])],CustomConfiguration[a0_0x16ccff(0x1fd)],a0_0x16ccff(0x1f8),void 0x0),__decorate([(0x0,core_1[a0_0x16ccff(0x1e4)])(),__metadata('design:type',core_2[a0_0x16ccff(0x1e3)])],CustomConfiguration[a0_0x16ccff(0x1fd)],a0_0x16ccff(0x1ec),void 0x0),__decorate([(0x0,core_1[a0_0x16ccff(0x1e4)])(),__metadata('design:type',core_2['MidwayApplicationManager'])],CustomConfiguration[a0_0x16ccff(0x1fd)],a0_0x16ccff(0x1f0),void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'conflictCheck':![],'imports':[typeorm],'namespace':a0_0x16ccff(0x1e5)})],CustomConfiguration),exports['CustomConfiguration']=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_0x4af3dd=a1_0x1901;(function(_0x4b601e,_0xdef2d9){const _0x5cd890=a1_0x1901,_0x14d830=_0x4b601e();while(!![]){try{const _0x4b5293=-parseInt(_0x5cd890(0x150))/0x1*(-parseInt(_0x5cd890(0x14c))/0x2)+parseInt(_0x5cd890(0x156))/0x3*(-parseInt(_0x5cd890(0x162))/0x4)+-parseInt(_0x5cd890(0x15d))/0x5*(parseInt(_0x5cd890(0x15c))/0x6)+parseInt(_0x5cd890(0x15e))/0x7*(-parseInt(_0x5cd890(0x14d))/0x8)+-parseInt(_0x5cd890(0x14b))/0x9*(-parseInt(_0x5cd890(0x160))/0xa)+parseInt(_0x5cd890(0x165))/0xb*(-parseInt(_0x5cd890(0x163))/0xc)+parseInt(_0x5cd890(0x154))/0xd*(parseInt(_0x5cd890(0x14f))/0xe);if(_0x4b5293===_0xdef2d9)break;else _0x14d830['push'](_0x14d830['shift']());}catch(_0x1027a3){_0x14d830['push'](_0x14d830['shift']());}}}(a1_0x48b3,0xa988e));const a1_0x579ef1=(function(){let _0x4819f9=!![];return function(_0x5ba770,_0x1f7365){const _0x2e3d41=_0x4819f9?function(){if(_0x1f7365){const _0x5a469e=_0x1f7365['apply'](_0x5ba770,arguments);return _0x1f7365=null,_0x5a469e;}}:function(){};return _0x4819f9=![],_0x2e3d41;};}()),a1_0x24dccf=a1_0x579ef1(this,function(){const _0x1bf4a9=a1_0x1901;return a1_0x24dccf[_0x1bf4a9(0x152)]()['search'](_0x1bf4a9(0x15f))[_0x1bf4a9(0x152)]()[_0x1bf4a9(0x169)](a1_0x24dccf)[_0x1bf4a9(0x168)]('(((.+)+)+)+$');});a1_0x24dccf();'use strict';function a1_0x48b3(){const _0x3eff62=['3560157xWdrCp','24706mLARhu','909392tDVySR','substr','112qtoWBL','61vwUquX','decimal','toString','defineProperty','3863093CxwlNS','indexOf','3204iqAyzR','timestamp','hasOwnProperty','mediumtext','json','__esModule','3150318ybQrVV','5BFeDKK','7iRWdkn','(((.+)+)+)+$','10QmArdB','longtext','3560vvVtoK','14912796rngecx','tinyint','11zmgyDb','getEnum','float','search','constructor','datetime','text','string','getProp','date','length','enum'];a1_0x48b3=function(){return _0x3eff62;};return a1_0x48b3();}Object[a1_0x4af3dd(0x153)](exports,a1_0x4af3dd(0x15b),{'value':!![]}),exports[a1_0x4af3dd(0x166)]=exports[a1_0x4af3dd(0x147)]=void 0x0;const columnTypes={'json':a1_0x4af3dd(0x15a),'char':a1_0x4af3dd(0x146),'varchar':a1_0x4af3dd(0x146),'text':a1_0x4af3dd(0x16b),'longtext':a1_0x4af3dd(0x161),'mediumtext':a1_0x4af3dd(0x159),'int':'number','float':a1_0x4af3dd(0x167),'double':a1_0x4af3dd(0x167),'decimal':a1_0x4af3dd(0x151),'date':a1_0x4af3dd(0x148),'time':a1_0x4af3dd(0x16a),'datetime':a1_0x4af3dd(0x16a),'timestamp':a1_0x4af3dd(0x157),'tinyint':a1_0x4af3dd(0x164)};function getProp(_0x3acf74){const _0x1a89b4=a1_0x4af3dd;if(columnTypes[_0x1a89b4(0x158)](_0x3acf74))return columnTypes[_0x3acf74];else return _0x3acf74[_0x1a89b4(0x155)]('(')>-0x1||_0x3acf74[_0x1a89b4(0x155)]('\x20')>-0x1?(_0x3acf74=_0x3acf74[_0x1a89b4(0x14e)](0x0,_0x3acf74[_0x1a89b4(0x155)]('(')>-0x1?_0x3acf74['indexOf']('('):_0x3acf74[_0x1a89b4(0x155)]('\x20')),columnTypes[_0x3acf74]||_0x3acf74):_0x1a89b4(0x146);}exports['getProp']=getProp;function getEnum(_0xe9cedb){const _0x46bdd8=a1_0x4af3dd;if(getProp(_0xe9cedb)==_0x46bdd8(0x14a))return _0xe9cedb[_0x46bdd8(0x14e)](0x5,_0xe9cedb[_0x46bdd8(0x149)]-0x6)['replace'](/[\'|\"]/g,'')['split'](',');return[];}function a1_0x1901(_0x2ca1ee,_0x4852b8){const _0xd72445=a1_0x48b3();return a1_0x1901=function(_0x24dccf,_0x579ef1){_0x24dccf=_0x24dccf-0x146;let _0x48b3df=_0xd72445[_0x24dccf];return _0x48b3df;},a1_0x1901(_0x2ca1ee,_0x4852b8);}exports['getEnum']=getEnum;
|
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_0x4b18e9=a2_0x1718;(function(_0x2e6b76,_0x394edd){var _0x3f2e10=a2_0x1718,_0x47cb55=_0x2e6b76();while(!![]){try{var _0x3afa0c=-parseInt(_0x3f2e10(0x86))/0x1+-parseInt(_0x3f2e10(0x90))/0x2+-parseInt(_0x3f2e10(0x87))/0x3+-parseInt(_0x3f2e10(0x8b))/0x4+parseInt(_0x3f2e10(0x8e))/0x5+-parseInt(_0x3f2e10(0x84))/0x6+parseInt(_0x3f2e10(0x89))/0x7*(parseInt(_0x3f2e10(0x8f))/0x8);if(_0x3afa0c===_0x394edd)break;else _0x47cb55['push'](_0x47cb55['shift']());}catch(_0x29aa26){_0x47cb55['push'](_0x47cb55['shift']());}}}(a2_0x3955,0xb212c));function a2_0x3955(){var _0x146992=['search','apply','constructor','./service/ApicreateService','./configuration','6344400AvrYbK','(((.+)+)+)+$','1160108NuqhBg','1638072tPMEeU','toString','7jtUIji','ApicreateService','3600232XqRlNf','Configuration','defineProperty','4056645eKNVvo','39294312knMSYc','2660280ifFRdP','CustomConfiguration','__esModule'];a2_0x3955=function(){return _0x146992;};return a2_0x3955();}var a2_0x187b36=(function(){var _0x221482=!![];return function(_0x6bf59d,_0x1c300f){var _0x50684a=_0x221482?function(){var _0x490442=a2_0x1718;if(_0x1c300f){var _0x5f0a24=_0x1c300f[_0x490442(0x94)](_0x6bf59d,arguments);return _0x1c300f=null,_0x5f0a24;}}:function(){};return _0x221482=![],_0x50684a;};}()),a2_0x5c1f7d=a2_0x187b36(this,function(){var _0x5db4de=a2_0x1718;return a2_0x5c1f7d[_0x5db4de(0x88)]()[_0x5db4de(0x93)](_0x5db4de(0x85))[_0x5db4de(0x88)]()[_0x5db4de(0x81)](a2_0x5c1f7d)[_0x5db4de(0x93)]('(((.+)+)+)+$');});a2_0x5c1f7d();'use strict';Object['defineProperty'](exports,a2_0x4b18e9(0x92),{'value':!![]}),exports[a2_0x4b18e9(0x8c)]=exports[a2_0x4b18e9(0x8a)]=void 0x0;function a2_0x1718(_0x54fc68,_0x15f7c2){var _0x486bed=a2_0x3955();return a2_0x1718=function(_0x5c1f7d,_0x187b36){_0x5c1f7d=_0x5c1f7d-0x81;var _0x3955ec=_0x486bed[_0x5c1f7d];return _0x3955ec;},a2_0x1718(_0x54fc68,_0x15f7c2);}var ApicreateService_1=require(a2_0x4b18e9(0x82));Object[a2_0x4b18e9(0x8d)](exports,a2_0x4b18e9(0x8a),{'enumerable':!![],'get':function(){var _0x4c01e6=a2_0x4b18e9;return ApicreateService_1[_0x4c01e6(0x8a)];}});var configuration_1=require(a2_0x4b18e9(0x83));Object['defineProperty'](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x2ec2f6=a2_0x4b18e9;return configuration_1[_0x2ec2f6(0x91)];}});
|
|
@@ -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
|
-
function a3_0x1da1(_0x3a5576,_0x36e646){const _0x3e8d52=a3_0xb28a();return a3_0x1da1=function(_0x47df5b,_0x562aff){_0x47df5b=_0x47df5b-0xf9;let _0xb28a96=_0x3e8d52[_0x47df5b];return _0xb28a96;},a3_0x1da1(_0x3a5576,_0x36e646);}const a3_0x268ba2=a3_0x1da1;(function(_0x25b0ac,_0x532b86){const _0x1ce1c8=a3_0x1da1,_0x3283f2=_0x25b0ac();while(!![]){try{const _0x58cb7a=-parseInt(_0x1ce1c8(0x133))/0x1+parseInt(_0x1ce1c8(0x14e))/0x2+-parseInt(_0x1ce1c8(0x156))/0x3+parseInt(_0x1ce1c8(0xfb))/0x4*(parseInt(_0x1ce1c8(0x112))/0x5)+parseInt(_0x1ce1c8(0x141))/0x6+-parseInt(_0x1ce1c8(0x122))/0x7*(-parseInt(_0x1ce1c8(0x123))/0x8)+-parseInt(_0x1ce1c8(0x12f))/0x9;if(_0x58cb7a===_0x532b86)break;else _0x3283f2['push'](_0x3283f2['shift']());}catch(_0x430678){_0x3283f2['push'](_0x3283f2['shift']());}}}(a3_0xb28a,0x760ad));const a3_0x562aff=(function(){let _0x2a5834=!![];return function(_0x292042,_0x461e1d){const _0xd0adbe=_0x2a5834?function(){if(_0x461e1d){const _0x25d875=_0x461e1d['apply'](_0x292042,arguments);return _0x461e1d=null,_0x25d875;}}:function(){};return _0x2a5834=![],_0xd0adbe;};}()),a3_0x47df5b=a3_0x562aff(this,function(){const _0x1c7a14=a3_0x1da1;return a3_0x47df5b['toString']()[_0x1c7a14(0x13e)]('(((.+)+)+)+$')[_0x1c7a14(0x111)]()[_0x1c7a14(0x176)](a3_0x47df5b)['search'](_0x1c7a14(0x100));});function a3_0xb28a(){const _0x415460=['tableprefix','utf-8','split','mkdirSync','dataSource','metadata','function','typeorm\x20数据源\x20','../templateFun/Handler','../templateFun/Common','export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27','isDevelopmentEnvironment','startsWith','config','__esModule','SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','substring','decorate','path','Fields','environment','getOwnPropertyDescriptor','.js','SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','Singleton','database','无法生成','basedir','map','constructor','App','getDataSource','string','design:type','TypeORMDataSourceManager','../templateFun/Event','LIKE\x20\x22','createAction','4TCSsIT','../templateVueV2/Api','tablestartLow','\x20不存在','existsSync','(((.+)+)+)+$','length','match','../templateVue/Router','toLowerCase','cwd','ApicreateService','default','checkOption','/config.ts','module','query','trim','../templateVue/Validator','createBasic','PRI','@midwayjs/typeorm','toString','1852085PLAdOQ','/pages/apps/','tablestart','__decorate','__metadata','object','controllers','isArray','../templateVueV2/LayoutVue','/apis/apps/','hasvue','substr','controller','apporbasic','vuedialog','error','13097hALLWZ','1448AslmEE','/apps/','moduleName','createPlugin','../templateVueV3/LayoutVue','replace','tablestartUpShort','\x22\x20AND\x20table_name\x20','@midwayjs/core','/api/','CreateModuleConfig','defineProperty','3140550MrEnIA','hasDataSource','../templateFun/Validator','\x22\x20AND\x20table_name\x20=\x20\x27','161695NmDcwg','ScopeEnum','\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middleware:\x20[],\x0a}','../templateVueV3/Api','../templateVueV3/Validator','getConfig','dataSourceManager','tablestartLowShort','app','Inject','prototype','search','tablestartUp','MidwayEnvironmentService','3274530pjxpvD','table','\x20未连接','../templateVueV2/Router','../templateVueV3/Layout','typeorm','dirname','../templateVue/Api','../templateFun/Action','Primary','join','/apis/','basic','689812TQttvs','tablestartUpShort2','createApp','filter','Config','../templateVueV3/Router','/pages/','../templateVueV2/Layout','1816749rtrqVs','Provide','connection'];a3_0xb28a=function(){return _0x415460;};return a3_0xb28a();}a3_0x47df5b();'use strict';var __decorate=this&&this[a3_0x268ba2(0x115)]||function(_0x79e779,_0x248833,_0x239a5d,_0x4a6680){const _0x1a692b=a3_0x268ba2;var _0x5dd63a=arguments[_0x1a692b(0x101)],_0x7438ec=_0x5dd63a<0x3?_0x248833:_0x4a6680===null?_0x4a6680=Object[_0x1a692b(0x16e)](_0x248833,_0x239a5d):_0x4a6680,_0x140a0a;if(typeof Reflect==='object'&&typeof Reflect[_0x1a692b(0x16a)]==='function')_0x7438ec=Reflect[_0x1a692b(0x16a)](_0x79e779,_0x248833,_0x239a5d,_0x4a6680);else{for(var _0xb56837=_0x79e779[_0x1a692b(0x101)]-0x1;_0xb56837>=0x0;_0xb56837--)if(_0x140a0a=_0x79e779[_0xb56837])_0x7438ec=(_0x5dd63a<0x3?_0x140a0a(_0x7438ec):_0x5dd63a>0x3?_0x140a0a(_0x248833,_0x239a5d,_0x7438ec):_0x140a0a(_0x248833,_0x239a5d))||_0x7438ec;}return _0x5dd63a>0x3&&_0x7438ec&&Object[_0x1a692b(0x12e)](_0x248833,_0x239a5d,_0x7438ec),_0x7438ec;},__metadata=this&&this[a3_0x268ba2(0x116)]||function(_0x466f5a,_0x19861b){const _0x492ab3=a3_0x268ba2;if(typeof Reflect===_0x492ab3(0x117)&&typeof Reflect['metadata']===_0x492ab3(0x15f))return Reflect[_0x492ab3(0x15e)](_0x466f5a,_0x19861b);};Object[a3_0x268ba2(0x12e)](exports,a3_0x268ba2(0x167),{'value':!![]}),exports[a3_0x268ba2(0x106)]=void 0x0;const fs=require('fs'),path=require(a3_0x268ba2(0x16b)),core_1=require(a3_0x268ba2(0x12b)),typeorm_1=require(a3_0x268ba2(0x110)),core_2=require(a3_0x268ba2(0x12b)),Common_1=require(a3_0x268ba2(0x162)),Event_1=require(a3_0x268ba2(0x17c)),Search_1=require('../templateFun/Search'),Entities_1=require('../templateFun/Entities'),Handler_1=require(a3_0x268ba2(0x161)),Validator_1=require(a3_0x268ba2(0x131)),Action_1=require(a3_0x268ba2(0x149)),Api_1=require(a3_0x268ba2(0x148)),Router_1=require(a3_0x268ba2(0x103)),Layout_1=require('../templateVue/Layout'),LayoutVue_1=require('../templateVue/LayoutVue'),Validator_2=require(a3_0x268ba2(0x10d)),Api_2=require(a3_0x268ba2(0xfc)),Router_2=require(a3_0x268ba2(0x144)),Layout_2=require(a3_0x268ba2(0x155)),LayoutVue_2=require(a3_0x268ba2(0x11a)),Validator_3=require('../templateVueV2/Validator'),Api_3=require(a3_0x268ba2(0x136)),Router_3=require(a3_0x268ba2(0x153)),Layout_3=require(a3_0x268ba2(0x145)),LayoutVue_3=require(a3_0x268ba2(0x127)),Validator_4=require(a3_0x268ba2(0x137));let ApicreateService=class ApicreateService{async[a3_0x268ba2(0x150)](_0x5999cd){const _0x7e562f=a3_0x268ba2;return await this[_0x7e562f(0x108)](_0x5999cd),await this['createAction']({..._0x5999cd,'apporbasic':_0x7e562f(0x13b)});}async[a3_0x268ba2(0x10e)](_0x505073){const _0x11d445=a3_0x268ba2;return await this['checkOption'](_0x505073),await this[_0x11d445(0xfa)]({..._0x505073,'apporbasic':_0x11d445(0x14d)});}async[a3_0x268ba2(0x126)](_0x368ebd){const _0x3ea889=a3_0x268ba2;return await this[_0x3ea889(0x108)](_0x368ebd),await this['createAction']({..._0x368ebd,'module':!![]});}async['createAction'](_0x81058c){const _0xb14f2e=a3_0x268ba2;var _0x580234,_0x37fcea;!_0x81058c[_0xb14f2e(0x158)]&&(_0x81058c['connection']=_0xb14f2e(0x107));!_0x81058c[_0xb14f2e(0x11f)]&&(_0x81058c[_0xb14f2e(0x11f)]='app');const _0x9e8f38=this[_0xb14f2e(0x13b)]['getBaseDir'](),_0x1c88b2=this[_0xb14f2e(0x139)][_0xb14f2e(0x178)](_0x81058c[_0xb14f2e(0x158)]),_0x481b11=await _0x1c88b2[_0xb14f2e(0x10b)](_0xb14f2e(0x170)+this[_0xb14f2e(0x166)][_0xb14f2e(0x15d)][_0x81058c[_0xb14f2e(0x158)]][_0xb14f2e(0x172)]+_0xb14f2e(0x12a)+((_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x142)])?'=\x20\x22'+_0x81058c[_0xb14f2e(0x142)]+'\x22':_0xb14f2e(0xf9)+(_0x81058c['tableprefix']||'')+'%\x22'))||[];for(let _0xb7e8b1=0x0;_0xb7e8b1<_0x481b11[_0xb14f2e(0x101)];_0xb7e8b1++){const _0x341d3a=_0x481b11[_0xb7e8b1][_0xb14f2e(0x142)];if((_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x142)])&&(_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x142)])!=_0x341d3a)continue;if((_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x159)])&&!(_0x341d3a===null||_0x341d3a===void 0x0?void 0x0:_0x341d3a[_0xb14f2e(0x165)](_0x81058c[_0xb14f2e(0x159)])))continue;const _0x37836f=await _0x1c88b2[_0xb14f2e(0x10b)](_0xb14f2e(0x168)+this[_0xb14f2e(0x166)]['dataSource'][_0x81058c[_0xb14f2e(0x158)]][_0xb14f2e(0x172)]+_0xb14f2e(0x132)+_0x341d3a+'\x27')||[];if((_0x580234=_0x37836f[0x0])===null||_0x580234===void 0x0?void 0x0:_0x580234['comment']){const _0x71b409={'tablename':_0x341d3a,'Primary':{},'Fields':{},'Comment':(_0x37fcea=_0x37836f[0x0])===null||_0x37fcea===void 0x0?void 0x0:_0x37fcea['comment'],'vuedialog':_0x81058c[_0xb14f2e(0x120)],'apporbasic':_0x81058c[_0xb14f2e(0x11f)]};_0x71b409[_0xb14f2e(0x114)]=_0x341d3a[_0xb14f2e(0x11d)]((_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x11d)])||0x0,_0x341d3a['length']),_0x71b409[_0xb14f2e(0x174)]=(_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x10a)])?_0x9e8f38+_0xb14f2e(0x124)+_0x71b409[_0xb14f2e(0x114)]['split']('_')[0x0][_0xb14f2e(0x104)]():_0x9e8f38+'/'+_0x81058c[_0xb14f2e(0x11f)];const _0x2c7504=_0x71b409['tablestart']['split']('_')[_0xb14f2e(0x151)](_0xb74f1d=>_0xb74f1d&&_0xb74f1d[_0xb14f2e(0x10c)]());(_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x10a)])&&(await this[_0xb14f2e(0x12d)](_0x71b409),_0x71b409[_0xb14f2e(0x125)]=_0x2c7504[0x0]['toLowerCase']());_0x71b409['tablestartLow']=_0x2c7504[_0xb14f2e(0x175)](_0x3df7ef=>_0x3df7ef[_0xb14f2e(0x104)]())[_0xb14f2e(0x14b)](''),_0x71b409['tablestartUp']=_0x2c7504['map'](_0x4754b8=>''+_0x4754b8['substring'](0x0,0x1)['toUpperCase']()+_0x4754b8[_0xb14f2e(0x169)](0x1)[_0xb14f2e(0x104)]())['join']('');(_0x71b409===null||_0x71b409===void 0x0?void 0x0:_0x71b409[_0xb14f2e(0x125)])&&_0x2c7504[_0xb14f2e(0x101)]>0x1&&_0x2c7504[0x0]['toLowerCase']()==_0x71b409['moduleName']?(_0x71b409['tablestartUpShort']=_0x71b409['tablestartUp'][_0xb14f2e(0x169)](_0x71b409['moduleName']['length'],_0x71b409[_0xb14f2e(0x13f)][_0xb14f2e(0x101)]),_0x71b409[_0xb14f2e(0x13a)]=_0x71b409['tablestartLow'][_0xb14f2e(0x169)](_0x71b409['moduleName'][_0xb14f2e(0x101)],_0x71b409['tablestartLow'][_0xb14f2e(0x101)])):(_0x71b409[_0xb14f2e(0x129)]=_0x71b409[_0xb14f2e(0x13f)],_0x71b409[_0xb14f2e(0x13a)]=_0x71b409[_0xb14f2e(0xfd)]);_0x71b409[_0xb14f2e(0x14f)]=_0x71b409[_0xb14f2e(0x129)]['replace'](/\/{2,}/g,'/')[_0xb14f2e(0x102)](/[\/|A-Z]*[^A-Z]+/g)[_0xb14f2e(0x14b)]('-')[_0xb14f2e(0x104)]()[_0xb14f2e(0x128)](/\/\-/g,'/');for(let _0x57ba40 of await _0x1c88b2[_0xb14f2e(0x10b)]('SHOW\x20FULL\x20COLUMNS\x20FROM\x20`'+_0x341d3a+'`')){_0x57ba40['Key']==_0xb14f2e(0x10f)?_0x71b409[_0xb14f2e(0x14a)]=_0x57ba40:_0x71b409[_0xb14f2e(0x16c)][_0x57ba40['Field']]=_0x57ba40;}if((_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x11e)])&&!fs[_0xb14f2e(0xff)](_0x71b409[_0xb14f2e(0x174)]+'/exceptions/'+_0x71b409[_0xb14f2e(0x129)]+'.ts')){var _0x1b0e44=[];if(typeof(_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x11e)])==_0xb14f2e(0x179))_0x1b0e44=[_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c['controller']];else Array[_0xb14f2e(0x119)](_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c['controller'])?_0x1b0e44=_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x11e)]:_0x1b0e44=[!![]];_0x71b409[_0xb14f2e(0x118)]=_0x1b0e44,await(0x0,Search_1[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Entities_1['default'])(_0x71b409),await(0x0,Common_1[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Event_1['default'])(_0x71b409),await(0x0,Handler_1[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Validator_1[_0xb14f2e(0x107)])(_0x71b409);for(let _0x46d920 of _0x1b0e44){_0x71b409['controller']=_0x46d920,await(0x0,Action_1[_0xb14f2e(0x107)])(_0x71b409);}}if(_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x11c)]){var _0x1b0e44=[];if(typeof(_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c['controller'])=='string')_0x1b0e44=[_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x11e)]];else Array[_0xb14f2e(0x119)](_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c[_0xb14f2e(0x11e)])?_0x1b0e44=_0x81058c===null||_0x81058c===void 0x0?void 0x0:_0x81058c['controller']:_0x1b0e44=[!![]];if(_0x81058c[_0xb14f2e(0x11c)]=='v2')for(let _0x1f140c of _0x1b0e44){_0x71b409[_0xb14f2e(0x11e)]=_0x1f140c;let _0x274fd2=process[_0xb14f2e(0x105)]()+'/vue'+(typeof _0x71b409[_0xb14f2e(0x11e)]==_0xb14f2e(0x179)?'/'+_0x71b409['controller']:'');_0x71b409[_0xb14f2e(0x125)]?_0x274fd2=_0x274fd2+(_0xb14f2e(0x11b)+_0x71b409[_0xb14f2e(0x125)]+_0xb14f2e(0x14c)+_0x71b409[_0xb14f2e(0x129)]+'.js'):_0x274fd2=_0x274fd2+(_0xb14f2e(0x14c)+_0x71b409[_0xb14f2e(0x11f)]+_0xb14f2e(0x14c)+_0x71b409[_0xb14f2e(0x129)]+_0xb14f2e(0x16f)),!fs[_0xb14f2e(0xff)](_0x274fd2)&&(await(0x0,Api_2[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Router_2[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Layout_2[_0xb14f2e(0x107)])(_0x71b409),await(0x0,LayoutVue_2[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Validator_3[_0xb14f2e(0x107)])(_0x71b409));}else{if(_0x81058c[_0xb14f2e(0x11c)]=='v3')for(let _0x2ed3c8 of _0x1b0e44){_0x71b409[_0xb14f2e(0x11e)]=_0x2ed3c8;let _0x32fce1=process[_0xb14f2e(0x105)]()+'/vue'+(typeof _0x71b409[_0xb14f2e(0x11e)]==_0xb14f2e(0x179)?'/'+_0x71b409[_0xb14f2e(0x11e)]:'');_0x71b409['moduleName']?_0x32fce1=_0x32fce1+(_0xb14f2e(0x11b)+_0x71b409[_0xb14f2e(0x125)]+_0xb14f2e(0x14c)+_0x71b409[_0xb14f2e(0x129)]+_0xb14f2e(0x16f)):_0x32fce1=_0x32fce1+(_0xb14f2e(0x14c)+_0x71b409[_0xb14f2e(0x11f)]+_0xb14f2e(0x14c)+_0x71b409[_0xb14f2e(0x129)]+_0xb14f2e(0x16f)),!fs[_0xb14f2e(0xff)](_0x32fce1)&&(await(0x0,Api_3['default'])(_0x71b409),await(0x0,Router_3[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Layout_3['default'])(_0x71b409),await(0x0,LayoutVue_3[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Validator_4[_0xb14f2e(0x107)])(_0x71b409));}else for(let _0xe97db3 of _0x1b0e44){_0x71b409[_0xb14f2e(0x11e)]=_0xe97db3;let _0x56e3a0=process[_0xb14f2e(0x105)]()+'/vue'+(typeof _0x71b409[_0xb14f2e(0x11e)]=='string'?'/'+_0x71b409[_0xb14f2e(0x11e)]:'');_0x71b409[_0xb14f2e(0x125)]?_0x56e3a0=_0x56e3a0+(_0xb14f2e(0x113)+_0x71b409[_0xb14f2e(0x125)]+_0xb14f2e(0x12c)+_0x71b409[_0xb14f2e(0x14f)]+_0xb14f2e(0x16f)):_0x56e3a0=_0x56e3a0+(_0xb14f2e(0x154)+_0x71b409[_0xb14f2e(0x11f)]+_0xb14f2e(0x12c)+_0x71b409[_0xb14f2e(0x14f)]+_0xb14f2e(0x16f)),!fs[_0xb14f2e(0xff)](_0x56e3a0)&&(await(0x0,Api_1[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Router_1[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Layout_1[_0xb14f2e(0x107)])(_0x71b409),await(0x0,LayoutVue_1[_0xb14f2e(0x107)])(_0x71b409),await(0x0,Validator_2[_0xb14f2e(0x107)])(_0x71b409));}}}}else console[_0xb14f2e(0x121)]('表:'+_0x341d3a+'\x20表注释不存在');}return'die';}async[a3_0x268ba2(0x108)](_0x462c11){const _0x333a56=a3_0x268ba2;var _0x19c3da,_0x412b7d,_0x5b9a91;if(!this[_0x333a56(0x16d)][_0x333a56(0x164)]()||!((_0x19c3da=this[_0x333a56(0x166)])===null||_0x19c3da===void 0x0?void 0x0:_0x19c3da[_0x333a56(0x15d)])||!this[_0x333a56(0x13b)][_0x333a56(0x138)]('apitest'))throw new Error(_0x333a56(0x173));!_0x462c11[_0x333a56(0x158)]&&(_0x462c11[_0x333a56(0x158)]=_0x333a56(0x107));if(!((_0x5b9a91=(_0x412b7d=this[_0x333a56(0x166)])===null||_0x412b7d===void 0x0?void 0x0:_0x412b7d[_0x333a56(0x15d)])===null||_0x5b9a91===void 0x0?void 0x0:_0x5b9a91[_0x462c11[_0x333a56(0x158)]]))throw new Error('typeorm\x20未配置数据源\x20'+_0x462c11['connection']);if(!this[_0x333a56(0x139)][_0x333a56(0x130)](_0x462c11['connection']))throw new Error(_0x333a56(0x160)+_0x462c11['connection']+_0x333a56(0xfe));if(!this['dataSourceManager']['isConnected'](_0x462c11[_0x333a56(0x158)]))throw new Error(_0x333a56(0x160)+_0x462c11['connection']+_0x333a56(0x143));return!![];}async[a3_0x268ba2(0x12d)](_0x31d270){const _0x2931e4=a3_0x268ba2,_0x313fc8=_0x31d270[_0x2931e4(0x114)][_0x2931e4(0x15b)]('_')[0x0][_0x2931e4(0x104)]();if(!fs['existsSync'](_0x31d270[_0x2931e4(0x174)]+_0x2931e4(0x109))){let _0x3b8ce4=_0x2931e4(0x163)+(_0x31d270['Comment']||_0x313fc8)+_0x2931e4(0x135);fs[_0x2931e4(0x15c)](path[_0x2931e4(0x147)](_0x31d270['basedir']+_0x2931e4(0x109)),{'recursive':!![]}),fs['writeFileSync'](_0x31d270[_0x2931e4(0x174)]+_0x2931e4(0x109),_0x3b8ce4,_0x2931e4(0x15a));}}};exports[a3_0x268ba2(0x106)]=ApicreateService,__decorate([(0x0,core_2[a3_0x268ba2(0x177)])(),__metadata(a3_0x268ba2(0x17a),Object)],ApicreateService[a3_0x268ba2(0x13d)],a3_0x268ba2(0x13b),void 0x0),__decorate([(0x0,core_2[a3_0x268ba2(0x152)])(a3_0x268ba2(0x146)),__metadata(a3_0x268ba2(0x17a),Object)],ApicreateService[a3_0x268ba2(0x13d)],a3_0x268ba2(0x166),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a3_0x268ba2(0x17a),core_1[a3_0x268ba2(0x140)])],ApicreateService['prototype'],a3_0x268ba2(0x16d),void 0x0),__decorate([(0x0,core_2[a3_0x268ba2(0x13c)])(),__metadata('design:type',typeorm_1[a3_0x268ba2(0x17b)])],ApicreateService[a3_0x268ba2(0x13d)],a3_0x268ba2(0x139),void 0x0),exports['ApicreateService']=ApicreateService=__decorate([(0x0,core_2[a3_0x268ba2(0x157)])('ApicreateService'),(0x0,core_2['Scope'])(core_2[a3_0x268ba2(0x134)][a3_0x268ba2(0x171)])],ApicreateService);
|
|
1
|
+
function a3_0x2aa2(_0x2671cd,_0xa53b08){const _0x581905=a3_0x5b5f();return a3_0x2aa2=function(_0x4d6d8c,_0x5b72c5){_0x4d6d8c=_0x4d6d8c-0xf9;let _0x5b5f5d=_0x581905[_0x4d6d8c];return _0x5b5f5d;},a3_0x2aa2(_0x2671cd,_0xa53b08);}const a3_0x533315=a3_0x2aa2;(function(_0x354f2b,_0x33ebd6){const _0x297a3a=a3_0x2aa2,_0x56f4da=_0x354f2b();while(!![]){try{const _0x26d233=parseInt(_0x297a3a(0x122))/0x1*(parseInt(_0x297a3a(0x151))/0x2)+parseInt(_0x297a3a(0x145))/0x3+-parseInt(_0x297a3a(0x167))/0x4+parseInt(_0x297a3a(0x135))/0x5*(parseInt(_0x297a3a(0x109))/0x6)+-parseInt(_0x297a3a(0x170))/0x7*(parseInt(_0x297a3a(0x10a))/0x8)+parseInt(_0x297a3a(0x143))/0x9+-parseInt(_0x297a3a(0x16d))/0xa;if(_0x26d233===_0x33ebd6)break;else _0x56f4da['push'](_0x56f4da['shift']());}catch(_0x30bdc8){_0x56f4da['push'](_0x56f4da['shift']());}}}(a3_0x5b5f,0xb0ff6));const a3_0x5b72c5=(function(){let _0x36d87e=!![];return function(_0x2defd8,_0x5bf4e3){const _0x3f1915=_0x36d87e?function(){const _0x562dae=a3_0x2aa2;if(_0x5bf4e3){const _0x7120c=_0x5bf4e3[_0x562dae(0x10c)](_0x2defd8,arguments);return _0x5bf4e3=null,_0x7120c;}}:function(){};return _0x36d87e=![],_0x3f1915;};}()),a3_0x4d6d8c=a3_0x5b72c5(this,function(){const _0x292b2d=a3_0x2aa2;return a3_0x4d6d8c[_0x292b2d(0x126)]()[_0x292b2d(0x148)](_0x292b2d(0x16b))[_0x292b2d(0x126)]()[_0x292b2d(0x11b)](a3_0x4d6d8c)[_0x292b2d(0x148)]('(((.+)+)+)+$');});function a3_0x5b5f(){const _0x23a9c3=['Fields','ScopeEnum','../templateVueV3/Layout','tablestart','path','existsSync','.js','__metadata','PRI','apitest','getDataSource','typeorm\x20数据源\x20','moduleName','335nVixBg','length','error','/vue','/api/','default','=\x20\x22','writeFileSync','dataSource','/apis/','function','toLowerCase','createPlugin','tablestartUpShort','10654821MtHcPb','hasDataSource','1861545CsjTHU','getConfig','/config.ts','search','\x22\x20AND\x20table_name\x20=\x20\x27','controller','apporbasic','checkOption','createAction','basic','prototype','split','21118pBwRkH','typeorm','export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27','tableprefix','isConnected','comment','Scope','dirname','vuedialog','replace','metadata','hasvue','controllers','defineProperty','toUpperCase','../templateVueV2/Router','/exceptions/','substr','__esModule','tablestartUpShort2','App','\x20不存在','5509800GgueEQ','decorate','tablestartUp','../templateFun/Common','(((.+)+)+)+$','Provide','16296320LZASPk','Field','SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','7uUYppG','query','app','design:type','environment','getOwnPropertyDescriptor','table','../templateVueV2/Layout','../templateFun/Search','@midwayjs/core','module','../templateVue/Layout','../templateVueV3/Router','trim','Singleton','TypeORMDataSourceManager','Comment','createBasic','typeorm\x20未配置数据源\x20','/apis/apps/','substring','../templateFun/Action','../templateFun/Event','config','Inject','createApp','CreateModuleConfig','102768LJAShQ','2375312RxPIoA','string','apply','../templateFun/Handler','../templateVue/Validator','@midwayjs/typeorm','cwd','../templateVueV3/Validator','tablestartLow','object','basedir','isDevelopmentEnvironment','../templateVue/LayoutVue','die','filter','connection','tablestartLowShort','constructor','ApicreateService','../templateVueV2/LayoutVue','\x20未连接','../templateVue/Router','.ts','../templateVue/Api','102lqFlMV','dataSourceManager','database','join','toString','Config'];a3_0x5b5f=function(){return _0x23a9c3;};return a3_0x5b5f();}a3_0x4d6d8c();'use strict';var __decorate=this&&this['__decorate']||function(_0x405e68,_0x4c0b12,_0x4a1c1e,_0x3725c0){const _0x2cd521=a3_0x2aa2;var _0x2d8a50=arguments[_0x2cd521(0x136)],_0x2e5df7=_0x2d8a50<0x3?_0x4c0b12:_0x3725c0===null?_0x3725c0=Object[_0x2cd521(0x175)](_0x4c0b12,_0x4a1c1e):_0x3725c0,_0x484349;if(typeof Reflect===_0x2cd521(0x113)&&typeof Reflect[_0x2cd521(0x168)]==='function')_0x2e5df7=Reflect[_0x2cd521(0x168)](_0x405e68,_0x4c0b12,_0x4a1c1e,_0x3725c0);else{for(var _0x5f5d9f=_0x405e68[_0x2cd521(0x136)]-0x1;_0x5f5d9f>=0x0;_0x5f5d9f--)if(_0x484349=_0x405e68[_0x5f5d9f])_0x2e5df7=(_0x2d8a50<0x3?_0x484349(_0x2e5df7):_0x2d8a50>0x3?_0x484349(_0x4c0b12,_0x4a1c1e,_0x2e5df7):_0x484349(_0x4c0b12,_0x4a1c1e))||_0x2e5df7;}return _0x2d8a50>0x3&&_0x2e5df7&&Object[_0x2cd521(0x15e)](_0x4c0b12,_0x4a1c1e,_0x2e5df7),_0x2e5df7;},__metadata=this&&this[a3_0x533315(0x12f)]||function(_0x48c7f8,_0x421db7){const _0x2aa15e=a3_0x533315;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x2aa15e(0x13f))return Reflect[_0x2aa15e(0x15b)](_0x48c7f8,_0x421db7);};Object[a3_0x533315(0x15e)](exports,a3_0x533315(0x163),{'value':!![]}),exports['ApicreateService']=void 0x0;const fs=require('fs'),path=require(a3_0x533315(0x12c)),core_1=require(a3_0x533315(0x179)),typeorm_1=require(a3_0x533315(0x10f)),core_2=require(a3_0x533315(0x179)),Common_1=require(a3_0x533315(0x16a)),Event_1=require(a3_0x533315(0x104)),Search_1=require(a3_0x533315(0x178)),Entities_1=require('../templateFun/Entities'),Handler_1=require(a3_0x533315(0x10d)),Validator_1=require('../templateFun/Validator'),Action_1=require(a3_0x533315(0x103)),Api_1=require(a3_0x533315(0x121)),Router_1=require(a3_0x533315(0x11f)),Layout_1=require(a3_0x533315(0xf9)),LayoutVue_1=require(a3_0x533315(0x116)),Validator_2=require(a3_0x533315(0x10e)),Api_2=require('../templateVueV2/Api'),Router_2=require(a3_0x533315(0x160)),Layout_2=require(a3_0x533315(0x177)),LayoutVue_2=require(a3_0x533315(0x11d)),Validator_3=require('../templateVueV2/Validator'),Api_3=require('../templateVueV3/Api'),Router_3=require(a3_0x533315(0xfa)),Layout_3=require(a3_0x533315(0x12a)),LayoutVue_3=require('../templateVueV3/LayoutVue'),Validator_4=require(a3_0x533315(0x111));let ApicreateService=class ApicreateService{async[a3_0x533315(0x107)](_0xaa5f65){const _0x535034=a3_0x533315;return await this[_0x535034(0x14c)](_0xaa5f65),await this[_0x535034(0x14d)]({..._0xaa5f65,'apporbasic':_0x535034(0x172)});}async[a3_0x533315(0xff)](_0x224a4c){const _0x586ed9=a3_0x533315;return await this['checkOption'](_0x224a4c),await this[_0x586ed9(0x14d)]({..._0x224a4c,'apporbasic':_0x586ed9(0x14e)});}async[a3_0x533315(0x141)](_0x3a0352){const _0x2c921f=a3_0x533315;return await this[_0x2c921f(0x14c)](_0x3a0352),await this[_0x2c921f(0x14d)]({..._0x3a0352,'module':!![]});}async[a3_0x533315(0x14d)](_0x1b5859){const _0x48fddf=a3_0x533315;var _0x3c3685,_0x4b1e12;!_0x1b5859[_0x48fddf(0x119)]&&(_0x1b5859[_0x48fddf(0x119)]='default');!_0x1b5859[_0x48fddf(0x14b)]&&(_0x1b5859[_0x48fddf(0x14b)]=_0x48fddf(0x172));const _0x4cce9c=this[_0x48fddf(0x172)]['getBaseDir'](),_0x170ed8=this['dataSourceManager'][_0x48fddf(0x132)](_0x1b5859[_0x48fddf(0x119)]),_0x32a2a0=await _0x170ed8['query']('SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22'+this[_0x48fddf(0x105)]['dataSource'][_0x1b5859[_0x48fddf(0x119)]][_0x48fddf(0x124)]+'\x22\x20AND\x20table_name\x20'+((_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x176)])?_0x48fddf(0x13b)+_0x1b5859[_0x48fddf(0x176)]+'\x22':'LIKE\x20\x22'+(_0x1b5859[_0x48fddf(0x154)]||'')+'%\x22'))||[];for(let _0x3883d5=0x0;_0x3883d5<_0x32a2a0[_0x48fddf(0x136)];_0x3883d5++){const _0x9e2eba=_0x32a2a0[_0x3883d5][_0x48fddf(0x176)];if((_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x176)])&&(_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x176)])!=_0x9e2eba)continue;if((_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x154)])&&!(_0x9e2eba===null||_0x9e2eba===void 0x0?void 0x0:_0x9e2eba['startsWith'](_0x1b5859[_0x48fddf(0x154)])))continue;const _0x3baf0d=await _0x170ed8[_0x48fddf(0x171)](_0x48fddf(0x16f)+this[_0x48fddf(0x105)][_0x48fddf(0x13d)][_0x1b5859['connection']][_0x48fddf(0x124)]+_0x48fddf(0x149)+_0x9e2eba+'\x27')||[];if((_0x3c3685=_0x3baf0d[0x0])===null||_0x3c3685===void 0x0?void 0x0:_0x3c3685[_0x48fddf(0x156)]){const _0x27d532={'tablename':_0x9e2eba,'Primary':{},'Fields':{},'Comment':(_0x4b1e12=_0x3baf0d[0x0])===null||_0x4b1e12===void 0x0?void 0x0:_0x4b1e12[_0x48fddf(0x156)],'vuedialog':_0x1b5859[_0x48fddf(0x159)],'apporbasic':_0x1b5859['apporbasic']};_0x27d532['tablestart']=_0x9e2eba[_0x48fddf(0x162)]((_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x162)])||0x0,_0x9e2eba[_0x48fddf(0x136)]),_0x27d532[_0x48fddf(0x114)]=(_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x17a)])?_0x4cce9c+'/apps/'+_0x27d532[_0x48fddf(0x12b)][_0x48fddf(0x150)]('_')[0x0][_0x48fddf(0x140)]():_0x4cce9c+'/'+_0x1b5859[_0x48fddf(0x14b)];const _0x43e50e=_0x27d532[_0x48fddf(0x12b)][_0x48fddf(0x150)]('_')[_0x48fddf(0x118)](_0xfd0282=>_0xfd0282&&_0xfd0282[_0x48fddf(0xfb)]());(_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x17a)])&&(await this['CreateModuleConfig'](_0x27d532),_0x27d532[_0x48fddf(0x134)]=_0x43e50e[0x0][_0x48fddf(0x140)]());_0x27d532[_0x48fddf(0x112)]=_0x43e50e['map'](_0x997945=>_0x997945[_0x48fddf(0x140)]())[_0x48fddf(0x125)](''),_0x27d532[_0x48fddf(0x169)]=_0x43e50e['map'](_0x4b778d=>''+_0x4b778d[_0x48fddf(0x102)](0x0,0x1)[_0x48fddf(0x15f)]()+_0x4b778d[_0x48fddf(0x102)](0x1)[_0x48fddf(0x140)]())['join']('');(_0x27d532===null||_0x27d532===void 0x0?void 0x0:_0x27d532['moduleName'])&&_0x43e50e[_0x48fddf(0x136)]>0x1&&_0x43e50e[0x0]['toLowerCase']()==_0x27d532[_0x48fddf(0x134)]?(_0x27d532[_0x48fddf(0x142)]=_0x27d532[_0x48fddf(0x169)][_0x48fddf(0x102)](_0x27d532[_0x48fddf(0x134)]['length'],_0x27d532[_0x48fddf(0x169)][_0x48fddf(0x136)]),_0x27d532[_0x48fddf(0x11a)]=_0x27d532[_0x48fddf(0x112)][_0x48fddf(0x102)](_0x27d532[_0x48fddf(0x134)]['length'],_0x27d532['tablestartLow'][_0x48fddf(0x136)])):(_0x27d532[_0x48fddf(0x142)]=_0x27d532[_0x48fddf(0x169)],_0x27d532[_0x48fddf(0x11a)]=_0x27d532['tablestartLow']);_0x27d532[_0x48fddf(0x164)]=_0x27d532[_0x48fddf(0x142)]['replace'](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x48fddf(0x140)]()[_0x48fddf(0x15a)](/\/\-/g,'/');for(let _0x132885 of await _0x170ed8[_0x48fddf(0x171)]('SHOW\x20FULL\x20COLUMNS\x20FROM\x20`'+_0x9e2eba+'`')){_0x132885['Key']==_0x48fddf(0x130)?_0x27d532['Primary']=_0x132885:_0x27d532[_0x48fddf(0x128)][_0x132885[_0x48fddf(0x16e)]]=_0x132885;}if((_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)])&&!fs[_0x48fddf(0x12d)](_0x27d532[_0x48fddf(0x114)]+_0x48fddf(0x161)+_0x27d532[_0x48fddf(0x142)]+_0x48fddf(0x120))){var _0x4089a0=[];if(typeof(_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)])==_0x48fddf(0x10b))_0x4089a0=[_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)]];else Array['isArray'](_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)])?_0x4089a0=_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)]:_0x4089a0=[!![]];_0x27d532[_0x48fddf(0x15d)]=_0x4089a0,await(0x0,Search_1[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Entities_1[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Common_1['default'])(_0x27d532),await(0x0,Event_1['default'])(_0x27d532),await(0x0,Handler_1[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Validator_1[_0x48fddf(0x13a)])(_0x27d532);for(let _0x2162bb of _0x4089a0){_0x27d532[_0x48fddf(0x14a)]=_0x2162bb,await(0x0,Action_1['default'])(_0x27d532);}}if(_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859['hasvue']){var _0x4089a0=[];if(typeof(_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)])==_0x48fddf(0x10b))_0x4089a0=[_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)]];else Array['isArray'](_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859['controller'])?_0x4089a0=_0x1b5859===null||_0x1b5859===void 0x0?void 0x0:_0x1b5859[_0x48fddf(0x14a)]:_0x4089a0=[!![]];if(_0x1b5859['hasvue']=='v2')for(let _0x32ff3e of _0x4089a0){_0x27d532[_0x48fddf(0x14a)]=_0x32ff3e;let _0x58307e=process[_0x48fddf(0x110)]()+_0x48fddf(0x138)+(typeof _0x27d532['controller']==_0x48fddf(0x10b)?'/'+_0x27d532['controller']:'');_0x27d532[_0x48fddf(0x134)]?_0x58307e=_0x58307e+('/apis/apps/'+_0x27d532[_0x48fddf(0x134)]+_0x48fddf(0x13e)+_0x27d532[_0x48fddf(0x142)]+_0x48fddf(0x12e)):_0x58307e=_0x58307e+('/apis/'+_0x27d532[_0x48fddf(0x14b)]+_0x48fddf(0x13e)+_0x27d532['tablestartUpShort']+_0x48fddf(0x12e)),!fs[_0x48fddf(0x12d)](_0x58307e)&&(await(0x0,Api_2['default'])(_0x27d532),await(0x0,Router_2['default'])(_0x27d532),await(0x0,Layout_2[_0x48fddf(0x13a)])(_0x27d532),await(0x0,LayoutVue_2[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Validator_3['default'])(_0x27d532));}else{if(_0x1b5859[_0x48fddf(0x15c)]=='v3')for(let _0x248e60 of _0x4089a0){_0x27d532[_0x48fddf(0x14a)]=_0x248e60;let _0x4ca0af=process[_0x48fddf(0x110)]()+_0x48fddf(0x138)+(typeof _0x27d532['controller']==_0x48fddf(0x10b)?'/'+_0x27d532['controller']:'');_0x27d532[_0x48fddf(0x134)]?_0x4ca0af=_0x4ca0af+(_0x48fddf(0x101)+_0x27d532['moduleName']+_0x48fddf(0x13e)+_0x27d532[_0x48fddf(0x142)]+'.js'):_0x4ca0af=_0x4ca0af+(_0x48fddf(0x13e)+_0x27d532[_0x48fddf(0x14b)]+'/apis/'+_0x27d532[_0x48fddf(0x142)]+_0x48fddf(0x12e)),!fs[_0x48fddf(0x12d)](_0x4ca0af)&&(await(0x0,Api_3[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Router_3[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Layout_3[_0x48fddf(0x13a)])(_0x27d532),await(0x0,LayoutVue_3[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Validator_4[_0x48fddf(0x13a)])(_0x27d532));}else for(let _0x5f2b59 of _0x4089a0){_0x27d532['controller']=_0x5f2b59;let _0x2a7a76=process[_0x48fddf(0x110)]()+_0x48fddf(0x138)+(typeof _0x27d532[_0x48fddf(0x14a)]==_0x48fddf(0x10b)?'/'+_0x27d532['controller']:'');_0x27d532[_0x48fddf(0x134)]?_0x2a7a76=_0x2a7a76+('/pages/apps/'+_0x27d532[_0x48fddf(0x134)]+_0x48fddf(0x139)+_0x27d532['tablestartUpShort2']+_0x48fddf(0x12e)):_0x2a7a76=_0x2a7a76+('/pages/'+_0x27d532['apporbasic']+_0x48fddf(0x139)+_0x27d532[_0x48fddf(0x164)]+_0x48fddf(0x12e)),!fs[_0x48fddf(0x12d)](_0x2a7a76)&&(await(0x0,Api_1[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Router_1['default'])(_0x27d532),await(0x0,Layout_1[_0x48fddf(0x13a)])(_0x27d532),await(0x0,LayoutVue_1[_0x48fddf(0x13a)])(_0x27d532),await(0x0,Validator_2['default'])(_0x27d532));}}}}else console[_0x48fddf(0x137)]('表:'+_0x9e2eba+'\x20表注释不存在');}return _0x48fddf(0x117);}async[a3_0x533315(0x14c)](_0x140245){const _0x42cb30=a3_0x533315;var _0x579814,_0x262d78,_0xe020ff;if(!this[_0x42cb30(0x174)][_0x42cb30(0x115)]()||!((_0x579814=this[_0x42cb30(0x105)])===null||_0x579814===void 0x0?void 0x0:_0x579814[_0x42cb30(0x13d)])||!this[_0x42cb30(0x172)][_0x42cb30(0x146)](_0x42cb30(0x131)))throw new Error('无法生成');!_0x140245[_0x42cb30(0x119)]&&(_0x140245[_0x42cb30(0x119)]=_0x42cb30(0x13a));if(!((_0xe020ff=(_0x262d78=this['config'])===null||_0x262d78===void 0x0?void 0x0:_0x262d78[_0x42cb30(0x13d)])===null||_0xe020ff===void 0x0?void 0x0:_0xe020ff[_0x140245[_0x42cb30(0x119)]]))throw new Error(_0x42cb30(0x100)+_0x140245[_0x42cb30(0x119)]);if(!this['dataSourceManager'][_0x42cb30(0x144)](_0x140245[_0x42cb30(0x119)]))throw new Error(_0x42cb30(0x133)+_0x140245['connection']+_0x42cb30(0x166));if(!this['dataSourceManager'][_0x42cb30(0x155)](_0x140245[_0x42cb30(0x119)]))throw new Error(_0x42cb30(0x133)+_0x140245[_0x42cb30(0x119)]+_0x42cb30(0x11e));return!![];}async[a3_0x533315(0x108)](_0x52166e){const _0x9248ce=a3_0x533315,_0x499148=_0x52166e[_0x9248ce(0x12b)]['split']('_')[0x0][_0x9248ce(0x140)]();if(!fs['existsSync'](_0x52166e[_0x9248ce(0x114)]+_0x9248ce(0x147))){let _0x463cb2=_0x9248ce(0x153)+(_0x52166e[_0x9248ce(0xfe)]||_0x499148)+'\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middleware:\x20[],\x0a}';fs['mkdirSync'](path[_0x9248ce(0x158)](_0x52166e[_0x9248ce(0x114)]+'/config.ts'),{'recursive':!![]}),fs[_0x9248ce(0x13c)](_0x52166e[_0x9248ce(0x114)]+_0x9248ce(0x147),_0x463cb2,'utf-8');}}};__decorate([(0x0,core_2[a3_0x533315(0x165)])(),__metadata(a3_0x533315(0x173),Object)],ApicreateService[a3_0x533315(0x14f)],a3_0x533315(0x172),void 0x0),__decorate([(0x0,core_2[a3_0x533315(0x127)])(a3_0x533315(0x152)),__metadata(a3_0x533315(0x173),Object)],ApicreateService[a3_0x533315(0x14f)],a3_0x533315(0x105),void 0x0),__decorate([(0x0,core_2[a3_0x533315(0x106)])(),__metadata(a3_0x533315(0x173),core_1['MidwayEnvironmentService'])],ApicreateService[a3_0x533315(0x14f)],a3_0x533315(0x174),void 0x0),__decorate([(0x0,core_2[a3_0x533315(0x106)])(),__metadata(a3_0x533315(0x173),typeorm_1[a3_0x533315(0xfd)])],ApicreateService[a3_0x533315(0x14f)],a3_0x533315(0x123),void 0x0),ApicreateService=__decorate([(0x0,core_2[a3_0x533315(0x16c)])(a3_0x533315(0x11c)),(0x0,core_2[a3_0x533315(0x157)])(core_2[a3_0x533315(0x129)][a3_0x533315(0xfc)])],ApicreateService),exports[a3_0x533315(0x11c)]=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
|
-
const
|
|
1
|
+
function a4_0xa916(){const _0x587b8a=['/Search\x27;\x0a\x0a','existsSync','/Create\x27;\x0a','\x20\x20\x20\x20}\x0a\x0a\x0a','/validators/','DTOUpdate\x20}\x20from\x20\x27','\x20\x20\x20\x20async\x20remove(conditions:\x20','path','36ySMDRi','DTOSearch\x20}\x20from\x20\x27','\x27)\x0a','\x20\x20\x20\x20@Action.get(\x27详情\x27,\x20\x27detail/:','@/apps/','text','/handlers/','\x20\x20\x20\x20\x20\x20\x20\x20const\x20removes\x20=\x20await\x20this.','default','3161940mmVfPq','Handler.detail(conditions);\x0a\x0a','search','dirname','apply','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(pagelist,\x20{\x20pageinfo,\x20pagetotal\x20});\x0a','.ts','\x20\x20\x20\x20\x20\x20\x20\x20const\x20conditions:\x20','DTOSearch\x20=\x20{\x20','writeFileSync','282295YfHSbl','mediumtext','8QYALbM','/controller/','\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.',')\x20{\x0a','198066fJjoGT','DTOUpdate)\x20{\x0a','\x20\x20\x20\x20async\x20detail(','97271NvoVJU','../helper','substring','Handler.remove(conditions);\x0a\x0a','1102465YxXYpm','mkdirSync','utf-8','\x27;\x0a','Field','Handler\x20}\x20from\x20\x27','6mJvNys','(((.+)+)+)+$','2QNDsdq','Controller\x20{\x0a\x0a','import\x20{\x20','string','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a','692919Xppqkc','number','__esModule','\x20\x20\x20\x20async\x20create(params:\x20','Type','getProp','@Action(__filename,\x20\x27','\x20\x20\x20\x20\x20\x20\x20\x20const\x20[pagelist,\x20pagetotal]\x20=\x20await\x20this.','toUpperCase','/Update\x27;\x0a','toString','indexOf','43374WxMalE','\x20\x20\x20\x20@Inject()\x20protected\x20','\x20\x20\x20\x20@Action.get(\x27列表\x27,\x20\x27list\x27)\x0a','Handler.create(params);\x0a\x0a','Handler:\x20','\x20};\x0a\x0a','DTOSearch)\x20{\x0a\x0a'];a4_0xa916=function(){return _0x587b8a;};return a4_0xa916();}const a4_0x545a50=a4_0x4c05;(function(_0x26c93b,_0x240aad){const _0x123866=a4_0x4c05,_0x3b9c36=_0x26c93b();while(!![]){try{const _0x494a85=parseInt(_0x123866(0x11f))/0x1*(-parseInt(_0x123866(0x12b))/0x2)+parseInt(_0x123866(0x13c))/0x3*(-parseInt(_0x123866(0x14b))/0x4)+parseInt(_0x123866(0x116))/0x5+parseInt(_0x123866(0x129))/0x6*(parseInt(_0x123866(0x123))/0x7)+parseInt(_0x123866(0x118))/0x8*(-parseInt(_0x123866(0x130))/0x9)+parseInt(_0x123866(0x10c))/0xa+parseInt(_0x123866(0x11c))/0xb;if(_0x494a85===_0x240aad)break;else _0x3b9c36['push'](_0x3b9c36['shift']());}catch(_0x5e72b5){_0x3b9c36['push'](_0x3b9c36['shift']());}}}(a4_0xa916,0x3b83a));const a4_0x4fd49d=(function(){let _0x143676=!![];return function(_0x507a77,_0x3690bf){const _0x28ab1b=_0x143676?function(){const _0x52c328=a4_0x4c05;if(_0x3690bf){const _0x277ea4=_0x3690bf[_0x52c328(0x110)](_0x507a77,arguments);return _0x3690bf=null,_0x277ea4;}}:function(){};return _0x143676=![],_0x28ab1b;};}()),a4_0xddf6c2=a4_0x4fd49d(this,function(){const _0x45fdd4=a4_0x4c05;return a4_0xddf6c2[_0x45fdd4(0x13a)]()[_0x45fdd4(0x10e)](_0x45fdd4(0x12a))[_0x45fdd4(0x13a)]()['constructor'](a4_0xddf6c2)[_0x45fdd4(0x10e)](_0x45fdd4(0x12a));});a4_0xddf6c2();function a4_0x4c05(_0x22801d,_0x402560){const _0x388baf=a4_0xa916();return a4_0x4c05=function(_0xddf6c2,_0x4fd49d){_0xddf6c2=_0xddf6c2-0x108;let _0xa91630=_0x388baf[_0xddf6c2];return _0xa91630;},a4_0x4c05(_0x22801d,_0x402560);}'use strict';Object['defineProperty'](exports,a4_0x545a50(0x132),{'value':!![]});const fs=require('fs'),path_1=require(a4_0x545a50(0x14a)),helper_1=require(a4_0x545a50(0x120));async function default_1({controller:_0x3857d4,tablestartUp:_0x4f44d6,tablestartUpShort:_0xe365c0,basedir:_0x4f70aa,Primary:_0x1ccff9,Comment:_0x2638d2,moduleName:_0x31f9a5,apporbasic:_0x380fec}){const _0x4eb42c=a4_0x545a50;if(_0x3857d4){const _0x50b134=_0x4f70aa+(typeof _0x3857d4==_0x4eb42c(0x12e)?_0x4eb42c(0x119)+_0x3857d4+'/'+_0xe365c0+_0x4eb42c(0x112):'/controller/'+_0xe365c0+_0x4eb42c(0x112));if(!fs[_0x4eb42c(0x144)](_0x50b134)){let _0x1d11a4='',_0x552dc4=[_0x4eb42c(0x108),_0x4eb42c(0x117),_0x4eb42c(0x12e)][_0x4eb42c(0x13b)]((0x0,helper_1[_0x4eb42c(0x135)])(_0x1ccff9[_0x4eb42c(0x134)]))==-0x1;_0x1d11a4+='import\x20{\x20Context\x20}\x20from\x20\x27@midwayjs/koa\x27;\x0a',_0x1d11a4+='import\x20{\x20Inject,\x20Action,\x20PageDTO\x20}\x20from\x20\x27anncic-api\x27;\x0a\x0a',_0x1d11a4+=_0x4eb42c(0x12d)+_0x4f44d6+_0x4eb42c(0x128)+(typeof _0x31f9a5==_0x4eb42c(0x12e)?_0x4eb42c(0x14f)+_0x31f9a5:'@/'+_0x380fec)+_0x4eb42c(0x109)+_0xe365c0+_0x4eb42c(0x126),_0x1d11a4+=_0x4eb42c(0x12d)+_0x4f44d6+'DTOCreate\x20}\x20from\x20\x27'+(typeof _0x31f9a5==_0x4eb42c(0x12e)?_0x4eb42c(0x14f)+_0x31f9a5:'@/'+_0x380fec)+_0x4eb42c(0x147)+_0xe365c0+_0x4eb42c(0x145),_0x1d11a4+=_0x4eb42c(0x12d)+_0x4f44d6+_0x4eb42c(0x148)+(typeof _0x31f9a5==_0x4eb42c(0x12e)?'@/apps/'+_0x31f9a5:'@/'+_0x380fec)+_0x4eb42c(0x147)+_0xe365c0+_0x4eb42c(0x139),_0x1d11a4+=_0x4eb42c(0x12d)+_0x4f44d6+_0x4eb42c(0x14c)+(typeof _0x31f9a5==_0x4eb42c(0x12e)?'@/apps/'+_0x31f9a5:'@/'+_0x380fec)+_0x4eb42c(0x147)+_0xe365c0+_0x4eb42c(0x143),_0x1d11a4+=_0x4eb42c(0x136)+_0x2638d2+_0x4eb42c(0x14d),_0x1d11a4+='export\x20class\x20'+(typeof _0x3857d4==_0x4eb42c(0x12e)?_0x3857d4[_0x4eb42c(0x121)](0x0,0x1)[_0x4eb42c(0x138)]()+_0x3857d4[_0x4eb42c(0x121)](0x1):'')+_0x4f44d6+_0x4eb42c(0x12c),_0x1d11a4+='\x20\x20\x20\x20@Inject()\x20protected\x20ctx:\x20Context;\x0a\x0a',_0x1d11a4+=_0x4eb42c(0x13d)+_0x4f44d6+_0x4eb42c(0x140)+_0x4f44d6+'Handler\x0a\x0a\x0a',_0x1d11a4+=_0x4eb42c(0x13e),_0x1d11a4+='\x20\x20\x20\x20async\x20index(conditions:\x20'+_0x4f44d6+'DTOSearch,\x20pageinfo:\x20PageDTO)\x20{\x0a\x0a',_0x1d11a4+=_0x4eb42c(0x137)+_0x4f44d6+'Handler.list(conditions,\x20pageinfo);\x0a\x0a',_0x1d11a4+=_0x4eb42c(0x111),_0x1d11a4+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x1d11a4+=_0x4eb42c(0x14e)+_0x1ccff9[_0x4eb42c(0x127)]+'\x27)\x0a',_0x1d11a4+=_0x4eb42c(0x11e)+_0x1ccff9[_0x4eb42c(0x127)]+':\x20'+(_0x552dc4?_0x4eb42c(0x131):_0x4eb42c(0x12e))+_0x4eb42c(0x11b),_0x1d11a4+=_0x4eb42c(0x113)+_0x4f44d6+_0x4eb42c(0x114)+_0x1ccff9[_0x4eb42c(0x127)]+_0x4eb42c(0x141),_0x1d11a4+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.'+_0x4f44d6+_0x4eb42c(0x10d),_0x1d11a4+=_0x4eb42c(0x12f),_0x1d11a4+=_0x4eb42c(0x146),_0x1d11a4+='\x20\x20\x20\x20@Action.post(\x27添加\x27,\x20\x27add\x27)\x0a',_0x1d11a4+=_0x4eb42c(0x133)+_0x4f44d6+'DTOCreate)\x20{\x0a\x0a',_0x1d11a4+=_0x4eb42c(0x11a)+_0x4f44d6+_0x4eb42c(0x13f),_0x1d11a4+=_0x4eb42c(0x12f),_0x1d11a4+=_0x4eb42c(0x146),_0x1d11a4+='\x20\x20\x20\x20@Action.post(\x27修改\x27,\x20\x27edit/:'+_0x1ccff9['Field']+_0x4eb42c(0x14d),_0x1d11a4+='\x20\x20\x20\x20async\x20update('+_0x1ccff9[_0x4eb42c(0x127)]+':\x20'+(_0x552dc4?'number':_0x4eb42c(0x12e))+',\x20params:\x20'+_0x4f44d6+_0x4eb42c(0x11d),_0x1d11a4+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20conditions:\x20'+_0x4f44d6+'DTOSearch\x20=\x20{\x20'+_0x1ccff9[_0x4eb42c(0x127)]+_0x4eb42c(0x141),_0x1d11a4+=_0x4eb42c(0x11a)+_0x4f44d6+'Handler.update(conditions,\x20params);\x0a\x0a',_0x1d11a4+='\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a',_0x1d11a4+=_0x4eb42c(0x146),_0x1d11a4+='\x20\x20\x20\x20@Action.post(\x22删除\x22,\x20\x27remove\x27)\x0a',_0x1d11a4+=_0x4eb42c(0x149)+_0x4f44d6+_0x4eb42c(0x142),_0x1d11a4+=_0x4eb42c(0x10a)+_0x4f44d6+_0x4eb42c(0x122),_0x1d11a4+='\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(removes);\x0a',_0x1d11a4+=_0x4eb42c(0x146),_0x1d11a4+='}',!fs[_0x4eb42c(0x144)]((0x0,path_1[_0x4eb42c(0x10f)])(_0x50b134))&&fs[_0x4eb42c(0x124)]((0x0,path_1[_0x4eb42c(0x10f)])(_0x50b134),{'recursive':!![]}),fs[_0x4eb42c(0x115)](_0x50b134,_0x1d11a4,_0x4eb42c(0x125));}}}exports[a4_0x545a50(0x10b)]=default_1;
|
|
@@ -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
|
+
function a5_0x46b8(){const _0x16328e=['existsSync','mkdirSync','dirname','toString','/exceptions/','3299670FqHhZH','589698Xugvai','\x20\x20\x20\x20@AnnEnumMsg(\x27','constructor','utf-8','apply','589204Qxzaaf','\x27)\x0a','-错误信息设置\x0a','838239asBTwN','20vWowjM','Error\x20extends\x20AnnError\x20{\x0a\x0a','Comment','\x27,\x20\x27开启','19072250BZbZPe','toUpperCase','export\x20class\x20','Enum\x20{\x0a\x0a','13292865liJApX','path','__esModule','(((.+)+)+)+$','\x20*\x20**/\x0a','288fXSalu','/**\x0a','search','/enums/','111465lFptgh','\x27,\x20\x27关闭','Type','_OFF:\x20number\x20=\x200;\x0a\x0a\x0a','\x20\x20\x20\x20static\x20readonly\x20','../helper','16XTwBEG','.ts','_ON:\x20number\x20=\x201;\x0a\x0a','\x20*\x20'];a5_0x46b8=function(){return _0x16328e;};return a5_0x46b8();}const a5_0x24d6aa=a5_0x5cbb;(function(_0x5d1f76,_0x43f3d3){const _0x251c0b=a5_0x5cbb,_0x5efcc0=_0x5d1f76();while(!![]){try{const _0x2de70a=-parseInt(_0x251c0b(0x94))/0x1+-parseInt(_0x251c0b(0x93))/0x2+-parseInt(_0x251c0b(0x9c))/0x3*(parseInt(_0x251c0b(0x9d))/0x4)+-parseInt(_0x251c0b(0x84))/0x5*(-parseInt(_0x251c0b(0x80))/0x6)+parseInt(_0x251c0b(0x99))/0x7*(parseInt(_0x251c0b(0x8a))/0x8)+parseInt(_0x251c0b(0x7b))/0x9+parseInt(_0x251c0b(0xa1))/0xa;if(_0x2de70a===_0x43f3d3)break;else _0x5efcc0['push'](_0x5efcc0['shift']());}catch(_0x4b8e67){_0x5efcc0['push'](_0x5efcc0['shift']());}}}(a5_0x46b8,0xf0ba4));const a5_0x3ff8c3=(function(){let _0x3b3fe1=!![];return function(_0x32aa9c,_0x3662df){const _0x5a77e9=_0x3b3fe1?function(){const _0x47bee1=a5_0x5cbb;if(_0x3662df){const _0x5ecd8d=_0x3662df[_0x47bee1(0x98)](_0x32aa9c,arguments);return _0x3662df=null,_0x5ecd8d;}}:function(){};return _0x3b3fe1=![],_0x5a77e9;};}()),a5_0x5b8e2f=a5_0x3ff8c3(this,function(){const _0xf07c27=a5_0x5cbb;return a5_0x5b8e2f[_0xf07c27(0x91)]()[_0xf07c27(0x82)](_0xf07c27(0x7e))['toString']()[_0xf07c27(0x96)](a5_0x5b8e2f)['search']('(((.+)+)+)+$');});a5_0x5b8e2f();'use strict';Object['defineProperty'](exports,a5_0x24d6aa(0x7d),{'value':!![]});function a5_0x5cbb(_0x3ddf57,_0x32e0f5){const _0x5282c2=a5_0x46b8();return a5_0x5cbb=function(_0x5b8e2f,_0x3ff8c3){_0x5b8e2f=_0x5b8e2f-0x78;let _0x46b897=_0x5282c2[_0x5b8e2f];return _0x46b897;},a5_0x5cbb(_0x3ddf57,_0x32e0f5);}const fs=require('fs'),path=require(a5_0x24d6aa(0x7c)),helper_1=require(a5_0x24d6aa(0x89));async function default_1({tablestartUp:_0x3457b4,tablestartUpShort:_0x186c06,basedir:_0x3953fc,Comment:_0x442e11,Fields:_0x100fca}){await entity_emum({'tablestartUp':_0x3457b4,'tablestartUpShort':_0x186c06,'basedir':_0x3953fc,'Comment':_0x442e11,'Fields':_0x100fca}),await entity_exceptions({'tablestartUp':_0x3457b4,'tablestartUpShort':_0x186c06,'basedir':_0x3953fc,'Comment':_0x442e11});}exports['default']=default_1;async function entity_emum({tablestartUp:_0x48b259,tablestartUpShort:_0x10a563,basedir:_0x4b1467,Comment:_0x2ab800,Fields:_0x2f0b60}){const _0x1797d0=a5_0x24d6aa,_0x28cbb8=_0x4b1467+(_0x1797d0(0x83)+_0x10a563+_0x1797d0(0x8b));if(!fs[_0x1797d0(0x8e)](_0x28cbb8)){let _0x9cfa30='';_0x9cfa30+=_0x1797d0(0x81),_0x9cfa30+=_0x1797d0(0x8d)+_0x2ab800+'-常量设置\x0a',_0x9cfa30+=_0x1797d0(0x7f),_0x9cfa30+=_0x1797d0(0x79)+_0x48b259+_0x1797d0(0x7a);for(let _0x4b8a9b in _0x2f0b60){let _0x597b33=_0x2f0b60[_0x4b8a9b],_0x36b169=(0x0,helper_1['getProp'])(_0x597b33[_0x1797d0(0x86)]);['tinyint']['indexOf'](_0x36b169)!=-0x1&&(_0x9cfa30+=_0x1797d0(0x95)+_0x4b8a9b+_0x1797d0(0xa0)+_0x597b33[_0x1797d0(0x9f)]+_0x1797d0(0x9a),_0x9cfa30+=_0x1797d0(0x88)+_0x4b8a9b['toUpperCase']()+_0x1797d0(0x8c),_0x9cfa30+=_0x1797d0(0x95)+_0x4b8a9b+_0x1797d0(0x85)+_0x597b33[_0x1797d0(0x9f)]+'\x27)\x0a',_0x9cfa30+=_0x1797d0(0x88)+_0x4b8a9b[_0x1797d0(0x78)]()+_0x1797d0(0x87));}_0x9cfa30+='}',!fs[_0x1797d0(0x8e)](path[_0x1797d0(0x90)](_0x28cbb8))&&fs[_0x1797d0(0x8f)](path[_0x1797d0(0x90)](_0x28cbb8),{'recursive':!![]}),fs['writeFileSync'](_0x28cbb8,_0x9cfa30,_0x1797d0(0x97));}}async function entity_exceptions({tablestartUp:_0x301054,tablestartUpShort:_0x5c8be4,basedir:_0x4a52b8,Comment:_0x2a4fa1}){const _0x1357f6=a5_0x24d6aa,_0x26af64=_0x4a52b8+(_0x1357f6(0x92)+_0x5c8be4+'.ts');if(!fs[_0x1357f6(0x8e)](_0x26af64)){let _0x4de606='';_0x4de606+=_0x1357f6(0x81),_0x4de606+=_0x1357f6(0x8d)+_0x2a4fa1+_0x1357f6(0x9b),_0x4de606+=_0x1357f6(0x7f),_0x4de606+=_0x1357f6(0x79)+_0x301054+_0x1357f6(0x9e),_0x4de606+='}',!fs[_0x1357f6(0x8e)](path[_0x1357f6(0x90)](_0x26af64))&&fs[_0x1357f6(0x8f)](path[_0x1357f6(0x90)](_0x26af64),{'recursive':!![]}),fs['writeFileSync'](_0x26af64,_0x4de606,'utf-8');}}
|
|
@@ -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_0x18ccc6=a6_0x2b78;(function(_0x36b1b6,_0x21c45d){const _0x36764e=a6_0x2b78,_0x35452a=_0x36b1b6();while(!![]){try{const _0x339412=parseInt(_0x36764e(0xd2))/0x1+-parseInt(_0x36764e(0xe8))/0x2+parseInt(_0x36764e(0x106))/0x3+-parseInt(_0x36764e(0xd0))/0x4+-parseInt(_0x36764e(0xf4))/0x5*(-parseInt(_0x36764e(0xbc))/0x6)+-parseInt(_0x36764e(0xb5))/0x7+parseInt(_0x36764e(0x102))/0x8;if(_0x339412===_0x21c45d)break;else _0x35452a['push'](_0x35452a['shift']());}catch(_0x5612c3){_0x35452a['push'](_0x35452a['shift']());}}}(a6_0x2887,0x74486));const a6_0x43d58e=(function(){let _0x505d7e=!![];return function(_0x1d5ffe,_0x838fb0){const _0xdffc47=_0x505d7e?function(){const _0x27eb97=a6_0x2b78;if(_0x838fb0){const _0xac6426=_0x838fb0[_0x27eb97(0xdd)](_0x1d5ffe,arguments);return _0x838fb0=null,_0xac6426;}}:function(){};return _0x505d7e=![],_0xdffc47;};}()),a6_0x192fcc=a6_0x43d58e(this,function(){const _0x53923d=a6_0x2b78;return a6_0x192fcc[_0x53923d(0xed)]()['search']('(((.+)+)+)+$')[_0x53923d(0xed)]()[_0x53923d(0xbe)](a6_0x192fcc)[_0x53923d(0xef)](_0x53923d(0xd7));});a6_0x192fcc();'use strict';function a6_0x2887(){const _0x2c6269=['\x20\x20\x20\x20@Column(\x27text\x27,\x20{\x20comment:\x20\x27','number','\x20\x20\x20\x20@Column(\x27decimal\x27,\x20{\x20comment:\x20\x27','false','/entities/','9250296qPDjED','YES','existsSync','/entity\x27;\x0a\x0a','1479132YZgjrf','/searchs/','Comment','\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27','\x20*\x20**/\x0a','Field','\x27,\x20nullable:\x20','@ProvideRepository(','\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','deleted_at','displayorder','getProp','\x20\x20\x20\x20@Column(\x27tinyint\x27,\x20{\x20comment:\x20\x27','import\x20{\x20ProvideEntity,\x20ProvideSearch,\x20','Search)\x0a','dirname','replace','\x20\x20\x20\x20created_at:\x20Date;\x0a\x0a','\x20\x20\x20\x20@Column(\x27double\x27,\x20{\x20comment:\x20\x27','path',':\x20any\x20|\x20any[];\x0a\x0a','\x20})\x0a','5297425CdpJye','/index.ts','import\x20{\x20','\x20\x20\x20\x20','date','\x20\x20\x20\x20@Column(\x27date\x27,\x20{\x20comment:\x20\x27','text','8886YnlJSW','\x20\x20\x20\x20@UpdateDateColumn({\x20comment:\x20\x27修改时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','constructor','longtext','double','@/apps/',':\x20string;\x0a\x0a','mediumtext','enum','Entity\x20{\x0a\x0a','\x20\x20\x20\x20@Column(\x27mediumtext\x27,\x20{\x20comment:\x20\x27','@ProvideEntity({\x20tableName:\x20\x27','\x27,\x20enum:\x20[\x27','PrimaryColumn','@ProvideSearch(','import\x20{\x20CreateDateColumn,\x20UpdateDateColumn,\x20DeleteDateColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','/entity.ts','\x27,\x20default:\x20\x27','../helper','__esModule','1210780rndhLH','\x27;\x0a\x0a','19345WDfdWy','Type','\x27\x20},\x20{\x20orderBy:\x20{\x20displayorder:\x20\x27DESC\x27\x20}\x20})\x0a','writeFileSync','%column%','(((.+)+)+)+$','\x20\x20\x20\x20@DeleteDateColumn({\x20comment:\x20\x27删除时间\x27,\x20type:\x20\x27timestamp\x27,\x20select:\x20false\x20})\x0a','export\x20class\x20','\x27,\x20length:\x20188\x20})\x0a','\x20\x20\x20\x20@Column(\x27json\x27,\x20{\x20comment:\x20\x27','Entity\x20}\x20from\x20\x27','apply','default','join','Null',',\x20Column\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a','/**\x0a','float','\x20extends\x20Repository<',',\x20unique:\x20false\x20})\x0a','\x20\x20\x20\x20@PrimaryColumn({\x20comment:\x20\x27','timestamp','1530598OQApGd','\x27,\x20precision:\x2024,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','string','\x20\x20\x20\x20@Column({\x20comment:\x20\x27','datetime','toString','true','search','//\x20import\x20{\x20ManyToOne,\x20JoinColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','\x27\x20|\x20\x27','\x20*\x20','import\x20{\x20ProvideRepository,\x20Repository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','2135shcsji','\x20\x20\x20\x20@Column(\x27float\x27,\x20{\x20comment:\x20\x27','Entity)\x0a','\x20\x20\x20\x20deleted_at:\x20Date;\x0a\x0a',':\x20number;\x0a\x0a','updated_at','indexOf','utf-8','mkdirSync'];a6_0x2887=function(){return _0x2c6269;};return a6_0x2887();}Object['defineProperty'](exports,a6_0x18ccc6(0xcf),{'value':!![]});const fs=require('fs'),path_1=require(a6_0x18ccc6(0xb2)),helper_1=require(a6_0x18ccc6(0xce));function a6_0x2b78(_0x8c360c,_0x2728f6){const _0x22781b=a6_0x2887();return a6_0x2b78=function(_0x192fcc,_0x43d58e){_0x192fcc=_0x192fcc-0xb1;let _0x288786=_0x22781b[_0x192fcc];return _0x288786;},a6_0x2b78(_0x8c360c,_0x2728f6);}async function default_1({tablename:_0x31524a,tablestartUp:_0x58a2d6,tablestartUpShort:_0x4f4062,basedir:_0x123c44,Primary:_0x5836c3,Fields:_0x28d325,Comment:_0x3888a6,moduleName:_0x54d5,apporbasic:_0xca0f6b}){await entity({'tablename':_0x31524a,'tablestartUp':_0x58a2d6,'tablestartUpShort':_0x4f4062,'basedir':_0x123c44,'Primary':_0x5836c3,'Fields':_0x28d325,'Comment':_0x3888a6,'moduleName':_0x54d5,'apporbasic':_0xca0f6b}),await repository({'tablestartUp':_0x58a2d6,'tablestartUpShort':_0x4f4062,'basedir':_0x123c44,'Comment':_0x3888a6,'moduleName':_0x54d5,'apporbasic':_0xca0f6b});}exports[a6_0x18ccc6(0xde)]=default_1;async function entity({tablename:_0x18fe1a,tablestartUp:_0x4751eb,tablestartUpShort:_0x2bc0cd,basedir:_0x2f254e,Primary:_0x27d182,Fields:_0x3c76c9,Comment:_0x29be61,moduleName:_0x598d62,apporbasic:_0x38224d}){const _0x409a07=a6_0x18ccc6,_0x3f846c=_0x2f254e+(_0x409a07(0x101)+_0x2bc0cd+_0x409a07(0xcc));if(!fs['existsSync'](_0x3f846c)){let _0x22187a='',_0x2a4145='',_0x472e0b=['text',_0x409a07(0xc3),_0x409a07(0xea)][_0x409a07(0xfa)]((0x0,helper_1[_0x409a07(0x111)])(_0x27d182[_0x409a07(0xd3)]))==-0x1;_0x472e0b?(_0x22187a+='\x20\x20\x20\x20@PrimaryGeneratedColumn()\x0a',_0x22187a+='\x20\x20\x20\x20'+_0x27d182[_0x409a07(0x10b)]+':\x20number;\x0a\x0a'):(_0x22187a+=_0x409a07(0xe6)+(_0x27d182[_0x409a07(0x108)]||'标识')+_0x409a07(0xda),_0x22187a+='\x20\x20\x20\x20'+_0x27d182[_0x409a07(0x10b)]+_0x409a07(0xc2));for(let _0x596fe0 in _0x3c76c9){let _0x35d834=_0x3c76c9[_0x596fe0],_0x5105e5=(0x0,helper_1[_0x409a07(0x111)])(_0x35d834[_0x409a07(0xd3)]);if(_0x35d834['Field']==_0x409a07(0x110)||_0x35d834[_0x409a07(0x10b)]=='created_at'||_0x35d834['Field']==_0x409a07(0xf9)||_0x35d834['Field']==_0x409a07(0x10f))continue;if(_0x5105e5=='json')_0x22187a+=_0x409a07(0xdb)+_0x35d834['Comment']+'\x27,\x20nullable:\x20'+(_0x35d834['Null']==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+_0x409a07(0xe5),_0x22187a+=_0x409a07(0xb8)+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xb3);else{if(_0x5105e5==_0x409a07(0xc4)){let _0x28bcb4=(0x0,helper_1['getEnum'])(_0x35d834[_0x409a07(0xd3)]);_0x22187a+='\x20\x20\x20\x20@Column(\x27enum\x27,\x20{\x20comment:\x20\x27'+_0x35d834[_0x409a07(0x108)]+_0x409a07(0xcd)+(_0x28bcb4[0x0]||'')+_0x409a07(0xc8)+_0x28bcb4[_0x409a07(0xdf)]('\x27,\x20\x27')+'\x27]\x20})\x0a',_0x22187a+=_0x409a07(0xb8)+_0x35d834['Field']+':\x20\x27'+_0x28bcb4[_0x409a07(0xdf)](_0x409a07(0xf1))+_0x409a07(0xd1);}else{if(_0x5105e5==_0x409a07(0xe3))_0x22187a+=_0x409a07(0xf5)+_0x35d834['Comment']+_0x409a07(0x10e)+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+_0x409a07(0xb4),_0x22187a+=_0x409a07(0xb8)+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xf8);else{if(_0x5105e5==_0x409a07(0xc0))_0x22187a+=_0x409a07(0xb1)+_0x35d834[_0x409a07(0x108)]+_0x409a07(0x10e)+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+_0x409a07(0xb4),_0x22187a+='\x20\x20\x20\x20'+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xf8);else{if(_0x5105e5=='decimal')_0x22187a+=_0x409a07(0xff)+_0x35d834[_0x409a07(0x108)]+_0x409a07(0xe9)+(_0x35d834['Null']==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+'\x20})\x0a',_0x22187a+='\x20\x20\x20\x20'+_0x35d834[_0x409a07(0x10b)]+':\x20number;\x0a\x0a';else{if(_0x5105e5==_0x409a07(0xfe))_0x22187a+=_0x409a07(0xeb)+_0x35d834['Comment']+_0x409a07(0x10c)+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?_0x409a07(0xee):'false')+_0x409a07(0xe5),_0x22187a+='\x20\x20\x20\x20'+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xf8);else{if(_0x5105e5=='tinyint')_0x22187a+=_0x409a07(0x112)+_0x35d834[_0x409a07(0x108)]+_0x409a07(0x10c)+(_0x35d834['Null']==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+_0x409a07(0xe5),_0x22187a+=_0x409a07(0xb8)+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xf8);else{if(_0x5105e5==_0x409a07(0xb9))_0x22187a+=_0x409a07(0xba)+_0x35d834[_0x409a07(0x108)]+_0x409a07(0x10c)+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?'true':_0x409a07(0x100))+_0x409a07(0xb4),_0x22187a+=_0x409a07(0xb8)+_0x35d834['Field']+_0x409a07(0xc2);else{if(_0x5105e5==_0x409a07(0xec))_0x22187a+=_0x409a07(0x109)+_0x35d834[_0x409a07(0x108)]+'\x27,\x20nullable:\x20'+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+'\x20})\x0a',_0x22187a+=_0x409a07(0xb8)+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xc2);else{if(_0x5105e5==_0x409a07(0xe7))_0x22187a+=_0x409a07(0x109)+_0x35d834[_0x409a07(0x108)]+'\x27,\x20nullable:\x20'+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?'true':_0x409a07(0x100))+_0x409a07(0xb4),_0x22187a+='\x20\x20\x20\x20'+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xc2);else{if(_0x5105e5==_0x409a07(0xbb))_0x22187a+=_0x409a07(0xfd)+_0x35d834['Comment']+'\x27,\x20nullable:\x20'+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?'true':_0x409a07(0x100))+_0x409a07(0xe5),_0x22187a+=_0x409a07(0xb8)+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xc2);else{if(_0x5105e5==_0x409a07(0xbf))_0x22187a+='\x20\x20\x20\x20@Column(\x27longtext\x27,\x20{\x20comment:\x20\x27'+_0x35d834['Comment']+_0x409a07(0x10c)+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+_0x409a07(0xe5),_0x22187a+=_0x409a07(0xb8)+_0x35d834['Field']+_0x409a07(0xc2);else _0x5105e5==_0x409a07(0xc3)?(_0x22187a+=_0x409a07(0xc6)+_0x35d834[_0x409a07(0x108)]+_0x409a07(0x10c)+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+',\x20unique:\x20false\x20})\x0a',_0x22187a+=_0x409a07(0xb8)+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xc2)):(_0x22187a+='\x20\x20\x20\x20@Column({\x20comment:\x20\x27'+_0x35d834[_0x409a07(0x108)]+_0x409a07(0x10c)+(_0x35d834[_0x409a07(0xe0)]==_0x409a07(0x103)?_0x409a07(0xee):_0x409a07(0x100))+_0x409a07(0xe5),_0x22187a+=_0x409a07(0xb8)+_0x35d834[_0x409a07(0x10b)]+_0x409a07(0xc2));}}}}}}}}}}}}_0x2a4145+=_0x409a07(0xf0),_0x2a4145+=_0x409a07(0xcb),_0x2a4145+=_0x409a07(0x113)+(_0x472e0b?'PrimaryGeneratedColumn':_0x409a07(0xc9))+_0x409a07(0xe1),_0x2a4145+=_0x409a07(0xb7)+_0x4751eb+'Search\x20}\x20from\x20\x27'+(typeof _0x598d62==_0x409a07(0xea)?'@/apps/'+_0x598d62:'@/'+_0x38224d)+_0x409a07(0x107)+_0x2bc0cd+_0x409a07(0xd1),_0x2a4145+=_0x409a07(0xe2),_0x2a4145+=_0x409a07(0xf2)+_0x29be61+'-实体\x0a',_0x2a4145+='\x20*\x20**/\x0a',_0x2a4145+=_0x409a07(0xca)+_0x4751eb+_0x409a07(0x114),_0x2a4145+=_0x409a07(0xc7)+_0x18fe1a+_0x409a07(0xd4),_0x2a4145+=_0x409a07(0xd9)+_0x4751eb+_0x409a07(0xc5),_0x2a4145+=_0x409a07(0xd6),_0x2a4145+='\x20\x20\x20\x20@Column({\x20comment:\x20\x27默认显示排序\x27,\x20nullable:\x20true,\x20unique:\x20false\x20})\x0a',_0x2a4145+='\x20\x20\x20\x20displayorder:\x20number;\x0a\x0a',_0x2a4145+='\x20\x20\x20\x20@CreateDateColumn({\x20comment:\x20\x27创建时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a',_0x2a4145+=_0x409a07(0x117),_0x2a4145+=_0x409a07(0xbd),_0x2a4145+='\x20\x20\x20\x20updated_at:\x20Date;\x0a\x0a',_0x2a4145+=_0x409a07(0xd8),_0x2a4145+=_0x409a07(0xf7),_0x2a4145+='}',_0x2a4145=_0x2a4145[_0x409a07(0x116)](_0x409a07(0xd6),_0x22187a),!fs[_0x409a07(0x104)]((0x0,path_1[_0x409a07(0x115)])(_0x3f846c))&&fs[_0x409a07(0xfc)]((0x0,path_1['dirname'])(_0x3f846c),{'recursive':!![]}),fs[_0x409a07(0xd5)](_0x3f846c,_0x2a4145,_0x409a07(0xfb));}}async function repository({tablestartUp:_0x5c978f,tablestartUpShort:_0x3e5f6b,basedir:_0x5df830,Comment:_0x3cc120,moduleName:_0x4768e7,apporbasic:_0x26fe65}){const _0x52b515=a6_0x18ccc6,_0x2a2337=_0x5df830+('/entities/'+_0x3e5f6b+_0x52b515(0xb6));if(!fs[_0x52b515(0x104)](_0x2a2337)){let _0x5ea161='';_0x5ea161+='/**\x0a',_0x5ea161+=_0x52b515(0xf2)+_0x3cc120+'-实体处理器\x0a',_0x5ea161+=_0x52b515(0x10a),_0x5ea161+=_0x52b515(0xf3),_0x5ea161+=_0x52b515(0xb7)+_0x5c978f+_0x52b515(0xdc)+(typeof _0x4768e7==_0x52b515(0xea)?_0x52b515(0xc1)+_0x4768e7:'@/'+_0x26fe65)+_0x52b515(0x101)+_0x3e5f6b+_0x52b515(0x105),_0x5ea161+=_0x52b515(0x10d)+_0x5c978f+_0x52b515(0xf6),_0x5ea161+=_0x52b515(0xd9)+_0x5c978f+_0x52b515(0xe4)+_0x5c978f+'Entity>{\x0a\x0a',_0x5ea161+='}',!fs[_0x52b515(0x104)]((0x0,path_1[_0x52b515(0x115)])(_0x2a2337))&&fs['mkdirSync']((0x0,path_1['dirname'])(_0x2a2337),{'recursive':!![]}),fs[_0x52b515(0xd5)](_0x2a2337,_0x5ea161,_0x52b515(0xfb));}}
|
|
1
|
+
function a6_0x1ba7(){const _0x421504=['existsSync','search','displayorder','\x20\x20\x20\x20@Column(\x27date\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27double\x27,\x20{\x20comment:\x20\x27','\x27,\x20length:\x20188\x20})\x0a','@ProvideEntity({\x20tableName:\x20\x27','updated_at','\x20\x20\x20\x20@Column(\x27longtext\x27,\x20{\x20comment:\x20\x27','__esModule','date','path','6zyetYL','4389sGPinl','export\x20class\x20','\x27,\x20enum:\x20[\x27','%column%','number','\x20*\x20**/\x0a','enum','@ProvideSearch(','/entity\x27;\x0a\x0a','json','datetime','\x20\x20\x20\x20@UpdateDateColumn({\x20comment:\x20\x27修改时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','\x27,\x20precision:\x2024,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','dirname','62823QsuWfe','\x20\x20\x20\x20updated_at:\x20Date;\x0a\x0a',':\x20number;\x0a\x0a','\x20\x20\x20\x20@Column({\x20comment:\x20\x27','import\x20{\x20','\x27,\x20precision:\x2010,\x20scale:\x202,\x20default:\x200.00,\x20nullable:\x20','\x20\x20\x20\x20@CreateDateColumn({\x20comment:\x20\x27创建时间\x27,\x20type:\x20\x27timestamp\x27\x20})\x0a','Field','384wPAasG','@/apps/','4dzNpVZ',',\x20Column\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a','string','true','/index.ts','replace','Type','\x20\x20\x20\x20','\x20\x20\x20\x20deleted_at:\x20Date;\x0a\x0a','\x27\x20|\x20\x27','/searchs/','4448381SLZzwh','Search)\x0a','\x27,\x20nullable:\x20','/entity.ts','\x20*\x20',',\x20unique:\x20false\x20})\x0a','created_at','toString','PrimaryGeneratedColumn','Entity\x20}\x20from\x20\x27','\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27decimal\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@DeleteDateColumn({\x20comment:\x20\x27删除时间\x27,\x20type:\x20\x27timestamp\x27,\x20select:\x20false\x20})\x0a','\x20\x20\x20\x20@PrimaryColumn({\x20comment:\x20\x27','float','//\x20import\x20{\x20ManyToOne,\x20JoinColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','\x20\x20\x20\x20@Column(\x27enum\x27,\x20{\x20comment:\x20\x27','\x20\x20\x20\x20@Column(\x27tinyint\x27,\x20{\x20comment:\x20\x27','550355uAiVxT','indexOf','apply','writeFileSync','27740msKIXX','getEnum','\x27,\x20default:\x20\x27','import\x20{\x20ProvideEntity,\x20ProvideSearch,\x20','439800zdOwLo','\x27;\x0a\x0a','55ivmYOH','constructor','-实体处理器\x0a','Entity)\x0a','Entity>{\x0a\x0a','\x20\x20\x20\x20@Column({\x20comment:\x20\x27默认显示排序\x27,\x20nullable:\x20true,\x20unique:\x20false\x20})\x0a','import\x20{\x20CreateDateColumn,\x20UpdateDateColumn,\x20DeleteDateColumn\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','358dQEKqr','\x20\x20\x20\x20displayorder:\x20number;\x0a\x0a','../helper','defineProperty','false','\x20\x20\x20\x20@Column(\x27json\x27,\x20{\x20comment:\x20\x27',':\x20string;\x0a\x0a','import\x20{\x20ProvideRepository,\x20Repository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','YES','\x20\x20\x20\x20@PrimaryGeneratedColumn()\x0a','timestamp','getProp','\x20})\x0a','4381895wWhnbs','mkdirSync','Comment','utf-8','/**\x0a','join','/entities/','text','Null','18QnYmzP','longtext','\x20\x20\x20\x20@Column(\x27text\x27,\x20{\x20comment:\x20\x27'];a6_0x1ba7=function(){return _0x421504;};return a6_0x1ba7();}const a6_0x409f53=a6_0x2c2a;(function(_0xd58b0e,_0x1f25d4){const _0x56e3bb=a6_0x2c2a,_0x31e1ad=_0xd58b0e();while(!![]){try{const _0x292654=parseInt(_0x56e3bb(0x1ce))/0x1*(-parseInt(_0x56e3bb(0x1a8))/0x2)+-parseInt(_0x56e3bb(0x1dc))/0x3*(-parseInt(_0x56e3bb(0x17a))/0x4)+-parseInt(_0x56e3bb(0x1b5))/0x5*(parseInt(_0x56e3bb(0x1cd))/0x6)+parseInt(_0x56e3bb(0x185))/0x7+parseInt(_0x56e3bb(0x19f))/0x8*(parseInt(_0x56e3bb(0x1be))/0x9)+parseInt(_0x56e3bb(0x19b))/0xa*(parseInt(_0x56e3bb(0x1a1))/0xb)+parseInt(_0x56e3bb(0x178))/0xc*(parseInt(_0x56e3bb(0x197))/0xd);if(_0x292654===_0x1f25d4)break;else _0x31e1ad['push'](_0x31e1ad['shift']());}catch(_0x102aa1){_0x31e1ad['push'](_0x31e1ad['shift']());}}}(a6_0x1ba7,0x7377a));const a6_0x538c5b=(function(){let _0x6d5630=!![];return function(_0x1a029d,_0x2ccf19){const _0x18b27a=_0x6d5630?function(){const _0x5de606=a6_0x2c2a;if(_0x2ccf19){const _0x5078c1=_0x2ccf19[_0x5de606(0x199)](_0x1a029d,arguments);return _0x2ccf19=null,_0x5078c1;}}:function(){};return _0x6d5630=![],_0x18b27a;};}()),a6_0x3ac078=a6_0x538c5b(this,function(){const _0x259e23=a6_0x2c2a;return a6_0x3ac078[_0x259e23(0x18c)]()[_0x259e23(0x1c2)]('(((.+)+)+)+$')[_0x259e23(0x18c)]()[_0x259e23(0x1a2)](a6_0x3ac078)[_0x259e23(0x1c2)]('(((.+)+)+)+$');});a6_0x3ac078();'use strict';Object[a6_0x409f53(0x1ab)](exports,a6_0x409f53(0x1ca),{'value':!![]});const fs=require('fs'),path_1=require(a6_0x409f53(0x1cc)),helper_1=require(a6_0x409f53(0x1aa));async function default_1({tablename:_0x2a4ba8,tablestartUp:_0x156d2d,tablestartUpShort:_0x44aa78,basedir:_0x71a99b,Primary:_0x3c0628,Fields:_0x551889,Comment:_0x26ffa8,moduleName:_0x445feb,apporbasic:_0x25cb1f}){await entity({'tablename':_0x2a4ba8,'tablestartUp':_0x156d2d,'tablestartUpShort':_0x44aa78,'basedir':_0x71a99b,'Primary':_0x3c0628,'Fields':_0x551889,'Comment':_0x26ffa8,'moduleName':_0x445feb,'apporbasic':_0x25cb1f}),await repository({'tablestartUp':_0x156d2d,'tablestartUpShort':_0x44aa78,'basedir':_0x71a99b,'Comment':_0x26ffa8,'moduleName':_0x445feb,'apporbasic':_0x25cb1f});}function a6_0x2c2a(_0x58ea48,_0x31e568){const _0x37186a=a6_0x1ba7();return a6_0x2c2a=function(_0x3ac078,_0x538c5b){_0x3ac078=_0x3ac078-0x178;let _0x1ba7ec=_0x37186a[_0x3ac078];return _0x1ba7ec;},a6_0x2c2a(_0x58ea48,_0x31e568);}exports['default']=default_1;async function entity({tablename:_0x2fd5f8,tablestartUp:_0x31b4b1,tablestartUpShort:_0x120a65,basedir:_0x48cd03,Primary:_0x176719,Fields:_0x3c99e9,Comment:_0x342927,moduleName:_0x4e6ccc,apporbasic:_0x5ccc20}){const _0x3cd547=a6_0x409f53,_0x445d0b=_0x48cd03+(_0x3cd547(0x1bb)+_0x120a65+_0x3cd547(0x188));if(!fs[_0x3cd547(0x1c1)](_0x445d0b)){let _0x610f71='',_0x572917='',_0x11ef84=[_0x3cd547(0x1bc),'mediumtext','string'][_0x3cd547(0x198)]((0x0,helper_1['getProp'])(_0x176719[_0x3cd547(0x180)]))==-0x1;_0x11ef84?(_0x610f71+=_0x3cd547(0x1b1),_0x610f71+=_0x3cd547(0x181)+_0x176719['Field']+_0x3cd547(0x1de)):(_0x610f71+=_0x3cd547(0x192)+(_0x176719[_0x3cd547(0x1b7)]||'标识')+_0x3cd547(0x1c6),_0x610f71+=_0x3cd547(0x181)+_0x176719[_0x3cd547(0x1e3)]+_0x3cd547(0x1ae));for(let _0x2d2bff in _0x3c99e9){let _0x598bc0=_0x3c99e9[_0x2d2bff],_0x56d17e=(0x0,helper_1[_0x3cd547(0x1b3)])(_0x598bc0[_0x3cd547(0x180)]);if(_0x598bc0[_0x3cd547(0x1e3)]==_0x3cd547(0x1c3)||_0x598bc0[_0x3cd547(0x1e3)]==_0x3cd547(0x18b)||_0x598bc0[_0x3cd547(0x1e3)]==_0x3cd547(0x1c8)||_0x598bc0[_0x3cd547(0x1e3)]=='deleted_at')continue;if(_0x56d17e==_0x3cd547(0x1d7))_0x610f71+=_0x3cd547(0x1ad)+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x187)+(_0x598bc0[_0x3cd547(0x1bd)]==_0x3cd547(0x1b0)?_0x3cd547(0x17d):_0x3cd547(0x1ac))+_0x3cd547(0x18a),_0x610f71+=_0x3cd547(0x181)+_0x598bc0[_0x3cd547(0x1e3)]+':\x20any\x20|\x20any[];\x0a\x0a';else{if(_0x56d17e==_0x3cd547(0x1d4)){let _0x310f7c=(0x0,helper_1[_0x3cd547(0x19c)])(_0x598bc0[_0x3cd547(0x180)]);_0x610f71+=_0x3cd547(0x195)+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x19d)+(_0x310f7c[0x0]||'')+_0x3cd547(0x1d0)+_0x310f7c[_0x3cd547(0x1ba)]('\x27,\x20\x27')+'\x27]\x20})\x0a',_0x610f71+=_0x3cd547(0x181)+_0x598bc0[_0x3cd547(0x1e3)]+':\x20\x27'+_0x310f7c[_0x3cd547(0x1ba)](_0x3cd547(0x183))+_0x3cd547(0x1a0);}else{if(_0x56d17e==_0x3cd547(0x193))_0x610f71+='\x20\x20\x20\x20@Column(\x27float\x27,\x20{\x20comment:\x20\x27'+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x1e1)+(_0x598bc0[_0x3cd547(0x1bd)]==_0x3cd547(0x1b0)?_0x3cd547(0x17d):_0x3cd547(0x1ac))+'\x20})\x0a',_0x610f71+=_0x3cd547(0x181)+_0x598bc0[_0x3cd547(0x1e3)]+':\x20number;\x0a\x0a';else{if(_0x56d17e=='double')_0x610f71+=_0x3cd547(0x1c5)+_0x598bc0['Comment']+_0x3cd547(0x1e1)+(_0x598bc0[_0x3cd547(0x1bd)]=='YES'?_0x3cd547(0x17d):'false')+_0x3cd547(0x1b4),_0x610f71+=_0x3cd547(0x181)+_0x598bc0['Field']+_0x3cd547(0x1de);else{if(_0x56d17e=='decimal')_0x610f71+=_0x3cd547(0x190)+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x1da)+(_0x598bc0['Null']==_0x3cd547(0x1b0)?_0x3cd547(0x17d):_0x3cd547(0x1ac))+'\x20})\x0a',_0x610f71+='\x20\x20\x20\x20'+_0x598bc0[_0x3cd547(0x1e3)]+_0x3cd547(0x1de);else{if(_0x56d17e==_0x3cd547(0x1d2))_0x610f71+=_0x3cd547(0x1df)+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x187)+(_0x598bc0['Null']=='YES'?'true':'false')+_0x3cd547(0x18a),_0x610f71+='\x20\x20\x20\x20'+_0x598bc0[_0x3cd547(0x1e3)]+_0x3cd547(0x1de);else{if(_0x56d17e=='tinyint')_0x610f71+=_0x3cd547(0x196)+_0x598bc0[_0x3cd547(0x1b7)]+'\x27,\x20nullable:\x20'+(_0x598bc0[_0x3cd547(0x1bd)]=='YES'?_0x3cd547(0x17d):'false')+',\x20unique:\x20false\x20})\x0a',_0x610f71+='\x20\x20\x20\x20'+_0x598bc0[_0x3cd547(0x1e3)]+':\x20number;\x0a\x0a';else{if(_0x56d17e==_0x3cd547(0x1cb))_0x610f71+=_0x3cd547(0x1c4)+_0x598bc0['Comment']+_0x3cd547(0x187)+(_0x598bc0[_0x3cd547(0x1bd)]==_0x3cd547(0x1b0)?'true':'false')+_0x3cd547(0x1b4),_0x610f71+=_0x3cd547(0x181)+_0x598bc0[_0x3cd547(0x1e3)]+':\x20string;\x0a\x0a';else{if(_0x56d17e==_0x3cd547(0x1d8))_0x610f71+=_0x3cd547(0x18f)+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x187)+(_0x598bc0[_0x3cd547(0x1bd)]=='YES'?_0x3cd547(0x17d):'false')+_0x3cd547(0x1b4),_0x610f71+='\x20\x20\x20\x20'+_0x598bc0[_0x3cd547(0x1e3)]+_0x3cd547(0x1ae);else{if(_0x56d17e==_0x3cd547(0x1b2))_0x610f71+='\x20\x20\x20\x20@Column(\x27timestamp\x27,\x20{\x20comment:\x20\x27'+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x187)+(_0x598bc0[_0x3cd547(0x1bd)]==_0x3cd547(0x1b0)?_0x3cd547(0x17d):'false')+_0x3cd547(0x1b4),_0x610f71+=_0x3cd547(0x181)+_0x598bc0[_0x3cd547(0x1e3)]+':\x20string;\x0a\x0a';else{if(_0x56d17e==_0x3cd547(0x1bc))_0x610f71+=_0x3cd547(0x1c0)+_0x598bc0[_0x3cd547(0x1b7)]+_0x3cd547(0x187)+(_0x598bc0['Null']==_0x3cd547(0x1b0)?_0x3cd547(0x17d):_0x3cd547(0x1ac))+',\x20unique:\x20false\x20})\x0a',_0x610f71+=_0x3cd547(0x181)+_0x598bc0[_0x3cd547(0x1e3)]+_0x3cd547(0x1ae);else{if(_0x56d17e==_0x3cd547(0x1bf))_0x610f71+=_0x3cd547(0x1c9)+_0x598bc0[_0x3cd547(0x1b7)]+'\x27,\x20nullable:\x20'+(_0x598bc0[_0x3cd547(0x1bd)]==_0x3cd547(0x1b0)?'true':_0x3cd547(0x1ac))+_0x3cd547(0x18a),_0x610f71+=_0x3cd547(0x181)+_0x598bc0[_0x3cd547(0x1e3)]+_0x3cd547(0x1ae);else _0x56d17e=='mediumtext'?(_0x610f71+='\x20\x20\x20\x20@Column(\x27mediumtext\x27,\x20{\x20comment:\x20\x27'+_0x598bc0[_0x3cd547(0x1b7)]+'\x27,\x20nullable:\x20'+(_0x598bc0[_0x3cd547(0x1bd)]==_0x3cd547(0x1b0)?_0x3cd547(0x17d):_0x3cd547(0x1ac))+',\x20unique:\x20false\x20})\x0a',_0x610f71+='\x20\x20\x20\x20'+_0x598bc0[_0x3cd547(0x1e3)]+_0x3cd547(0x1ae)):(_0x610f71+=_0x3cd547(0x1df)+_0x598bc0[_0x3cd547(0x1b7)]+'\x27,\x20nullable:\x20'+(_0x598bc0[_0x3cd547(0x1bd)]=='YES'?_0x3cd547(0x17d):'false')+_0x3cd547(0x18a),_0x610f71+='\x20\x20\x20\x20'+_0x598bc0[_0x3cd547(0x1e3)]+_0x3cd547(0x1ae));}}}}}}}}}}}}_0x572917+=_0x3cd547(0x194),_0x572917+=_0x3cd547(0x1a7),_0x572917+=_0x3cd547(0x19e)+(_0x11ef84?_0x3cd547(0x18d):'PrimaryColumn')+_0x3cd547(0x17b),_0x572917+=_0x3cd547(0x1e0)+_0x31b4b1+'Search\x20}\x20from\x20\x27'+(typeof _0x4e6ccc==_0x3cd547(0x17c)?'@/apps/'+_0x4e6ccc:'@/'+_0x5ccc20)+_0x3cd547(0x184)+_0x120a65+'\x27;\x0a\x0a',_0x572917+=_0x3cd547(0x1b9),_0x572917+=_0x3cd547(0x189)+_0x342927+'-实体\x0a',_0x572917+=_0x3cd547(0x1d3),_0x572917+=_0x3cd547(0x1d5)+_0x31b4b1+_0x3cd547(0x186),_0x572917+=_0x3cd547(0x1c7)+_0x2fd5f8+'\x27\x20},\x20{\x20orderBy:\x20{\x20displayorder:\x20\x27DESC\x27\x20}\x20})\x0a',_0x572917+='export\x20class\x20'+_0x31b4b1+'Entity\x20{\x0a\x0a',_0x572917+=_0x3cd547(0x1d1),_0x572917+=_0x3cd547(0x1a6),_0x572917+=_0x3cd547(0x1a9),_0x572917+=_0x3cd547(0x1e2),_0x572917+='\x20\x20\x20\x20created_at:\x20Date;\x0a\x0a',_0x572917+=_0x3cd547(0x1d9),_0x572917+=_0x3cd547(0x1dd),_0x572917+=_0x3cd547(0x191),_0x572917+=_0x3cd547(0x182),_0x572917+='}',_0x572917=_0x572917[_0x3cd547(0x17f)]('%column%',_0x610f71),!fs[_0x3cd547(0x1c1)]((0x0,path_1[_0x3cd547(0x1db)])(_0x445d0b))&&fs[_0x3cd547(0x1b6)]((0x0,path_1[_0x3cd547(0x1db)])(_0x445d0b),{'recursive':!![]}),fs[_0x3cd547(0x19a)](_0x445d0b,_0x572917,_0x3cd547(0x1b8));}}async function repository({tablestartUp:_0x352963,tablestartUpShort:_0x2bdffa,basedir:_0x4b4137,Comment:_0x4a87de,moduleName:_0x1cbeb6,apporbasic:_0x5e7d42}){const _0x421b7e=a6_0x409f53,_0x363e5e=_0x4b4137+(_0x421b7e(0x1bb)+_0x2bdffa+_0x421b7e(0x17e));if(!fs['existsSync'](_0x363e5e)){let _0xecd4c3='';_0xecd4c3+=_0x421b7e(0x1b9),_0xecd4c3+=_0x421b7e(0x189)+_0x4a87de+_0x421b7e(0x1a3),_0xecd4c3+=_0x421b7e(0x1d3),_0xecd4c3+=_0x421b7e(0x1af),_0xecd4c3+=_0x421b7e(0x1e0)+_0x352963+_0x421b7e(0x18e)+(typeof _0x1cbeb6==_0x421b7e(0x17c)?_0x421b7e(0x179)+_0x1cbeb6:'@/'+_0x5e7d42)+_0x421b7e(0x1bb)+_0x2bdffa+_0x421b7e(0x1d6),_0xecd4c3+='@ProvideRepository('+_0x352963+_0x421b7e(0x1a4),_0xecd4c3+=_0x421b7e(0x1cf)+_0x352963+'\x20extends\x20Repository<'+_0x352963+_0x421b7e(0x1a5),_0xecd4c3+='}',!fs[_0x421b7e(0x1c1)]((0x0,path_1['dirname'])(_0x363e5e))&&fs['mkdirSync']((0x0,path_1['dirname'])(_0x363e5e),{'recursive':!![]}),fs[_0x421b7e(0x19a)](_0x363e5e,_0xecd4c3,_0x421b7e(0x1b8));}}
|
|
@@ -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_0x5d167c=a7_0x5e66;(function(_0x111ae5,_0x3a3c85){const _0x5d0adb=a7_0x5e66,_0x466865=_0x111ae5();while(!![]){try{const _0x2588dd=parseInt(_0x5d0adb(0x123))/0x1+parseInt(_0x5d0adb(0x117))/0x2+-parseInt(_0x5d0adb(0x111))/0x3*(parseInt(_0x5d0adb(0x112))/0x4)+parseInt(_0x5d0adb(0x124))/0x5*(-parseInt(_0x5d0adb(0x120))/0x6)+parseInt(_0x5d0adb(0x121))/0x7+parseInt(_0x5d0adb(0x115))/0x8*(parseInt(_0x5d0adb(0x10d))/0x9)+parseInt(_0x5d0adb(0x10a))/0xa*(parseInt(_0x5d0adb(0x122))/0xb);if(_0x2588dd===_0x3a3c85)break;else _0x466865['push'](_0x466865['shift']());}catch(_0x451149){_0x466865['push'](_0x466865['shift']());}}}(a7_0x35c7,0x7dc8c));const a7_0x5472db=(function(){let _0x5e5caa=!![];return function(_0x44ca7f,_0x4058aa){const _0x13e6a1=_0x5e5caa?function(){const _0xd1e14d=a7_0x5e66;if(_0x4058aa){const _0x47ce5f=_0x4058aa[_0xd1e14d(0x119)](_0x44ca7f,arguments);return _0x4058aa=null,_0x47ce5f;}}:function(){};return _0x5e5caa=![],_0x13e6a1;};}()),a7_0x400761=a7_0x5472db(this,function(){const _0x3e6c0f=a7_0x5e66;return a7_0x400761[_0x3e6c0f(0x106)]()[_0x3e6c0f(0x10f)](_0x3e6c0f(0x118))[_0x3e6c0f(0x106)]()[_0x3e6c0f(0x108)](a7_0x400761)[_0x3e6c0f(0x10f)](_0x3e6c0f(0x118));});function a7_0x35c7(){const _0x5d7f47=['apply','/entities/','\x27;\x0a\x0a','\x20\x20\x20\x20@InjectRepository(','import\x20{\x20','\x20}\x20from\x20\x27','@Event()\x0a','547374rpMMHB','1693776XlRsXO','1550912YVOjMf','58852hHQPSv','45NCwpEF',';\x0a\x0a\x0a','toString','writeFileSync','constructor','existsSync','20NlNGzK','__esModule','string','9WULAFU','mkdirSync','search','dirname','73599dnhaCI','120LmlZom','utf-8','import\x20{\x20Event,\x20EventService\x20}\x20from\x20\x27@anncic-api/event\x27;\x0a','4670864rnTuCy','default','1811202kjZHOC','(((.+)+)+)+$'];a7_0x35c7=function(){return _0x5d7f47;};return a7_0x35c7();}a7_0x400761();'use strict';function a7_0x5e66(_0x5eb5b6,_0x4e6f7a){const _0x4981f4=a7_0x35c7();return a7_0x5e66=function(_0x400761,_0x5472db){_0x400761=_0x400761-0x105;let _0x35c79e=_0x4981f4[_0x400761];return _0x35c79e;},a7_0x5e66(_0x5eb5b6,_0x4e6f7a);}Object['defineProperty'](exports,a7_0x5d167c(0x10b),{'value':!![]});const fs=require('fs'),path_1=require('path');async function default_1({tablestartUp:_0x413c24,tablestartUpShort:_0x1d42e0,basedir:_0x4b26d5,moduleName:_0x240e04,apporbasic:_0x6f517}){const _0x597090=a7_0x5d167c,_0x8ee87f=_0x4b26d5+('/listeners/'+_0x1d42e0+'.ts');if(!fs['existsSync'](_0x8ee87f)){let _0x59dc47='';_0x59dc47+=_0x597090(0x114),_0x59dc47+='import\x20{\x20Inject,\x20InjectRepository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a\x0a',_0x59dc47+=_0x597090(0x11d)+_0x413c24+_0x597090(0x11e)+(typeof _0x240e04==_0x597090(0x10c)?'@/apps/'+_0x240e04:'@/'+_0x6f517)+_0x597090(0x11a)+_0x1d42e0+_0x597090(0x11b),_0x59dc47+=_0x597090(0x11f),_0x59dc47+='export\x20class\x20'+_0x413c24+'Event\x20{\x0a\x0a',_0x59dc47+='\x20\x20\x20\x20@Inject()\x20protected\x20EventService:\x20EventService;\x0a\x0a',_0x59dc47+=_0x597090(0x11c)+_0x413c24+')\x20protected\x20'+_0x413c24+':\x20'+_0x413c24+_0x597090(0x105),_0x59dc47+='}',!fs[_0x597090(0x109)]((0x0,path_1['dirname'])(_0x8ee87f))&&fs[_0x597090(0x10e)]((0x0,path_1[_0x597090(0x110)])(_0x8ee87f),{'recursive':!![]}),fs[_0x597090(0x107)](_0x8ee87f,_0x59dc47,_0x597090(0x113));}}exports[a7_0x5d167c(0x116)]=default_1;
|
|
@@ -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>;
|