@tomei/sso 0.8.1 → 0.8.2
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/Jenkinsfile +1 -1
- package/__tests__/unit/components/login-history/login-history.repository.spec.ts +88 -88
- package/__tests__/unit/components/login-user/login-user.spec.ts +731 -731
- package/__tests__/unit/components/login-user/user.repository.spec.ts +75 -75
- package/__tests__/unit/components/password-hash/password-hash.service.spec.ts +26 -26
- package/__tests__/unit/components/system/system.repository.spec.ts +82 -82
- package/__tests__/unit/components/system-access/system-access.repository.spec.ts +72 -72
- package/dist/__tests__/unit/components/login-history/login-history.repository.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/login-history/login-history.repository.spec.js +0 -98
- package/dist/__tests__/unit/components/login-history/login-history.repository.spec.js.map +1 -1
- package/dist/__tests__/unit/components/login-user/login-user.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/login-user/login-user.spec.js +0 -659
- package/dist/__tests__/unit/components/login-user/login-user.spec.js.map +1 -1
- package/dist/__tests__/unit/components/login-user/user.repository.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/login-user/user.repository.spec.js +0 -77
- package/dist/__tests__/unit/components/login-user/user.repository.spec.js.map +1 -1
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.js +0 -37
- package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.js.map +1 -1
- package/dist/__tests__/unit/components/system/system.repository.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/system/system.repository.spec.js +0 -84
- package/dist/__tests__/unit/components/system/system.repository.spec.js.map +1 -1
- package/dist/__tests__/unit/components/system-access/system-access.repository.spec.d.ts +0 -1
- package/dist/__tests__/unit/components/system-access/system-access.repository.spec.js +0 -74
- package/dist/__tests__/unit/components/system-access/system-access.repository.spec.js.map +1 -1
- package/dist/src/components/login-history/login-history.repository.d.ts +4 -8
- package/dist/src/components/login-history/login-history.repository.js +5 -43
- package/dist/src/components/login-history/login-history.repository.js.map +1 -1
- package/dist/src/components/login-user/login-user.d.ts +1 -0
- package/dist/src/components/login-user/login-user.js +61 -55
- package/dist/src/components/login-user/login-user.js.map +1 -1
- package/dist/src/components/login-user/user.repository.d.ts +4 -8
- package/dist/src/components/login-user/user.repository.js +5 -43
- package/dist/src/components/login-user/user.repository.js.map +1 -1
- package/dist/src/components/system/system.repository.d.ts +4 -8
- package/dist/src/components/system/system.repository.js +5 -43
- package/dist/src/components/system/system.repository.js.map +1 -1
- package/dist/src/components/system-access/system-access.repository.d.ts +4 -8
- package/dist/src/components/system-access/system-access.repository.js +5 -43
- package/dist/src/components/system-access/system-access.repository.js.map +1 -1
- package/dist/src/components/user-group/user-group.repository.d.ts +4 -8
- package/dist/src/components/user-group/user-group.repository.js +5 -43
- package/dist/src/components/user-group/user-group.repository.js.map +1 -1
- package/dist/src/components/user-user-group/user-user-group.repository.d.ts +4 -8
- package/dist/src/components/user-user-group/user-user-group.repository.js +5 -43
- package/dist/src/components/user-user-group/user-user-group.repository.js.map +1 -1
- package/dist/src/database.d.ts +4 -0
- package/dist/src/database.js +15 -0
- package/dist/src/database.js.map +1 -0
- package/dist/src/models/authorization-code.entity.d.ts +14 -0
- package/dist/src/models/authorization-code.entity.js +86 -0
- package/dist/src/models/authorization-code.entity.js.map +1 -0
- package/dist/src/models/bearer-token.entity.d.ts +11 -0
- package/dist/src/models/bearer-token.entity.js +72 -0
- package/dist/src/models/bearer-token.entity.js.map +1 -0
- package/dist/src/models/building-type.entity.d.ts +7 -0
- package/dist/src/models/building-type.entity.js +50 -0
- package/dist/src/models/building-type.entity.js.map +1 -0
- package/dist/src/models/building.entity.d.ts +28 -0
- package/dist/src/models/building.entity.js +218 -0
- package/dist/src/models/building.entity.js.map +1 -0
- package/dist/src/models/city.entity.d.ts +11 -0
- package/dist/src/models/city.entity.js +72 -0
- package/dist/src/models/city.entity.js.map +1 -0
- package/dist/src/models/company.entity.d.ts +18 -0
- package/dist/src/models/company.entity.js +114 -0
- package/dist/src/models/company.entity.js.map +1 -0
- package/dist/src/models/country.entity.d.ts +15 -0
- package/dist/src/models/country.entity.js +92 -0
- package/dist/src/models/country.entity.js.map +1 -0
- package/dist/src/models/department.entity.d.ts +19 -0
- package/dist/src/models/department.entity.js +112 -0
- package/dist/src/models/department.entity.js.map +1 -0
- package/dist/src/models/group-role-privilege.entity.d.ts +17 -0
- package/dist/src/models/group-role-privilege.entity.js +90 -0
- package/dist/src/models/group-role-privilege.entity.js.map +1 -0
- package/dist/src/models/group-system-access.entity.d.ts +11 -0
- package/dist/src/models/group-system-access.entity.js +62 -0
- package/dist/src/models/group-system-access.entity.js.map +1 -0
- package/dist/src/models/group-system-privilege.entity.d.ts +11 -0
- package/dist/src/models/group-system-privilege.entity.js +62 -0
- package/dist/src/models/group-system-privilege.entity.js.map +1 -0
- package/dist/src/models/group-system-role.entity.d.ts +11 -0
- package/dist/src/models/group-system-role.entity.js +62 -0
- package/dist/src/models/group-system-role.entity.js.map +1 -0
- package/dist/src/models/login-history.entity.d.ts +12 -0
- package/dist/src/models/login-history.entity.js +70 -0
- package/dist/src/models/login-history.entity.js.map +1 -0
- package/dist/src/models/oauth-token.entity.d.ts +14 -0
- package/dist/src/models/oauth-token.entity.js +86 -0
- package/dist/src/models/oauth-token.entity.js.map +1 -0
- package/dist/src/models/role.entity.d.ts +17 -0
- package/dist/src/models/role.entity.js +102 -0
- package/dist/src/models/role.entity.js.map +1 -0
- package/dist/src/models/staff-type.entity.d.ts +7 -0
- package/dist/src/models/staff-type.entity.js +50 -0
- package/dist/src/models/staff-type.entity.js.map +1 -0
- package/dist/src/models/staff.entity.d.ts +39 -0
- package/dist/src/models/staff.entity.js +250 -0
- package/dist/src/models/staff.entity.js.map +1 -0
- package/dist/src/models/state.entity.d.ts +10 -0
- package/dist/src/models/state.entity.js +64 -0
- package/dist/src/models/state.entity.js.map +1 -0
- package/dist/src/models/system-accesss.entity.d.ts +6 -0
- package/dist/src/models/system-accesss.entity.js +51 -0
- package/dist/src/models/system-accesss.entity.js.map +1 -0
- package/dist/src/models/system-privilege.entity.d.ts +16 -0
- package/dist/src/models/system-privilege.entity.js +90 -0
- package/dist/src/models/system-privilege.entity.js.map +1 -0
- package/dist/src/models/system-role-privilege.entity.d.ts +11 -0
- package/dist/src/models/system-role-privilege.entity.js +60 -0
- package/dist/src/models/system-role-privilege.entity.js.map +1 -0
- package/dist/src/models/system-role.entity.d.ts +11 -0
- package/dist/src/models/system-role.entity.js +83 -0
- package/dist/src/models/system-role.entity.js.map +1 -0
- package/dist/src/models/system.entity.d.ts +19 -0
- package/dist/src/models/system.entity.js +146 -0
- package/dist/src/models/system.entity.js.map +1 -0
- package/dist/src/models/user-group.entity.d.ts +23 -0
- package/dist/src/models/user-group.entity.js +140 -0
- package/dist/src/models/user-group.entity.js.map +1 -0
- package/dist/src/models/user-role.entity.d.ts +9 -0
- package/dist/src/models/user-role.entity.js +62 -0
- package/dist/src/models/user-role.entity.js.map +1 -0
- package/dist/src/models/user-system-privileges.entity.d.ts +13 -0
- package/dist/src/models/user-system-privileges.entity.js +80 -0
- package/dist/src/models/user-system-privileges.entity.js.map +1 -0
- package/dist/src/models/user-system-role.entity.d.ts +11 -0
- package/dist/src/models/user-system-role.entity.js +60 -0
- package/dist/src/models/user-system-role.entity.js.map +1 -0
- package/dist/src/models/user-user-group.entity.d.ts +14 -0
- package/dist/src/models/user-user-group.entity.js +73 -0
- package/dist/src/models/user-user-group.entity.js.map +1 -0
- package/dist/src/models/user.entity.d.ts +30 -0
- package/dist/src/models/user.entity.js +131 -0
- package/dist/src/models/user.entity.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/01-alter-system-privilege-table.js +13 -0
- package/migrations/02-alter-user-group-table.js +78 -0
- package/migrations/03-alter-user-system-privilege-table.js +38 -0
- package/migrations/04-create-user-user-group-table.js +55 -0
- package/migrations/05-create-login-history-table.js +49 -0
- package/package.json +8 -4
- package/src/components/login-history/login-history.repository.ts +35 -23
- package/src/components/login-user/login-user.ts +65 -65
- package/src/components/login-user/user.repository.ts +35 -23
- package/src/components/system/system.repository.ts +34 -23
- package/src/components/system-access/system-access.repository.ts +35 -23
- package/src/components/user-group/user-group.repository.ts +35 -23
- package/src/components/user-user-group/user-user-group.repository.ts +35 -23
- package/src/database.ts +15 -0
- package/src/models/authorization-code.entity.ts +71 -0
- package/src/models/bearer-token.entity.ts +59 -0
- package/src/models/building-type.entity.ts +38 -0
- package/src/models/building.entity.ts +185 -0
- package/src/models/city.entity.ts +59 -0
- package/src/models/company.entity.ts +96 -0
- package/src/models/country.entity.ts +75 -0
- package/src/models/department.entity.ts +94 -0
- package/src/models/group-role-privilege.entity.ts +73 -0
- package/src/models/group-system-access.entity.ts +49 -0
- package/src/models/group-system-privilege.entity.ts +49 -0
- package/src/models/group-system-role.entity.ts +49 -0
- package/src/models/login-history.entity.ts +56 -0
- package/src/models/oauth-token.entity.ts +71 -0
- package/src/models/role.entity.ts +85 -0
- package/src/models/staff-type.entity.ts +38 -0
- package/src/models/staff.entity.ts +213 -0
- package/src/models/state.entity.ts +52 -0
- package/src/models/system-accesss.entity.ts +40 -0
- package/src/models/system-privilege.entity.ts +75 -0
- package/src/models/system-role-privilege.entity.ts +48 -0
- package/src/models/system-role.entity.ts +68 -0
- package/src/models/system.entity.ts +122 -0
- package/src/models/user-group.entity.ts +118 -0
- package/src/models/user-role.entity.ts +50 -0
- package/src/models/user-system-privileges.entity.ts +66 -0
- package/src/models/user-system-role.entity.ts +48 -0
- package/src/models/user-user-group.entity.ts +59 -0
- package/src/models/user.entity.ts +110 -0
- package/dist/src/mail/index.d.ts +0 -2
- package/dist/src/mail/index.js +0 -19
- package/dist/src/mail/index.js.map +0 -1
- package/dist/src/mail/interfaces/index.d.ts +0 -2
- package/dist/src/mail/interfaces/index.js +0 -19
- package/dist/src/mail/interfaces/index.js.map +0 -1
- package/dist/src/mail/interfaces/send-mail.interface.d.ts +0 -8
- package/dist/src/mail/interfaces/send-mail.interface.js +0 -3
- package/dist/src/mail/interfaces/send-mail.interface.js.map +0 -1
- package/dist/src/mail/interfaces/send-new-login-alert.interface.d.ts +0 -6
- package/dist/src/mail/interfaces/send-new-login-alert.interface.js +0 -3
- package/dist/src/mail/interfaces/send-new-login-alert.interface.js.map +0 -1
- package/dist/src/mail/mail.d.ts +0 -7
- package/dist/src/mail/mail.js +0 -49
- package/dist/src/mail/mail.js.map +0 -1
- package/dist/src/mail/mail.service.d.ts +0 -7
- package/dist/src/mail/mail.service.js +0 -42
- package/dist/src/mail/mail.service.js.map +0 -1
@@ -0,0 +1,72 @@
|
|
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
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
13
|
+
const state_entity_1 = require("./state.entity");
|
14
|
+
let City = class City extends sequelize_typescript_1.Model {
|
15
|
+
};
|
16
|
+
__decorate([
|
17
|
+
(0, sequelize_typescript_1.Column)({
|
18
|
+
primaryKey: true,
|
19
|
+
allowNull: false,
|
20
|
+
autoIncrement: true,
|
21
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
22
|
+
}),
|
23
|
+
__metadata("design:type", Number)
|
24
|
+
], City.prototype, "id", void 0);
|
25
|
+
__decorate([
|
26
|
+
(0, sequelize_typescript_1.Column)({
|
27
|
+
allowNull: true,
|
28
|
+
type: sequelize_typescript_1.DataType.STRING,
|
29
|
+
field: 'name',
|
30
|
+
}),
|
31
|
+
__metadata("design:type", String)
|
32
|
+
], City.prototype, "Name", void 0);
|
33
|
+
__decorate([
|
34
|
+
(0, sequelize_typescript_1.ForeignKey)(() => state_entity_1.default),
|
35
|
+
(0, sequelize_typescript_1.Column)({
|
36
|
+
allowNull: true,
|
37
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
38
|
+
field: 'state_id',
|
39
|
+
}),
|
40
|
+
__metadata("design:type", Number)
|
41
|
+
], City.prototype, "StateId", void 0);
|
42
|
+
__decorate([
|
43
|
+
(0, sequelize_typescript_1.Column)({
|
44
|
+
allowNull: true,
|
45
|
+
type: sequelize_typescript_1.DataType.STRING,
|
46
|
+
field: 'postcode',
|
47
|
+
}),
|
48
|
+
__metadata("design:type", String)
|
49
|
+
], City.prototype, "PostCode", void 0);
|
50
|
+
__decorate([
|
51
|
+
sequelize_typescript_1.CreatedAt,
|
52
|
+
__metadata("design:type", Date)
|
53
|
+
], City.prototype, "CreatedAt", void 0);
|
54
|
+
__decorate([
|
55
|
+
sequelize_typescript_1.UpdatedAt,
|
56
|
+
__metadata("design:type", Date)
|
57
|
+
], City.prototype, "UpdatedAt", void 0);
|
58
|
+
__decorate([
|
59
|
+
(0, sequelize_typescript_1.BelongsTo)(() => state_entity_1.default),
|
60
|
+
__metadata("design:type", state_entity_1.default)
|
61
|
+
], City.prototype, "State", void 0);
|
62
|
+
City = __decorate([
|
63
|
+
(0, sequelize_typescript_1.Table)({
|
64
|
+
tableName: 'sso_cities',
|
65
|
+
timestamps: true,
|
66
|
+
createdAt: 'created_at',
|
67
|
+
updatedAt: 'updated_at',
|
68
|
+
underscored: true,
|
69
|
+
})
|
70
|
+
], City);
|
71
|
+
exports.default = City;
|
72
|
+
//# sourceMappingURL=city.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"city.entity.js","sourceRoot":"","sources":["../../../src/models/city.entity.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAS8B;AAC9B,iDAAmC;AASpB,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,4BAAK;CAuCtC,CAAA;AAtCC;IAAC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,aAAa,EAAE,IAAI;QACnB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;gCACS;AAEX;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM;KACd,CAAC;;kCACW;AAEb;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,sBAAK,CAAC;IACvB,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,UAAU;KAClB,CAAC;;qCACc;AAEhB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,UAAU;KAClB,CAAC;;sCACe;AAEjB;IAAC,gCAAS;8BACC,IAAI;uCAAC;AAEhB;IAAC,gCAAS;8BACC,IAAI;uCAAC;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,sBAAK,CAAC;8BAChB,sBAAK;mCAAC;AAtCM,IAAI;IAPxB,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,YAAY;QACvB,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,IAAI;KAClB,CAAC;GACmB,IAAI,CAuCxB;kBAvCoB,IAAI"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
2
|
+
import User from './user.entity';
|
3
|
+
import Staff from './staff.entity';
|
4
|
+
export default class Company extends Model {
|
5
|
+
id: number;
|
6
|
+
Name: string;
|
7
|
+
Code: string;
|
8
|
+
Status: string;
|
9
|
+
Description: string;
|
10
|
+
Logo: string;
|
11
|
+
CreatedById: number;
|
12
|
+
UpdatedById: number;
|
13
|
+
CreatedAt: Date;
|
14
|
+
UpdatedAt: Date;
|
15
|
+
CreatedBy: User;
|
16
|
+
UpdatedBy: User;
|
17
|
+
Staff: Staff[];
|
18
|
+
}
|
@@ -0,0 +1,114 @@
|
|
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
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
13
|
+
const user_entity_1 = require("./user.entity");
|
14
|
+
const staff_entity_1 = require("./staff.entity");
|
15
|
+
let Company = class Company extends sequelize_typescript_1.Model {
|
16
|
+
};
|
17
|
+
__decorate([
|
18
|
+
(0, sequelize_typescript_1.Column)({
|
19
|
+
primaryKey: true,
|
20
|
+
allowNull: false,
|
21
|
+
autoIncrement: true,
|
22
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
23
|
+
}),
|
24
|
+
__metadata("design:type", Number)
|
25
|
+
], Company.prototype, "id", void 0);
|
26
|
+
__decorate([
|
27
|
+
(0, sequelize_typescript_1.Column)({
|
28
|
+
allowNull: false,
|
29
|
+
type: sequelize_typescript_1.DataType.STRING,
|
30
|
+
field: 'name',
|
31
|
+
}),
|
32
|
+
__metadata("design:type", String)
|
33
|
+
], Company.prototype, "Name", void 0);
|
34
|
+
__decorate([
|
35
|
+
(0, sequelize_typescript_1.Column)({
|
36
|
+
allowNull: false,
|
37
|
+
type: sequelize_typescript_1.DataType.STRING,
|
38
|
+
field: 'code',
|
39
|
+
}),
|
40
|
+
__metadata("design:type", String)
|
41
|
+
], Company.prototype, "Code", void 0);
|
42
|
+
__decorate([
|
43
|
+
(0, sequelize_typescript_1.Column)({
|
44
|
+
allowNull: false,
|
45
|
+
type: sequelize_typescript_1.DataType.STRING,
|
46
|
+
field: 'status',
|
47
|
+
}),
|
48
|
+
__metadata("design:type", String)
|
49
|
+
], Company.prototype, "Status", void 0);
|
50
|
+
__decorate([
|
51
|
+
(0, sequelize_typescript_1.Column)({
|
52
|
+
allowNull: true,
|
53
|
+
type: sequelize_typescript_1.DataType.STRING,
|
54
|
+
field: 'description',
|
55
|
+
}),
|
56
|
+
__metadata("design:type", String)
|
57
|
+
], Company.prototype, "Description", void 0);
|
58
|
+
__decorate([
|
59
|
+
(0, sequelize_typescript_1.Column)({
|
60
|
+
allowNull: true,
|
61
|
+
type: sequelize_typescript_1.DataType.TEXT,
|
62
|
+
field: 'logo',
|
63
|
+
}),
|
64
|
+
__metadata("design:type", String)
|
65
|
+
], Company.prototype, "Logo", void 0);
|
66
|
+
__decorate([
|
67
|
+
(0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.default),
|
68
|
+
(0, sequelize_typescript_1.Column)({
|
69
|
+
allowNull: true,
|
70
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
71
|
+
field: 'created_by_id',
|
72
|
+
}),
|
73
|
+
__metadata("design:type", Number)
|
74
|
+
], Company.prototype, "CreatedById", void 0);
|
75
|
+
__decorate([
|
76
|
+
(0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.default),
|
77
|
+
(0, sequelize_typescript_1.Column)({
|
78
|
+
allowNull: true,
|
79
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
80
|
+
field: 'updated_by_id',
|
81
|
+
}),
|
82
|
+
__metadata("design:type", Number)
|
83
|
+
], Company.prototype, "UpdatedById", void 0);
|
84
|
+
__decorate([
|
85
|
+
sequelize_typescript_1.CreatedAt,
|
86
|
+
__metadata("design:type", Date)
|
87
|
+
], Company.prototype, "CreatedAt", void 0);
|
88
|
+
__decorate([
|
89
|
+
sequelize_typescript_1.UpdatedAt,
|
90
|
+
__metadata("design:type", Date)
|
91
|
+
], Company.prototype, "UpdatedAt", void 0);
|
92
|
+
__decorate([
|
93
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.default, 'created_by_id'),
|
94
|
+
__metadata("design:type", user_entity_1.default)
|
95
|
+
], Company.prototype, "CreatedBy", void 0);
|
96
|
+
__decorate([
|
97
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.default, 'updated_by_id'),
|
98
|
+
__metadata("design:type", user_entity_1.default)
|
99
|
+
], Company.prototype, "UpdatedBy", void 0);
|
100
|
+
__decorate([
|
101
|
+
(0, sequelize_typescript_1.HasMany)(() => staff_entity_1.default),
|
102
|
+
__metadata("design:type", Array)
|
103
|
+
], Company.prototype, "Staff", void 0);
|
104
|
+
Company = __decorate([
|
105
|
+
(0, sequelize_typescript_1.Table)({
|
106
|
+
tableName: 'sso_companies',
|
107
|
+
timestamps: true,
|
108
|
+
createdAt: 'created_at',
|
109
|
+
updatedAt: 'updated_at',
|
110
|
+
underscored: true,
|
111
|
+
})
|
112
|
+
], Company);
|
113
|
+
exports.default = Company;
|
114
|
+
//# sourceMappingURL=company.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"company.entity.js","sourceRoot":"","sources":["../../../src/models/company.entity.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAU8B;AAC9B,+CAAiC;AACjC,iDAAmC;AASpB,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CA0EzC,CAAA;AAzEC;IAAC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,aAAa,EAAE,IAAI;QACnB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;mCACS;AAEX;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM;KACd,CAAC;;qCACW;AAEb;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM;KACd,CAAC;;qCACW;AAEb;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,QAAQ;KAChB,CAAC;;uCACa;AAEf;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,aAAa;KACrB,CAAC;;4CACkB;AAEpB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,MAAM;KACd,CAAC;;qCACW;AAEb;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,qBAAI,CAAC;IACtB,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,eAAe;KACvB,CAAC;;4CACkB;AAEpB;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,qBAAI,CAAC;IACtB,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,eAAe;KACvB,CAAC;;4CACkB;AAEpB;IAAC,gCAAS;8BACC,IAAI;0CAAC;AAEhB;IAAC,gCAAS;8BACC,IAAI;0CAAC;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,qBAAI,EAAE,eAAe,CAAC;8BAC5B,qBAAI;0CAAC;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,qBAAI,EAAE,eAAe,CAAC;8BAC5B,qBAAI;0CAAC;AAEhB;IAAC,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,sBAAK,CAAC;;sCACN;AAzEI,OAAO;IAP3B,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,eAAe;QAC1B,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,YAAY;QACvB,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,IAAI;KAClB,CAAC;GACmB,OAAO,CA0E3B;kBA1EoB,OAAO"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
2
|
+
import Building from './building.entity';
|
3
|
+
import State from './state.entity';
|
4
|
+
export default class Country extends Model {
|
5
|
+
id: number;
|
6
|
+
Name: string;
|
7
|
+
Code: string;
|
8
|
+
Phonecode: string;
|
9
|
+
CreatedById: number;
|
10
|
+
UpdatedById: number;
|
11
|
+
CreatedAt: Date;
|
12
|
+
UpdatedAt: Date;
|
13
|
+
States: State[];
|
14
|
+
Buildings: Building[];
|
15
|
+
}
|
@@ -0,0 +1,92 @@
|
|
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
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
13
|
+
const building_entity_1 = require("./building.entity");
|
14
|
+
const state_entity_1 = require("./state.entity");
|
15
|
+
let Country = class Country extends sequelize_typescript_1.Model {
|
16
|
+
};
|
17
|
+
__decorate([
|
18
|
+
(0, sequelize_typescript_1.Column)({
|
19
|
+
primaryKey: true,
|
20
|
+
allowNull: false,
|
21
|
+
autoIncrement: true,
|
22
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
23
|
+
}),
|
24
|
+
__metadata("design:type", Number)
|
25
|
+
], Country.prototype, "id", void 0);
|
26
|
+
__decorate([
|
27
|
+
(0, sequelize_typescript_1.Column)({
|
28
|
+
allowNull: false,
|
29
|
+
type: sequelize_typescript_1.DataType.STRING,
|
30
|
+
field: 'name',
|
31
|
+
}),
|
32
|
+
__metadata("design:type", String)
|
33
|
+
], Country.prototype, "Name", void 0);
|
34
|
+
__decorate([
|
35
|
+
(0, sequelize_typescript_1.Column)({
|
36
|
+
allowNull: false,
|
37
|
+
type: sequelize_typescript_1.DataType.STRING,
|
38
|
+
field: 'code',
|
39
|
+
}),
|
40
|
+
__metadata("design:type", String)
|
41
|
+
], Country.prototype, "Code", void 0);
|
42
|
+
__decorate([
|
43
|
+
(0, sequelize_typescript_1.Column)({
|
44
|
+
allowNull: true,
|
45
|
+
type: sequelize_typescript_1.DataType.STRING,
|
46
|
+
field: 'phonecode',
|
47
|
+
}),
|
48
|
+
__metadata("design:type", String)
|
49
|
+
], Country.prototype, "Phonecode", void 0);
|
50
|
+
__decorate([
|
51
|
+
(0, sequelize_typescript_1.Column)({
|
52
|
+
allowNull: true,
|
53
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
54
|
+
field: 'created_by_id',
|
55
|
+
}),
|
56
|
+
__metadata("design:type", Number)
|
57
|
+
], Country.prototype, "CreatedById", void 0);
|
58
|
+
__decorate([
|
59
|
+
(0, sequelize_typescript_1.Column)({
|
60
|
+
allowNull: true,
|
61
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
62
|
+
field: 'updated_by_id',
|
63
|
+
}),
|
64
|
+
__metadata("design:type", Number)
|
65
|
+
], Country.prototype, "UpdatedById", void 0);
|
66
|
+
__decorate([
|
67
|
+
sequelize_typescript_1.CreatedAt,
|
68
|
+
__metadata("design:type", Date)
|
69
|
+
], Country.prototype, "CreatedAt", void 0);
|
70
|
+
__decorate([
|
71
|
+
sequelize_typescript_1.UpdatedAt,
|
72
|
+
__metadata("design:type", Date)
|
73
|
+
], Country.prototype, "UpdatedAt", void 0);
|
74
|
+
__decorate([
|
75
|
+
(0, sequelize_typescript_1.HasMany)(() => state_entity_1.default),
|
76
|
+
__metadata("design:type", Array)
|
77
|
+
], Country.prototype, "States", void 0);
|
78
|
+
__decorate([
|
79
|
+
(0, sequelize_typescript_1.HasMany)(() => building_entity_1.default),
|
80
|
+
__metadata("design:type", Array)
|
81
|
+
], Country.prototype, "Buildings", void 0);
|
82
|
+
Country = __decorate([
|
83
|
+
(0, sequelize_typescript_1.Table)({
|
84
|
+
tableName: 'sso_countries',
|
85
|
+
timestamps: true,
|
86
|
+
createdAt: 'created_at',
|
87
|
+
updatedAt: 'updated_at',
|
88
|
+
underscored: true,
|
89
|
+
})
|
90
|
+
], Country);
|
91
|
+
exports.default = Country;
|
92
|
+
//# sourceMappingURL=country.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"country.entity.js","sourceRoot":"","sources":["../../../src/models/country.entity.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAQ8B;AAC9B,uDAAyC;AACzC,iDAAmC;AASpB,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAK;CAuDzC,CAAA;AAtDC;IAAC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,aAAa,EAAE,IAAI;QACnB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;mCACS;AAEX;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM;KACd,CAAC;;qCACW;AAEb;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM;KACd,CAAC;;qCACW;AAEb;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,WAAW;KACnB,CAAC;;0CACgB;AAElB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,eAAe;KACvB,CAAC;;4CACkB;AAEpB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,eAAe;KACvB,CAAC;;4CACkB;AAEpB;IAAC,gCAAS;8BACC,IAAI;0CAAC;AAEhB;IAAC,gCAAS;8BACC,IAAI;0CAAC;AAEhB;IAAC,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,sBAAK,CAAC;;uCACL;AAEhB;IAAC,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,yBAAQ,CAAC;;0CACF;AAtDH,OAAO;IAP3B,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,eAAe;QAC1B,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,YAAY;QACvB,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,IAAI;KAClB,CAAC;GACmB,OAAO,CAuD3B;kBAvDoB,OAAO"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
2
|
+
import Building from './building.entity';
|
3
|
+
import User from './user.entity';
|
4
|
+
import Staff from './staff.entity';
|
5
|
+
export default class Department extends Model {
|
6
|
+
id: number;
|
7
|
+
Code: string;
|
8
|
+
BuildingId: number;
|
9
|
+
Name: string;
|
10
|
+
Status: string;
|
11
|
+
CreatedById: number;
|
12
|
+
UpdatedById: number;
|
13
|
+
CreatedAt: Date;
|
14
|
+
UpdatedAt: Date;
|
15
|
+
Staffs: Staff[];
|
16
|
+
Building: Building;
|
17
|
+
CreatedBy: User;
|
18
|
+
UpdatedBy: User;
|
19
|
+
}
|
@@ -0,0 +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
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
13
|
+
const building_entity_1 = require("./building.entity");
|
14
|
+
const user_entity_1 = require("./user.entity");
|
15
|
+
const staff_entity_1 = require("./staff.entity");
|
16
|
+
let Department = class Department extends sequelize_typescript_1.Model {
|
17
|
+
};
|
18
|
+
__decorate([
|
19
|
+
(0, sequelize_typescript_1.Column)({
|
20
|
+
primaryKey: true,
|
21
|
+
allowNull: false,
|
22
|
+
autoIncrement: true,
|
23
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
24
|
+
}),
|
25
|
+
__metadata("design:type", Number)
|
26
|
+
], Department.prototype, "id", void 0);
|
27
|
+
__decorate([
|
28
|
+
(0, sequelize_typescript_1.Column)({
|
29
|
+
allowNull: false,
|
30
|
+
type: sequelize_typescript_1.DataType.STRING,
|
31
|
+
field: 'code',
|
32
|
+
}),
|
33
|
+
__metadata("design:type", String)
|
34
|
+
], Department.prototype, "Code", void 0);
|
35
|
+
__decorate([
|
36
|
+
(0, sequelize_typescript_1.ForeignKey)(() => building_entity_1.default),
|
37
|
+
(0, sequelize_typescript_1.Column)({
|
38
|
+
allowNull: true,
|
39
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
40
|
+
field: 'building_id',
|
41
|
+
}),
|
42
|
+
__metadata("design:type", Number)
|
43
|
+
], Department.prototype, "BuildingId", void 0);
|
44
|
+
__decorate([
|
45
|
+
(0, sequelize_typescript_1.Column)({
|
46
|
+
allowNull: false,
|
47
|
+
type: sequelize_typescript_1.DataType.STRING,
|
48
|
+
field: 'name',
|
49
|
+
}),
|
50
|
+
__metadata("design:type", String)
|
51
|
+
], Department.prototype, "Name", void 0);
|
52
|
+
__decorate([
|
53
|
+
(0, sequelize_typescript_1.Column)({
|
54
|
+
allowNull: false,
|
55
|
+
type: sequelize_typescript_1.DataType.STRING,
|
56
|
+
field: 'status',
|
57
|
+
}),
|
58
|
+
__metadata("design:type", String)
|
59
|
+
], Department.prototype, "Status", void 0);
|
60
|
+
__decorate([
|
61
|
+
(0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.default),
|
62
|
+
(0, sequelize_typescript_1.Column)({
|
63
|
+
allowNull: true,
|
64
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
65
|
+
field: 'created_by_id',
|
66
|
+
}),
|
67
|
+
__metadata("design:type", Number)
|
68
|
+
], Department.prototype, "CreatedById", void 0);
|
69
|
+
__decorate([
|
70
|
+
(0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.default),
|
71
|
+
(0, sequelize_typescript_1.Column)({
|
72
|
+
allowNull: true,
|
73
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
74
|
+
field: 'updated_by_id',
|
75
|
+
}),
|
76
|
+
__metadata("design:type", Number)
|
77
|
+
], Department.prototype, "UpdatedById", void 0);
|
78
|
+
__decorate([
|
79
|
+
sequelize_typescript_1.CreatedAt,
|
80
|
+
__metadata("design:type", Date)
|
81
|
+
], Department.prototype, "CreatedAt", void 0);
|
82
|
+
__decorate([
|
83
|
+
sequelize_typescript_1.UpdatedAt,
|
84
|
+
__metadata("design:type", Date)
|
85
|
+
], Department.prototype, "UpdatedAt", void 0);
|
86
|
+
__decorate([
|
87
|
+
(0, sequelize_typescript_1.HasMany)(() => staff_entity_1.default),
|
88
|
+
__metadata("design:type", Array)
|
89
|
+
], Department.prototype, "Staffs", void 0);
|
90
|
+
__decorate([
|
91
|
+
(0, sequelize_typescript_1.BelongsTo)(() => building_entity_1.default),
|
92
|
+
__metadata("design:type", building_entity_1.default)
|
93
|
+
], Department.prototype, "Building", void 0);
|
94
|
+
__decorate([
|
95
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.default, 'created_by_id'),
|
96
|
+
__metadata("design:type", user_entity_1.default)
|
97
|
+
], Department.prototype, "CreatedBy", void 0);
|
98
|
+
__decorate([
|
99
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.default, 'updated_by_id'),
|
100
|
+
__metadata("design:type", user_entity_1.default)
|
101
|
+
], Department.prototype, "UpdatedBy", void 0);
|
102
|
+
Department = __decorate([
|
103
|
+
(0, sequelize_typescript_1.Table)({
|
104
|
+
tableName: 'sso_departments',
|
105
|
+
timestamps: true,
|
106
|
+
createdAt: 'created_at',
|
107
|
+
updatedAt: 'updated_at',
|
108
|
+
underscored: true,
|
109
|
+
})
|
110
|
+
], Department);
|
111
|
+
exports.default = Department;
|
112
|
+
//# sourceMappingURL=department.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"department.entity.js","sourceRoot":"","sources":["../../../src/models/department.entity.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAU8B;AAC9B,uDAAyC;AACzC,+CAAiC;AACjC,iDAAmC;AASpB,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,4BAAK;CAuE5C,CAAA;AAtEC;IAAC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,aAAa,EAAE,IAAI;QACnB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;sCACS;AAEX;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM;KACd,CAAC;;wCACW;AAEb;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,yBAAQ,CAAC;IAC1B,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,aAAa;KACrB,CAAC;;8CACiB;AAEnB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM;KACd,CAAC;;wCACW;AAEb;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,QAAQ;KAChB,CAAC;;0CACa;AAEf;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,qBAAI,CAAC;IACtB,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,eAAe;KACvB,CAAC;;+CACkB;AAEpB;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,qBAAI,CAAC;IACtB,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,eAAe;KACvB,CAAC;;+CACkB;AAEpB;IAAC,gCAAS;8BACC,IAAI;6CAAC;AAEhB;IAAC,gCAAS;8BACC,IAAI;6CAAC;AAEhB;IAAC,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,sBAAK,CAAC;;0CACL;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,yBAAQ,CAAC;8BAChB,yBAAQ;4CAAC;AAEnB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,qBAAI,EAAE,eAAe,CAAC;8BAC5B,qBAAI;6CAAC;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,qBAAI,EAAE,eAAe,CAAC;8BAC5B,qBAAI;6CAAC;AAtEG,UAAU;IAP9B,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,iBAAiB;QAC5B,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,YAAY;QACvB,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,IAAI;KAClB,CAAC;GACmB,UAAU,CAuE9B;kBAvEoB,UAAU"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
2
|
+
import SystemPrivilege from './system-privilege.entity';
|
3
|
+
import System from './system.entity';
|
4
|
+
import SystemRole from './system-role.entity';
|
5
|
+
import UserGroup from './user-group.entity';
|
6
|
+
export default class GroupRolePrivilege extends Model {
|
7
|
+
GroupCode: string;
|
8
|
+
RoleId: string;
|
9
|
+
PrivilegeId: string;
|
10
|
+
SystemId: number;
|
11
|
+
CreatedById: string;
|
12
|
+
CreatedAt: Date;
|
13
|
+
SystemRole: SystemRole;
|
14
|
+
SystemPrivilege: SystemPrivilege;
|
15
|
+
System: System;
|
16
|
+
UserGroup: UserGroup;
|
17
|
+
}
|
@@ -0,0 +1,90 @@
|
|
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
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
13
|
+
const system_privilege_entity_1 = require("./system-privilege.entity");
|
14
|
+
const system_entity_1 = require("./system.entity");
|
15
|
+
const system_role_entity_1 = require("./system-role.entity");
|
16
|
+
const user_group_entity_1 = require("./user-group.entity");
|
17
|
+
let GroupRolePrivilege = class GroupRolePrivilege extends sequelize_typescript_1.Model {
|
18
|
+
};
|
19
|
+
__decorate([
|
20
|
+
(0, sequelize_typescript_1.ForeignKey)(() => user_group_entity_1.default),
|
21
|
+
(0, sequelize_typescript_1.Column)({
|
22
|
+
primaryKey: true,
|
23
|
+
allowNull: false,
|
24
|
+
type: sequelize_typescript_1.DataType.STRING(10),
|
25
|
+
}),
|
26
|
+
__metadata("design:type", String)
|
27
|
+
], GroupRolePrivilege.prototype, "GroupCode", void 0);
|
28
|
+
__decorate([
|
29
|
+
(0, sequelize_typescript_1.ForeignKey)(() => system_role_entity_1.default),
|
30
|
+
(0, sequelize_typescript_1.Column)({
|
31
|
+
primaryKey: true,
|
32
|
+
allowNull: false,
|
33
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
34
|
+
}),
|
35
|
+
__metadata("design:type", String)
|
36
|
+
], GroupRolePrivilege.prototype, "RoleId", void 0);
|
37
|
+
__decorate([
|
38
|
+
(0, sequelize_typescript_1.ForeignKey)(() => system_privilege_entity_1.default),
|
39
|
+
(0, sequelize_typescript_1.Column)({
|
40
|
+
primaryKey: true,
|
41
|
+
allowNull: false,
|
42
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
43
|
+
}),
|
44
|
+
__metadata("design:type", String)
|
45
|
+
], GroupRolePrivilege.prototype, "PrivilegeId", void 0);
|
46
|
+
__decorate([
|
47
|
+
(0, sequelize_typescript_1.ForeignKey)(() => system_entity_1.default),
|
48
|
+
(0, sequelize_typescript_1.Column)({
|
49
|
+
primaryKey: true,
|
50
|
+
allowNull: false,
|
51
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
52
|
+
}),
|
53
|
+
__metadata("design:type", Number)
|
54
|
+
], GroupRolePrivilege.prototype, "SystemId", void 0);
|
55
|
+
__decorate([
|
56
|
+
(0, sequelize_typescript_1.Column)({
|
57
|
+
allowNull: true,
|
58
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
59
|
+
}),
|
60
|
+
__metadata("design:type", String)
|
61
|
+
], GroupRolePrivilege.prototype, "CreatedById", void 0);
|
62
|
+
__decorate([
|
63
|
+
sequelize_typescript_1.CreatedAt,
|
64
|
+
__metadata("design:type", Date)
|
65
|
+
], GroupRolePrivilege.prototype, "CreatedAt", void 0);
|
66
|
+
__decorate([
|
67
|
+
(0, sequelize_typescript_1.BelongsTo)(() => system_role_entity_1.default),
|
68
|
+
__metadata("design:type", system_role_entity_1.default)
|
69
|
+
], GroupRolePrivilege.prototype, "SystemRole", void 0);
|
70
|
+
__decorate([
|
71
|
+
(0, sequelize_typescript_1.BelongsTo)(() => system_privilege_entity_1.default),
|
72
|
+
__metadata("design:type", system_privilege_entity_1.default)
|
73
|
+
], GroupRolePrivilege.prototype, "SystemPrivilege", void 0);
|
74
|
+
__decorate([
|
75
|
+
(0, sequelize_typescript_1.BelongsTo)(() => system_entity_1.default),
|
76
|
+
__metadata("design:type", system_entity_1.default)
|
77
|
+
], GroupRolePrivilege.prototype, "System", void 0);
|
78
|
+
__decorate([
|
79
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_group_entity_1.default),
|
80
|
+
__metadata("design:type", user_group_entity_1.default)
|
81
|
+
], GroupRolePrivilege.prototype, "UserGroup", void 0);
|
82
|
+
GroupRolePrivilege = __decorate([
|
83
|
+
(0, sequelize_typescript_1.Table)({
|
84
|
+
tableName: 'sso_GroupRolePrivilege',
|
85
|
+
updatedAt: false,
|
86
|
+
createdAt: 'CreatedAt',
|
87
|
+
})
|
88
|
+
], GroupRolePrivilege);
|
89
|
+
exports.default = GroupRolePrivilege;
|
90
|
+
//# sourceMappingURL=group-role-privilege.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"group-role-privilege.entity.js","sourceRoot":"","sources":["../../../src/models/group-role-privilege.entity.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAQ8B;AAC9B,uEAAwD;AACxD,mDAAqC;AACrC,6DAA8C;AAC9C,2DAA4C;AAO7B,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,4BAAK;CAqDpD,CAAA;AApDC;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,2BAAS,CAAC;IAC3B,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;qDACgB;AAElB;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,4BAAU,CAAC;IAC5B,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;kDACa;AAEf;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,iCAAe,CAAC;IACjC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;uDACkB;AAEpB;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uBAAM,CAAC;IACxB,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;oDACe;AAEjB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;uDACkB;AAEpB;IAAC,gCAAS;8BACC,IAAI;qDAAC;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,4BAAU,CAAC;8BAChB,4BAAU;sDAAC;AAEvB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,iCAAe,CAAC;8BAChB,iCAAe;2DAAC;AAEjC;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uBAAM,CAAC;8BAChB,uBAAM;kDAAC;AAEf;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,2BAAS,CAAC;8BAChB,2BAAS;qDAAC;AApDF,kBAAkB;IALtC,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,wBAAwB;QACnC,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,WAAW;KACvB,CAAC;GACmB,kBAAkB,CAqDtC;kBArDoB,kBAAkB"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
2
|
+
import System from './system.entity';
|
3
|
+
import UserGroup from './user-group.entity';
|
4
|
+
export default class GroupSystemAccess extends Model {
|
5
|
+
SystemId: number;
|
6
|
+
GroupCode: string;
|
7
|
+
CreatedById: number;
|
8
|
+
CreatedAt: Date;
|
9
|
+
System: System;
|
10
|
+
UserGroup: UserGroup;
|
11
|
+
}
|
@@ -0,0 +1,62 @@
|
|
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
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
13
|
+
const system_entity_1 = require("./system.entity");
|
14
|
+
const user_group_entity_1 = require("./user-group.entity");
|
15
|
+
let GroupSystemAccess = class GroupSystemAccess extends sequelize_typescript_1.Model {
|
16
|
+
};
|
17
|
+
__decorate([
|
18
|
+
(0, sequelize_typescript_1.ForeignKey)(() => system_entity_1.default),
|
19
|
+
(0, sequelize_typescript_1.Column)({
|
20
|
+
primaryKey: true,
|
21
|
+
allowNull: false,
|
22
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
23
|
+
}),
|
24
|
+
__metadata("design:type", Number)
|
25
|
+
], GroupSystemAccess.prototype, "SystemId", void 0);
|
26
|
+
__decorate([
|
27
|
+
(0, sequelize_typescript_1.ForeignKey)(() => user_group_entity_1.default),
|
28
|
+
(0, sequelize_typescript_1.Column)({
|
29
|
+
primaryKey: true,
|
30
|
+
allowNull: false,
|
31
|
+
type: sequelize_typescript_1.DataType.STRING(10),
|
32
|
+
}),
|
33
|
+
__metadata("design:type", String)
|
34
|
+
], GroupSystemAccess.prototype, "GroupCode", void 0);
|
35
|
+
__decorate([
|
36
|
+
(0, sequelize_typescript_1.Column)({
|
37
|
+
allowNull: false,
|
38
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
39
|
+
}),
|
40
|
+
__metadata("design:type", Number)
|
41
|
+
], GroupSystemAccess.prototype, "CreatedById", void 0);
|
42
|
+
__decorate([
|
43
|
+
sequelize_typescript_1.CreatedAt,
|
44
|
+
__metadata("design:type", Date)
|
45
|
+
], GroupSystemAccess.prototype, "CreatedAt", void 0);
|
46
|
+
__decorate([
|
47
|
+
(0, sequelize_typescript_1.BelongsTo)(() => system_entity_1.default),
|
48
|
+
__metadata("design:type", system_entity_1.default)
|
49
|
+
], GroupSystemAccess.prototype, "System", void 0);
|
50
|
+
__decorate([
|
51
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_group_entity_1.default),
|
52
|
+
__metadata("design:type", user_group_entity_1.default)
|
53
|
+
], GroupSystemAccess.prototype, "UserGroup", void 0);
|
54
|
+
GroupSystemAccess = __decorate([
|
55
|
+
(0, sequelize_typescript_1.Table)({
|
56
|
+
tableName: 'sso_GroupSystemAccess',
|
57
|
+
updatedAt: false,
|
58
|
+
createdAt: 'CreatedAt',
|
59
|
+
})
|
60
|
+
], GroupSystemAccess);
|
61
|
+
exports.default = GroupSystemAccess;
|
62
|
+
//# sourceMappingURL=group-system-access.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"group-system-access.entity.js","sourceRoot":"","sources":["../../../src/models/group-system-access.entity.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAQ8B;AAC9B,mDAAqC;AACrC,2DAA4C;AAO7B,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,4BAAK;CA+BnD,CAAA;AA9BC;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,uBAAM,CAAC;IACxB,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;mDACe;AAEjB;IAAC,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,2BAAS,CAAC;IAC3B,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;oDACgB;AAElB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,OAAO;KACvB,CAAC;;sDACkB;AAEpB;IAAC,gCAAS;8BACC,IAAI;oDAAC;AAEhB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,uBAAM,CAAC;8BAChB,uBAAM;iDAAC;AAEf;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,2BAAS,CAAC;8BAChB,2BAAS;oDAAC;AA9BF,iBAAiB;IALrC,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,uBAAuB;QAClC,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,WAAW;KACvB,CAAC;GACmB,iBAAiB,CA+BrC;kBA/BoB,iBAAiB"}
|