ecrs-auth-core 1.0.55 → 1.0.56
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/auth.controller.d.ts +26 -26
- package/dist/auth.controller.js +99 -41
- package/dist/auth.module.d.ts +9 -9
- package/dist/auth.module.js +143 -143
- package/dist/auth.service.d.ts +55 -47
- package/dist/auth.service.js +197 -185
- package/dist/constants/constants.d.ts +1 -1
- package/dist/constants/constants.js +4 -4
- package/dist/decorators/current-user.decorator.d.ts +1 -1
- package/dist/decorators/current-user.decorator.js +9 -9
- package/dist/decorators/feature.decorator.d.ts +1 -1
- package/dist/decorators/feature.decorator.js +11 -11
- package/dist/decorators/has-permission.decorator.d.ts +6 -6
- package/dist/decorators/has-permission.decorator.js +8 -8
- package/dist/decorators/roles.decorator.d.ts +1 -1
- package/dist/decorators/roles.decorator.js +6 -6
- package/dist/decorators/route-permission.decorator.d.ts +1 -1
- package/dist/decorators/route-permission.decorator.js +11 -11
- package/dist/dtos/login-response.dto.d.ts +23 -0
- package/dist/dtos/login-response.dto.js +86 -0
- package/dist/dtos/login.dto.d.ts +5 -4
- package/dist/dtos/login.dto.js +32 -7
- package/dist/entities/feature.entity.d.ts +9 -9
- package/dist/entities/feature.entity.js +48 -48
- package/dist/entities/module-route.entity.d.ts +9 -9
- package/dist/entities/module-route.entity.js +48 -48
- package/dist/entities/module-screen-permission.entity.d.ts +15 -15
- package/dist/entities/module-screen-permission.entity.js +44 -44
- package/dist/entities/module.entity.d.ts +8 -8
- package/dist/entities/module.entity.js +44 -44
- package/dist/entities/role.entity.d.ts +7 -7
- package/dist/entities/role.entity.js +44 -44
- package/dist/entities/user-feature-access.entity.d.ts +19 -19
- package/dist/entities/user-feature-access.entity.js +88 -88
- package/dist/entities/user-module-access.entity.d.ts +12 -12
- package/dist/entities/user-module-access.entity.js +60 -60
- package/dist/entities/user.entity.d.ts +25 -25
- package/dist/entities/user.entity.js +112 -112
- package/dist/guards/feature.guard.d.ts +7 -7
- package/dist/guards/feature.guard.js +34 -34
- package/dist/guards/module.guard.d.ts +8 -8
- package/dist/guards/module.guard.js +36 -36
- package/dist/guards/permission.guard.d.ts +7 -7
- package/dist/guards/permission.guard.js +41 -41
- package/dist/guards/roles.guard.d.ts +7 -7
- package/dist/guards/roles.guard.js +34 -34
- package/dist/guards/route.guard.d.ts +7 -7
- package/dist/guards/route.guard.js +34 -34
- package/dist/index.d.ts +25 -23
- package/dist/index.js +48 -45
- package/dist/interfaces/auth-core-options.interface.d.ts +30 -30
- package/dist/interfaces/auth-core-options.interface.js +2 -2
- package/dist/jwt/jwt.guard.d.ts +4 -4
- package/dist/jwt/jwt.guard.js +18 -18
- package/dist/jwt/jwt.strategy.d.ts +14 -14
- package/dist/jwt/jwt.strategy.js +49 -42
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export declare class UserFeatureAccess {
|
|
2
|
-
id: number;
|
|
3
|
-
userId: number;
|
|
4
|
-
moduleId: number;
|
|
5
|
-
featureId: number;
|
|
6
|
-
accessLevel: string;
|
|
7
|
-
canView: boolean;
|
|
8
|
-
canCreate: boolean;
|
|
9
|
-
canModify: boolean;
|
|
10
|
-
canDelete: boolean;
|
|
11
|
-
canImport: boolean;
|
|
12
|
-
canExport: boolean;
|
|
13
|
-
status: number;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
updatedAt: Date;
|
|
16
|
-
createdBy: number;
|
|
17
|
-
updatedBy?: number;
|
|
18
|
-
isDeleted: number;
|
|
19
|
-
}
|
|
1
|
+
export declare class UserFeatureAccess {
|
|
2
|
+
id: number;
|
|
3
|
+
userId: number;
|
|
4
|
+
moduleId: number;
|
|
5
|
+
featureId: number;
|
|
6
|
+
accessLevel: string;
|
|
7
|
+
canView: boolean;
|
|
8
|
+
canCreate: boolean;
|
|
9
|
+
canModify: boolean;
|
|
10
|
+
canDelete: boolean;
|
|
11
|
+
canImport: boolean;
|
|
12
|
+
canExport: boolean;
|
|
13
|
+
status: number;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
createdBy: number;
|
|
17
|
+
updatedBy?: number;
|
|
18
|
+
isDeleted: number;
|
|
19
|
+
}
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UserFeatureAccess = void 0;
|
|
13
|
-
// src/entities/user-feature-access.entity.ts
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
let UserFeatureAccess = class UserFeatureAccess {
|
|
16
|
-
};
|
|
17
|
-
exports.UserFeatureAccess = UserFeatureAccess;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
-
__metadata("design:type", Number)
|
|
21
|
-
], UserFeatureAccess.prototype, "id", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ name: 'user_id' }),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], UserFeatureAccess.prototype, "userId", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ name: 'module_id' }),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], UserFeatureAccess.prototype, "moduleId", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({ name: 'feature_id' }),
|
|
32
|
-
__metadata("design:type", Number)
|
|
33
|
-
], UserFeatureAccess.prototype, "featureId", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ name: 'access_level', default: 'view' }),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], UserFeatureAccess.prototype, "accessLevel", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ name: 'can_view', default: false }),
|
|
40
|
-
__metadata("design:type", Boolean)
|
|
41
|
-
], UserFeatureAccess.prototype, "canView", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ name: 'can_create', default: false }),
|
|
44
|
-
__metadata("design:type", Boolean)
|
|
45
|
-
], UserFeatureAccess.prototype, "canCreate", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ name: 'can_modify', default: false }),
|
|
48
|
-
__metadata("design:type", Boolean)
|
|
49
|
-
], UserFeatureAccess.prototype, "canModify", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ name: 'can_delete', default: false }),
|
|
52
|
-
__metadata("design:type", Boolean)
|
|
53
|
-
], UserFeatureAccess.prototype, "canDelete", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)({ name: 'can_import', default: false }),
|
|
56
|
-
__metadata("design:type", Boolean)
|
|
57
|
-
], UserFeatureAccess.prototype, "canImport", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ name: 'can_export', default: false }),
|
|
60
|
-
__metadata("design:type", Boolean)
|
|
61
|
-
], UserFeatureAccess.prototype, "canExport", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'smallint', default: 1 }),
|
|
64
|
-
__metadata("design:type", Number)
|
|
65
|
-
], UserFeatureAccess.prototype, "status", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({ name: 'created_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
68
|
-
__metadata("design:type", Date)
|
|
69
|
-
], UserFeatureAccess.prototype, "createdAt", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
72
|
-
__metadata("design:type", Date)
|
|
73
|
-
], UserFeatureAccess.prototype, "updatedAt", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({ name: 'created_by' }),
|
|
76
|
-
__metadata("design:type", Number)
|
|
77
|
-
], UserFeatureAccess.prototype, "createdBy", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ name: 'updated_by', nullable: true }),
|
|
80
|
-
__metadata("design:type", Number)
|
|
81
|
-
], UserFeatureAccess.prototype, "updatedBy", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ name: 'is_deleted', type: 'smallint', default: 0 }),
|
|
84
|
-
__metadata("design:type", Number)
|
|
85
|
-
], UserFeatureAccess.prototype, "isDeleted", void 0);
|
|
86
|
-
exports.UserFeatureAccess = UserFeatureAccess = __decorate([
|
|
87
|
-
(0, typeorm_1.Entity)({ name: 'tbl_c_user_feature_access' })
|
|
88
|
-
], UserFeatureAccess);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UserFeatureAccess = void 0;
|
|
13
|
+
// src/entities/user-feature-access.entity.ts
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
let UserFeatureAccess = class UserFeatureAccess {
|
|
16
|
+
};
|
|
17
|
+
exports.UserFeatureAccess = UserFeatureAccess;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], UserFeatureAccess.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ name: 'user_id' }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], UserFeatureAccess.prototype, "userId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ name: 'module_id' }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], UserFeatureAccess.prototype, "moduleId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ name: 'feature_id' }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], UserFeatureAccess.prototype, "featureId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ name: 'access_level', default: 'view' }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], UserFeatureAccess.prototype, "accessLevel", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ name: 'can_view', default: false }),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], UserFeatureAccess.prototype, "canView", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ name: 'can_create', default: false }),
|
|
44
|
+
__metadata("design:type", Boolean)
|
|
45
|
+
], UserFeatureAccess.prototype, "canCreate", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'can_modify', default: false }),
|
|
48
|
+
__metadata("design:type", Boolean)
|
|
49
|
+
], UserFeatureAccess.prototype, "canModify", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'can_delete', default: false }),
|
|
52
|
+
__metadata("design:type", Boolean)
|
|
53
|
+
], UserFeatureAccess.prototype, "canDelete", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ name: 'can_import', default: false }),
|
|
56
|
+
__metadata("design:type", Boolean)
|
|
57
|
+
], UserFeatureAccess.prototype, "canImport", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ name: 'can_export', default: false }),
|
|
60
|
+
__metadata("design:type", Boolean)
|
|
61
|
+
], UserFeatureAccess.prototype, "canExport", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'smallint', default: 1 }),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], UserFeatureAccess.prototype, "status", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ name: 'created_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
68
|
+
__metadata("design:type", Date)
|
|
69
|
+
], UserFeatureAccess.prototype, "createdAt", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], UserFeatureAccess.prototype, "updatedAt", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ name: 'created_by' }),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], UserFeatureAccess.prototype, "createdBy", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ name: 'updated_by', nullable: true }),
|
|
80
|
+
__metadata("design:type", Number)
|
|
81
|
+
], UserFeatureAccess.prototype, "updatedBy", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ name: 'is_deleted', type: 'smallint', default: 0 }),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], UserFeatureAccess.prototype, "isDeleted", void 0);
|
|
86
|
+
exports.UserFeatureAccess = UserFeatureAccess = __decorate([
|
|
87
|
+
(0, typeorm_1.Entity)({ name: 'tbl_c_user_feature_access' })
|
|
88
|
+
], UserFeatureAccess);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare class UserModuleAccess {
|
|
2
|
-
id: number;
|
|
3
|
-
userId: number;
|
|
4
|
-
moduleId: number;
|
|
5
|
-
accessLevel: string;
|
|
6
|
-
status: number;
|
|
7
|
-
createdAt: Date;
|
|
8
|
-
updatedAt: Date;
|
|
9
|
-
createdBy: number;
|
|
10
|
-
updatedBy?: number;
|
|
11
|
-
isDeleted: number;
|
|
12
|
-
}
|
|
1
|
+
export declare class UserModuleAccess {
|
|
2
|
+
id: number;
|
|
3
|
+
userId: number;
|
|
4
|
+
moduleId: number;
|
|
5
|
+
accessLevel: string;
|
|
6
|
+
status: number;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
createdBy: number;
|
|
10
|
+
updatedBy?: number;
|
|
11
|
+
isDeleted: number;
|
|
12
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UserModuleAccess = void 0;
|
|
13
|
-
// src/entities/user-module-access.entity.ts
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
let UserModuleAccess = class UserModuleAccess {
|
|
16
|
-
};
|
|
17
|
-
exports.UserModuleAccess = UserModuleAccess;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
-
__metadata("design:type", Number)
|
|
21
|
-
], UserModuleAccess.prototype, "id", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ name: 'user_id' }),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], UserModuleAccess.prototype, "userId", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ name: 'module_id' }),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], UserModuleAccess.prototype, "moduleId", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({ name: 'access_level', default: 'view' }),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], UserModuleAccess.prototype, "accessLevel", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ type: 'smallint', default: 1 }),
|
|
36
|
-
__metadata("design:type", Number)
|
|
37
|
-
], UserModuleAccess.prototype, "status", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ name: 'created_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
40
|
-
__metadata("design:type", Date)
|
|
41
|
-
], UserModuleAccess.prototype, "createdAt", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
44
|
-
__metadata("design:type", Date)
|
|
45
|
-
], UserModuleAccess.prototype, "updatedAt", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ name: 'created_by' }),
|
|
48
|
-
__metadata("design:type", Number)
|
|
49
|
-
], UserModuleAccess.prototype, "createdBy", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ name: 'updated_by', nullable: true }),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], UserModuleAccess.prototype, "updatedBy", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)({ name: 'is_deleted', type: 'smallint', default: 0 }),
|
|
56
|
-
__metadata("design:type", Number)
|
|
57
|
-
], UserModuleAccess.prototype, "isDeleted", void 0);
|
|
58
|
-
exports.UserModuleAccess = UserModuleAccess = __decorate([
|
|
59
|
-
(0, typeorm_1.Entity)({ name: 'tbl_c_user_module_access' })
|
|
60
|
-
], UserModuleAccess);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UserModuleAccess = void 0;
|
|
13
|
+
// src/entities/user-module-access.entity.ts
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
let UserModuleAccess = class UserModuleAccess {
|
|
16
|
+
};
|
|
17
|
+
exports.UserModuleAccess = UserModuleAccess;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], UserModuleAccess.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ name: 'user_id' }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], UserModuleAccess.prototype, "userId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ name: 'module_id' }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], UserModuleAccess.prototype, "moduleId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ name: 'access_level', default: 'view' }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], UserModuleAccess.prototype, "accessLevel", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'smallint', default: 1 }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], UserModuleAccess.prototype, "status", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ name: 'created_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], UserModuleAccess.prototype, "createdAt", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], UserModuleAccess.prototype, "updatedAt", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'created_by' }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], UserModuleAccess.prototype, "createdBy", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'updated_by', nullable: true }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], UserModuleAccess.prototype, "updatedBy", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ name: 'is_deleted', type: 'smallint', default: 0 }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], UserModuleAccess.prototype, "isDeleted", void 0);
|
|
58
|
+
exports.UserModuleAccess = UserModuleAccess = __decorate([
|
|
59
|
+
(0, typeorm_1.Entity)({ name: 'tbl_c_user_module_access' })
|
|
60
|
+
], UserModuleAccess);
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export declare class User {
|
|
2
|
-
id: number;
|
|
3
|
-
firstName: string;
|
|
4
|
-
lastName: string;
|
|
5
|
-
mobileNo: number;
|
|
6
|
-
email: string;
|
|
7
|
-
password: string;
|
|
8
|
-
status: number;
|
|
9
|
-
userImage: string;
|
|
10
|
-
roleId: number;
|
|
11
|
-
parentId: number;
|
|
12
|
-
referenceId: number;
|
|
13
|
-
notificationToken: string;
|
|
14
|
-
apiToken: string;
|
|
15
|
-
deviceDetails: string;
|
|
16
|
-
otpNumber: number;
|
|
17
|
-
isOtpVerified: number;
|
|
18
|
-
moduleId: number;
|
|
19
|
-
createdBy: number;
|
|
20
|
-
updatedBy: number;
|
|
21
|
-
deletedBy: number;
|
|
22
|
-
createdAt: Date;
|
|
23
|
-
updatedAt: Date;
|
|
24
|
-
deletedAt: Date;
|
|
25
|
-
}
|
|
1
|
+
export declare class User {
|
|
2
|
+
id: number;
|
|
3
|
+
firstName: string;
|
|
4
|
+
lastName: string;
|
|
5
|
+
mobileNo: number;
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
status: number;
|
|
9
|
+
userImage: string;
|
|
10
|
+
roleId: number;
|
|
11
|
+
parentId: number;
|
|
12
|
+
referenceId: number;
|
|
13
|
+
notificationToken: string;
|
|
14
|
+
apiToken: string;
|
|
15
|
+
deviceDetails: string;
|
|
16
|
+
otpNumber: number;
|
|
17
|
+
isOtpVerified: number;
|
|
18
|
+
moduleId: number;
|
|
19
|
+
createdBy: number;
|
|
20
|
+
updatedBy: number;
|
|
21
|
+
deletedBy: number;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
deletedAt: Date;
|
|
25
|
+
}
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.User = void 0;
|
|
13
|
-
// src/entities/user.entity.ts
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
let User = class User {
|
|
16
|
-
};
|
|
17
|
-
exports.User = User;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
-
__metadata("design:type", Number)
|
|
21
|
-
], User.prototype, "id", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ length: 64 }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], User.prototype, "firstName", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ length: 64 }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], User.prototype, "lastName", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)('bigint'),
|
|
32
|
-
__metadata("design:type", Number)
|
|
33
|
-
], User.prototype, "mobileNo", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ length: 250, unique: true }),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], User.prototype, "email", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ length: 200 }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], User.prototype, "password", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type: 'smallint', default: 1 }),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], User.prototype, "status", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ length: 250, nullable: true }),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], User.prototype, "userImage", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)(),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], User.prototype, "roleId", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)(),
|
|
56
|
-
__metadata("design:type", Number)
|
|
57
|
-
], User.prototype, "parentId", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
60
|
-
__metadata("design:type", Number)
|
|
61
|
-
], User.prototype, "referenceId", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
-
__metadata("design:type", String)
|
|
65
|
-
], User.prototype, "notificationToken", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({ length: 500, nullable: true }),
|
|
68
|
-
__metadata("design:type", String)
|
|
69
|
-
], User.prototype, "apiToken", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({ length: 500, nullable: true }),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], User.prototype, "deviceDetails", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
76
|
-
__metadata("design:type", Number)
|
|
77
|
-
], User.prototype, "otpNumber", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ type: 'smallint', nullable: true }),
|
|
80
|
-
__metadata("design:type", Number)
|
|
81
|
-
], User.prototype, "isOtpVerified", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
84
|
-
__metadata("design:type", Number)
|
|
85
|
-
], User.prototype, "moduleId", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, typeorm_1.Column)(),
|
|
88
|
-
__metadata("design:type", Number)
|
|
89
|
-
], User.prototype, "createdBy", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
92
|
-
__metadata("design:type", Number)
|
|
93
|
-
], User.prototype, "updatedBy", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
96
|
-
__metadata("design:type", Number)
|
|
97
|
-
], User.prototype, "deletedBy", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
100
|
-
__metadata("design:type", Date)
|
|
101
|
-
], User.prototype, "createdAt", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
104
|
-
__metadata("design:type", Date)
|
|
105
|
-
], User.prototype, "updatedAt", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
108
|
-
__metadata("design:type", Date)
|
|
109
|
-
], User.prototype, "deletedAt", void 0);
|
|
110
|
-
exports.User = User = __decorate([
|
|
111
|
-
(0, typeorm_1.Entity)({ name: 'tbl_users' })
|
|
112
|
-
], User);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.User = void 0;
|
|
13
|
+
// src/entities/user.entity.ts
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
let User = class User {
|
|
16
|
+
};
|
|
17
|
+
exports.User = User;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], User.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ length: 64 }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], User.prototype, "firstName", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ length: 64 }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], User.prototype, "lastName", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)('bigint'),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], User.prototype, "mobileNo", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ length: 250, unique: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], User.prototype, "email", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ length: 200 }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], User.prototype, "password", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'smallint', default: 1 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], User.prototype, "status", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ length: 250, nullable: true }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], User.prototype, "userImage", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)(),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], User.prototype, "roleId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)(),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], User.prototype, "parentId", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], User.prototype, "referenceId", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], User.prototype, "notificationToken", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ length: 500, nullable: true }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], User.prototype, "apiToken", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ length: 500, nullable: true }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], User.prototype, "deviceDetails", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], User.prototype, "otpNumber", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: 'smallint', nullable: true }),
|
|
80
|
+
__metadata("design:type", Number)
|
|
81
|
+
], User.prototype, "isOtpVerified", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], User.prototype, "moduleId", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.Column)(),
|
|
88
|
+
__metadata("design:type", Number)
|
|
89
|
+
], User.prototype, "createdBy", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], User.prototype, "updatedBy", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
96
|
+
__metadata("design:type", Number)
|
|
97
|
+
], User.prototype, "deletedBy", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
100
|
+
__metadata("design:type", Date)
|
|
101
|
+
], User.prototype, "createdAt", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
104
|
+
__metadata("design:type", Date)
|
|
105
|
+
], User.prototype, "updatedAt", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
108
|
+
__metadata("design:type", Date)
|
|
109
|
+
], User.prototype, "deletedAt", void 0);
|
|
110
|
+
exports.User = User = __decorate([
|
|
111
|
+
(0, typeorm_1.Entity)({ name: 'tbl_users' })
|
|
112
|
+
], User);
|