chyz 2.0.0-rc.8 → 2.0.1-rc.1
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/BaseChyz.d.ts +73 -56
- package/BaseChyz.d.ts.map +1 -1
- package/BaseChyz.js +569 -404
- package/README.md +1 -1
- package/base/ActionFilter.d.ts +32 -32
- package/base/ActionFilter.d.ts.map +1 -1
- package/base/ActionFilter.js +82 -82
- package/base/BadRequestHttpException.d.ts +6 -0
- package/base/BadRequestHttpException.d.ts.map +1 -0
- package/base/BadRequestHttpException.js +17 -0
- package/base/BaseError.d.ts +43 -10
- package/base/BaseError.d.ts.map +1 -1
- package/base/BaseError.js +58 -26
- package/base/Behavior.d.ts +3 -3
- package/base/Behavior.js +7 -7
- package/base/CBaseObject.d.ts +4 -4
- package/base/CBaseObject.d.ts.map +1 -1
- package/base/CBaseObject.js +16 -16
- package/base/CEvents.d.ts +13 -0
- package/base/CEvents.d.ts.map +1 -0
- package/base/CEvents.js +24 -0
- package/base/CRequest.d.ts +1 -1
- package/base/CRequest.js +10 -10
- package/base/CWebController.d.ts +43 -43
- package/base/CWebController.d.ts.map +1 -1
- package/base/CWebController.js +81 -74
- package/base/Component.d.ts +20 -20
- package/base/Component.d.ts.map +1 -1
- package/base/Component.js +57 -57
- package/base/Configurable.d.ts +2 -2
- package/base/Configurable.js +8 -8
- package/base/DataErrorDbException.d.ts +5 -5
- package/base/DataErrorDbException.d.ts.map +1 -1
- package/base/DataErrorDbException.js +17 -17
- package/base/DbConnection.d.ts +12 -12
- package/base/DbConnection.js +53 -53
- package/base/ForbiddenHttpException.d.ts +4 -4
- package/base/ForbiddenHttpException.d.ts.map +1 -1
- package/base/ForbiddenHttpException.js +16 -16
- package/base/InvalidArgumentException.d.ts +5 -5
- package/base/InvalidArgumentException.d.ts.map +1 -1
- package/base/InvalidArgumentException.js +17 -17
- package/base/InvalidConfigException.d.ts +5 -5
- package/base/InvalidConfigException.d.ts.map +1 -1
- package/base/InvalidConfigException.js +17 -17
- package/base/Logs.d.ts +21 -21
- package/base/Logs.d.ts.map +1 -1
- package/base/Logs.js +57 -57
- package/base/Model.d.ts +301 -298
- package/base/Model.d.ts.map +1 -1
- package/base/Model.js +545 -507
- package/base/ModelManager.d.ts +1 -1
- package/base/ModelManager.js +19 -19
- package/base/NotFoundHttpException.d.ts +5 -5
- package/base/NotFoundHttpException.d.ts.map +1 -1
- package/base/NotFoundHttpException.js +17 -17
- package/base/RestClient.d.ts +6 -6
- package/base/RestClient.d.ts.map +1 -1
- package/base/RestClient.js +25 -25
- package/base/UnauthorizedHttpException.d.ts +5 -5
- package/base/UnauthorizedHttpException.d.ts.map +1 -1
- package/base/UnauthorizedHttpException.js +17 -17
- package/base/ValidationHttpException.d.ts +5 -5
- package/base/ValidationHttpException.d.ts.map +1 -1
- package/base/ValidationHttpException.js +17 -17
- package/base/db/Exception.d.ts +6 -6
- package/base/db/Exception.js +15 -15
- package/base/index.d.ts +19 -18
- package/base/index.d.ts.map +1 -1
- package/base/index.js +41 -39
- package/decorator/Middleware.d.ts +3 -3
- package/decorator/Middleware.js +11 -11
- package/decorator/controller.d.ts +2 -2
- package/decorator/controller.js +24 -24
- package/decorator/delete.d.ts +3 -0
- package/decorator/delete.d.ts.map +1 -0
- package/decorator/delete.js +36 -0
- package/decorator/enums/ControllerDecoratorParams.d.ts +5 -5
- package/decorator/enums/ControllerDecoratorParams.js +9 -9
- package/decorator/get.d.ts +2 -2
- package/decorator/get.js +36 -36
- package/decorator/index.d.ts +5 -3
- package/decorator/index.d.ts.map +1 -1
- package/decorator/index.js +13 -9
- package/decorator/post.d.ts +2 -2
- package/decorator/post.js +36 -36
- package/decorator/put.d.ts +3 -0
- package/decorator/put.d.ts.map +1 -0
- package/decorator/put.js +36 -0
- package/filters/AccessControl.d.ts +12 -12
- package/filters/AccessControl.d.ts.map +1 -1
- package/filters/AccessControl.js +83 -83
- package/filters/AccessRule.d.ts +82 -82
- package/filters/AccessRule.d.ts.map +1 -1
- package/filters/AccessRule.js +136 -137
- package/filters/auth/AuthInterface.d.ts +25 -25
- package/filters/auth/AuthInterface.js +2 -2
- package/filters/auth/AuthMethod.d.ts +37 -37
- package/filters/auth/AuthMethod.d.ts.map +1 -1
- package/filters/auth/AuthMethod.js +82 -82
- package/filters/auth/HttpBasicAuth.d.ts +23 -22
- package/filters/auth/HttpBasicAuth.d.ts.map +1 -1
- package/filters/auth/HttpBasicAuth.js +78 -72
- package/filters/auth/HttpBearerAuth.d.ts +17 -17
- package/filters/auth/HttpBearerAuth.d.ts.map +1 -1
- package/filters/auth/HttpBearerAuth.js +33 -32
- package/filters/auth/HttpHeaderAuth.d.ts +18 -14
- package/filters/auth/HttpHeaderAuth.d.ts.map +1 -1
- package/filters/auth/HttpHeaderAuth.js +64 -57
- package/filters/auth/JwtHttpBearerAuth.d.ts +20 -20
- package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -1
- package/filters/auth/JwtHttpBearerAuth.js +87 -81
- package/filters/auth/KeyCloakHttpBearerAuth.d.ts +22 -22
- package/filters/auth/KeyCloakHttpBearerAuth.js +116 -116
- package/filters/auth/index.d.ts +4 -4
- package/filters/auth/index.js +11 -11
- package/filters/index.d.ts +2 -2
- package/filters/index.js +7 -7
- package/index.d.ts +28 -21
- package/index.d.ts.map +1 -1
- package/index.js +71 -60
- package/model/RouteDefinition.d.ts +6 -6
- package/model/RouteDefinition.js +8 -8
- package/package.json +22 -24
- package/rbac/AuthAssignment.d.ts +18 -18
- package/rbac/AuthAssignment.js +44 -44
- package/rbac/AuthItem.d.ts +26 -26
- package/rbac/AuthItem.js +51 -51
- package/rbac/AuthItemChild.d.ts +18 -18
- package/rbac/AuthItemChild.js +43 -43
- package/rbac/AuthManager.d.ts +111 -111
- package/rbac/AuthManager.d.ts.map +1 -1
- package/rbac/AuthManager.js +356 -355
- package/rbac/index.d.ts +5 -0
- package/rbac/index.d.ts.map +1 -0
- package/rbac/index.js +28 -0
- package/requiments/Glob.d.ts +2 -2
- package/requiments/Glob.js +10 -10
- package/requiments/ReflectUtil.js +24 -24
- package/requiments/Utils.d.ts +1 -8
- package/requiments/Utils.d.ts.map +1 -1
- package/requiments/Utils.js +115 -112
- package/validators/BooleanValidator.js +1 -1
- package/validators/CompareValidator.js +1 -1
- package/validators/DateValidator.js +1 -1
- package/validators/EmailValidator.js +1 -1
- package/validators/Validator.d.ts +17 -17
- package/validators/Validator.js +27 -27
- package/web/IdentityInterface.d.ts +55 -54
- package/web/IdentityInterface.d.ts.map +1 -1
- package/web/IdentityInterface.js +8 -8
- package/web/WebUser.d.ts +71 -71
- package/web/WebUser.js +165 -165
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chyz",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1-rc.1",
|
|
4
4
|
"description": "Nodejs Micro service Framework",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -16,42 +16,40 @@
|
|
|
16
16
|
"url": "https://github.com/cihan53/Chy-Nodejs-Framework/issues"
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/cihan53/Chy-Nodejs-Framework#readme",
|
|
19
|
-
"resolutions": {
|
|
20
|
-
"ts-node": "^10.2.0"
|
|
21
|
-
},
|
|
22
19
|
"dependencies": {
|
|
23
|
-
"axios": "^
|
|
20
|
+
"axios": "^1.3.5",
|
|
24
21
|
"babel-plugin-transform-decorators-legacy": "^1.3.5",
|
|
25
|
-
"body-parser": "^1.
|
|
22
|
+
"body-parser": "^1.20.2",
|
|
26
23
|
"compression": "^1.7.4",
|
|
27
|
-
"core-js": "^3.
|
|
24
|
+
"core-js": "^3.30.1",
|
|
25
|
+
"cors": "^2.8.5",
|
|
26
|
+
"dayjs": "^1.11.7",
|
|
28
27
|
"dotenv-flow": "^3.2.0",
|
|
29
|
-
"express": "^4.
|
|
30
|
-
"express-session": "^1.17.
|
|
31
|
-
"glob": "^
|
|
32
|
-
"ip": "^1.1.
|
|
33
|
-
"jsonwebtoken": "^
|
|
28
|
+
"express": "^4.18.2",
|
|
29
|
+
"express-session": "^1.17.3",
|
|
30
|
+
"glob": "^10.0.0",
|
|
31
|
+
"ip": "^1.1.8",
|
|
32
|
+
"jsonwebtoken": "^9.0.0",
|
|
34
33
|
"lodash": "^4.17.21",
|
|
35
|
-
"log4js": "^6.
|
|
34
|
+
"log4js": "^6.9.1",
|
|
36
35
|
"method-override": "^3.0.0",
|
|
37
|
-
"passport": "^0.
|
|
38
|
-
"pg": "^8.
|
|
36
|
+
"passport": "^0.6.0",
|
|
37
|
+
"pg": "^8.10.0",
|
|
39
38
|
"pg-hstore": "^2.3.4",
|
|
40
39
|
"reflect-metadata": "^0.1.13",
|
|
41
|
-
"sequelize": "^6.
|
|
40
|
+
"sequelize": "^6.31.0",
|
|
42
41
|
"sequelize-transparent-cache": "^2.3.0",
|
|
43
|
-
"tslib": "^2.
|
|
42
|
+
"tslib": "^2.5.0",
|
|
44
43
|
"validate.js": "^0.13.1"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@types/
|
|
48
|
-
"@types/
|
|
49
|
-
"@types/
|
|
50
|
-
"nodemon": "^2.0.
|
|
46
|
+
"@types/express": "^4.17.17",
|
|
47
|
+
"@types/node": "^18.15.11",
|
|
48
|
+
"@types/validator": "^13.7.15",
|
|
49
|
+
"nodemon": "^2.0.22",
|
|
51
50
|
"ts-node": "^10.9.1",
|
|
52
|
-
"typescript": "^
|
|
53
|
-
},
|
|
54
|
-
|
|
51
|
+
"typescript": "^5.0.4"
|
|
52
|
+
} ,
|
|
55
53
|
"keywords": [
|
|
56
54
|
"Framework",
|
|
57
55
|
"RespAPI",
|
package/rbac/AuthAssignment.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
-
export declare class AuthAssignmentClass extends Model {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
tableName(): string;
|
|
5
|
-
attributes(): {
|
|
6
|
-
item_name: {
|
|
7
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
-
primaryKey: boolean;
|
|
9
|
-
allowNull: boolean;
|
|
10
|
-
};
|
|
11
|
-
user_id: {
|
|
12
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
13
|
-
allowNull: boolean;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
init(): void;
|
|
17
|
-
relations(): Relation[];
|
|
18
|
-
}
|
|
1
|
+
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
+
export declare class AuthAssignmentClass extends Model {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
tableName(): string;
|
|
5
|
+
attributes(): {
|
|
6
|
+
item_name: {
|
|
7
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
allowNull: boolean;
|
|
10
|
+
};
|
|
11
|
+
user_id: {
|
|
12
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
13
|
+
allowNull: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
init(): void;
|
|
17
|
+
relations(): Relation[];
|
|
18
|
+
}
|
|
19
19
|
//# sourceMappingURL=AuthAssignment.d.ts.map
|
package/rbac/AuthAssignment.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
-
* Author: Cihan Ozturk
|
|
5
|
-
* E-mail: cihan@chy.com.tr
|
|
6
|
-
* Github:https://github.com/cihan53/
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AuthAssignmentClass = void 0;
|
|
10
|
-
const base_1 = require("../base");
|
|
11
|
-
class AuthAssignmentClass extends base_1.Model {
|
|
12
|
-
tableName() {
|
|
13
|
-
return 'auth_assignment';
|
|
14
|
-
}
|
|
15
|
-
attributes() {
|
|
16
|
-
return {
|
|
17
|
-
// Model attributes are defined here
|
|
18
|
-
item_name: {
|
|
19
|
-
type: base_1.DataTypes.STRING,
|
|
20
|
-
primaryKey: true,
|
|
21
|
-
allowNull: false
|
|
22
|
-
},
|
|
23
|
-
user_id: {
|
|
24
|
-
type: base_1.DataTypes.STRING,
|
|
25
|
-
allowNull: false
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
init() {
|
|
30
|
-
super.init();
|
|
31
|
-
this.model().removeAttribute('id');
|
|
32
|
-
}
|
|
33
|
-
relations() {
|
|
34
|
-
return [
|
|
35
|
-
{
|
|
36
|
-
type: "hasMany",
|
|
37
|
-
foreignKey: "name",
|
|
38
|
-
sourceKey: 'item_name',
|
|
39
|
-
model: base_1.ModelManager.AuthItem.model()
|
|
40
|
-
}
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.AuthAssignmentClass = AuthAssignmentClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
+
* Author: Cihan Ozturk
|
|
5
|
+
* E-mail: cihan@chy.com.tr
|
|
6
|
+
* Github:https://github.com/cihan53/
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AuthAssignmentClass = void 0;
|
|
10
|
+
const base_1 = require("../base");
|
|
11
|
+
class AuthAssignmentClass extends base_1.Model {
|
|
12
|
+
tableName() {
|
|
13
|
+
return 'auth_assignment';
|
|
14
|
+
}
|
|
15
|
+
attributes() {
|
|
16
|
+
return {
|
|
17
|
+
// Model attributes are defined here
|
|
18
|
+
item_name: {
|
|
19
|
+
type: base_1.DataTypes.STRING,
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
allowNull: false
|
|
22
|
+
},
|
|
23
|
+
user_id: {
|
|
24
|
+
type: base_1.DataTypes.STRING,
|
|
25
|
+
allowNull: false
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
init() {
|
|
30
|
+
super.init();
|
|
31
|
+
this.model().removeAttribute('id');
|
|
32
|
+
}
|
|
33
|
+
relations() {
|
|
34
|
+
return [
|
|
35
|
+
{
|
|
36
|
+
type: "hasMany",
|
|
37
|
+
foreignKey: "name",
|
|
38
|
+
sourceKey: 'item_name',
|
|
39
|
+
model: base_1.ModelManager.AuthItem.model()
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.AuthAssignmentClass = AuthAssignmentClass;
|
package/rbac/AuthItem.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
-
export declare class AuthItemClass extends Model {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
tableName(): string;
|
|
5
|
-
attributes(): {
|
|
6
|
-
name: {
|
|
7
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
-
primaryKey: boolean;
|
|
9
|
-
allowNull: boolean;
|
|
10
|
-
};
|
|
11
|
-
type: {
|
|
12
|
-
type: DataTypes.IntegerDataTypeConstructor;
|
|
13
|
-
allowNull: boolean;
|
|
14
|
-
};
|
|
15
|
-
description: {
|
|
16
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
17
|
-
allowNull: boolean;
|
|
18
|
-
};
|
|
19
|
-
rule_name: {
|
|
20
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
21
|
-
allowNull: boolean;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
init(): void;
|
|
25
|
-
relations(): Relation[];
|
|
26
|
-
}
|
|
1
|
+
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
+
export declare class AuthItemClass extends Model {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
tableName(): string;
|
|
5
|
+
attributes(): {
|
|
6
|
+
name: {
|
|
7
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
allowNull: boolean;
|
|
10
|
+
};
|
|
11
|
+
type: {
|
|
12
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
13
|
+
allowNull: boolean;
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
17
|
+
allowNull: boolean;
|
|
18
|
+
};
|
|
19
|
+
rule_name: {
|
|
20
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
21
|
+
allowNull: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
init(): void;
|
|
25
|
+
relations(): Relation[];
|
|
26
|
+
}
|
|
27
27
|
//# sourceMappingURL=AuthItem.d.ts.map
|
package/rbac/AuthItem.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
-
* Author: Cihan Ozturk
|
|
5
|
-
* E-mail: cihan@chy.com.tr
|
|
6
|
-
* Github:https://github.com/cihan53/
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AuthItemClass = void 0;
|
|
10
|
-
const base_1 = require("../base");
|
|
11
|
-
class AuthItemClass extends base_1.Model {
|
|
12
|
-
tableName() {
|
|
13
|
-
return 'auth_item';
|
|
14
|
-
}
|
|
15
|
-
attributes() {
|
|
16
|
-
return {
|
|
17
|
-
// Model attributes are defined here
|
|
18
|
-
name: {
|
|
19
|
-
type: base_1.DataTypes.STRING,
|
|
20
|
-
primaryKey: true,
|
|
21
|
-
allowNull: false
|
|
22
|
-
},
|
|
23
|
-
type: {
|
|
24
|
-
type: base_1.DataTypes.INTEGER,
|
|
25
|
-
allowNull: false
|
|
26
|
-
},
|
|
27
|
-
description: {
|
|
28
|
-
type: base_1.DataTypes.STRING,
|
|
29
|
-
allowNull: false
|
|
30
|
-
},
|
|
31
|
-
rule_name: {
|
|
32
|
-
type: base_1.DataTypes.STRING,
|
|
33
|
-
allowNull: false
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
init() {
|
|
38
|
-
super.init();
|
|
39
|
-
this.model().removeAttribute('id');
|
|
40
|
-
}
|
|
41
|
-
relations() {
|
|
42
|
-
return [
|
|
43
|
-
{
|
|
44
|
-
type: "hasOne",
|
|
45
|
-
foreignKey: "item_name",
|
|
46
|
-
model: base_1.ModelManager.AuthAssignment.model()
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.AuthItemClass = AuthItemClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
+
* Author: Cihan Ozturk
|
|
5
|
+
* E-mail: cihan@chy.com.tr
|
|
6
|
+
* Github:https://github.com/cihan53/
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AuthItemClass = void 0;
|
|
10
|
+
const base_1 = require("../base");
|
|
11
|
+
class AuthItemClass extends base_1.Model {
|
|
12
|
+
tableName() {
|
|
13
|
+
return 'auth_item';
|
|
14
|
+
}
|
|
15
|
+
attributes() {
|
|
16
|
+
return {
|
|
17
|
+
// Model attributes are defined here
|
|
18
|
+
name: {
|
|
19
|
+
type: base_1.DataTypes.STRING,
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
allowNull: false
|
|
22
|
+
},
|
|
23
|
+
type: {
|
|
24
|
+
type: base_1.DataTypes.INTEGER,
|
|
25
|
+
allowNull: false
|
|
26
|
+
},
|
|
27
|
+
description: {
|
|
28
|
+
type: base_1.DataTypes.STRING,
|
|
29
|
+
allowNull: false
|
|
30
|
+
},
|
|
31
|
+
rule_name: {
|
|
32
|
+
type: base_1.DataTypes.STRING,
|
|
33
|
+
allowNull: false
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
init() {
|
|
38
|
+
super.init();
|
|
39
|
+
this.model().removeAttribute('id');
|
|
40
|
+
}
|
|
41
|
+
relations() {
|
|
42
|
+
return [
|
|
43
|
+
{
|
|
44
|
+
type: "hasOne",
|
|
45
|
+
foreignKey: "item_name",
|
|
46
|
+
model: base_1.ModelManager.AuthAssignment.model()
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.AuthItemClass = AuthItemClass;
|
package/rbac/AuthItemChild.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
-
export declare class AuthItemChildClass extends Model {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
tableName(): string;
|
|
5
|
-
attributes(): {
|
|
6
|
-
parent: {
|
|
7
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
-
primaryKey: boolean;
|
|
9
|
-
allowNull: boolean;
|
|
10
|
-
};
|
|
11
|
-
child: {
|
|
12
|
-
type: DataTypes.StringDataTypeConstructor;
|
|
13
|
-
allowNull: boolean;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
init(): void;
|
|
17
|
-
relations(): Relation[];
|
|
18
|
-
}
|
|
1
|
+
import { DataTypes, Model, Relation } from "../base";
|
|
2
|
+
export declare class AuthItemChildClass extends Model {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
tableName(): string;
|
|
5
|
+
attributes(): {
|
|
6
|
+
parent: {
|
|
7
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
allowNull: boolean;
|
|
10
|
+
};
|
|
11
|
+
child: {
|
|
12
|
+
type: DataTypes.StringDataTypeConstructor;
|
|
13
|
+
allowNull: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
init(): void;
|
|
17
|
+
relations(): Relation[];
|
|
18
|
+
}
|
|
19
19
|
//# sourceMappingURL=AuthItemChild.d.ts.map
|
package/rbac/AuthItemChild.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
-
* Author: Cihan Ozturk
|
|
5
|
-
* E-mail: cihan@chy.com.tr
|
|
6
|
-
* Github:https://github.com/cihan53/
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AuthItemChildClass = void 0;
|
|
10
|
-
const base_1 = require("../base");
|
|
11
|
-
class AuthItemChildClass extends base_1.Model {
|
|
12
|
-
tableName() {
|
|
13
|
-
return 'auth_item_child';
|
|
14
|
-
}
|
|
15
|
-
attributes() {
|
|
16
|
-
return {
|
|
17
|
-
// Model attributes are defined here
|
|
18
|
-
parent: {
|
|
19
|
-
type: base_1.DataTypes.STRING,
|
|
20
|
-
primaryKey: true,
|
|
21
|
-
allowNull: false
|
|
22
|
-
},
|
|
23
|
-
child: {
|
|
24
|
-
type: base_1.DataTypes.STRING,
|
|
25
|
-
allowNull: false
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
init() {
|
|
30
|
-
super.init();
|
|
31
|
-
this.model().removeAttribute('id');
|
|
32
|
-
}
|
|
33
|
-
relations() {
|
|
34
|
-
return [
|
|
35
|
-
{
|
|
36
|
-
type: "hasOne",
|
|
37
|
-
foreignKey: "item_name",
|
|
38
|
-
model: base_1.ModelManager.AuthAssignment.model()
|
|
39
|
-
}
|
|
40
|
-
];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.AuthItemChildClass = AuthItemChildClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
+
* Author: Cihan Ozturk
|
|
5
|
+
* E-mail: cihan@chy.com.tr
|
|
6
|
+
* Github:https://github.com/cihan53/
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AuthItemChildClass = void 0;
|
|
10
|
+
const base_1 = require("../base");
|
|
11
|
+
class AuthItemChildClass extends base_1.Model {
|
|
12
|
+
tableName() {
|
|
13
|
+
return 'auth_item_child';
|
|
14
|
+
}
|
|
15
|
+
attributes() {
|
|
16
|
+
return {
|
|
17
|
+
// Model attributes are defined here
|
|
18
|
+
parent: {
|
|
19
|
+
type: base_1.DataTypes.STRING,
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
allowNull: false
|
|
22
|
+
},
|
|
23
|
+
child: {
|
|
24
|
+
type: base_1.DataTypes.STRING,
|
|
25
|
+
allowNull: false
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
init() {
|
|
30
|
+
super.init();
|
|
31
|
+
this.model().removeAttribute('id');
|
|
32
|
+
}
|
|
33
|
+
relations() {
|
|
34
|
+
return [
|
|
35
|
+
{
|
|
36
|
+
type: "hasOne",
|
|
37
|
+
foreignKey: "item_name",
|
|
38
|
+
model: base_1.ModelManager.AuthAssignment.model()
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.AuthItemChildClass = AuthItemChildClass;
|