easywork-common-lib 1.0.362 → 1.0.365
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/common/database/base.entity.d.ts +1 -1
- package/dist/common/database/base.entity.js +1 -1
- package/dist/common/database/base.entity.js.map +1 -1
- package/dist/entities/index.d.ts +1 -4
- package/dist/entities/index.js +1 -4
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/notifications/notification.entity.d.ts +1 -1
- package/dist/entities/notifications/notification.entity.js +1 -1
- package/dist/entities/notifications/notification.entity.js.map +1 -1
- package/dist/entities/notifications/push-token.entity.d.ts +1 -1
- package/dist/entities/notifications/push-token.entity.js +1 -1
- package/dist/entities/notifications/push-token.entity.js.map +1 -1
- package/dist/entities/otp-log.entity.d.ts +1 -1
- package/dist/entities/otp-log.entity.js +1 -1
- package/dist/entities/otp-log.entity.js.map +1 -1
- package/dist/entities/permission.entity.d.ts +1 -1
- package/dist/entities/permission.entity.js +1 -1
- package/dist/entities/permission.entity.js.map +1 -1
- package/dist/entities/refresh-token.entity.d.ts +1 -1
- package/dist/entities/refresh-token.entity.js +1 -1
- package/dist/entities/refresh-token.entity.js.map +1 -1
- package/dist/entities/sales/contact.entity.d.ts +1 -1
- package/dist/entities/sales/contact.entity.js +1 -1
- package/dist/entities/sales/contact.entity.js.map +1 -1
- package/dist/entities/sales/lead.entity.d.ts +1 -1
- package/dist/entities/sales/lead.entity.js +1 -1
- package/dist/entities/sales/lead.entity.js.map +1 -1
- package/dist/entities/sales/poliza.entity.d.ts +1 -1
- package/dist/entities/sales/poliza.entity.js +1 -1
- package/dist/entities/sales/poliza.entity.js.map +1 -1
- package/dist/entities/sales/receipt.entity.d.ts +1 -1
- package/dist/entities/sales/receipt.entity.js +1 -1
- package/dist/entities/sales/receipt.entity.js.map +1 -1
- package/dist/entities/tag.entity.d.ts +1 -1
- package/dist/entities/tag.entity.js +1 -1
- package/dist/entities/tag.entity.js.map +1 -1
- package/dist/entities/thirdparty/user-email-relation.entity.d.ts +1 -1
- package/dist/entities/thirdparty/user-email-relation.entity.js +1 -1
- package/dist/entities/thirdparty/user-email-relation.entity.js.map +1 -1
- package/dist/entities/tools/calendar/event.entity.d.ts +1 -1
- package/dist/entities/tools/calendar/event.entity.js +1 -1
- package/dist/entities/tools/calendar/event.entity.js.map +1 -1
- package/dist/entities/tools/task-comment.entity.d.ts +1 -1
- package/dist/entities/tools/task-comment.entity.js +1 -1
- package/dist/entities/tools/task-comment.entity.js.map +1 -1
- package/dist/entities/tools/task.entity.d.ts +1 -1
- package/dist/entities/tools/task.entity.js +1 -1
- package/dist/entities/tools/task.entity.js.map +1 -1
- package/dist/entities/user/group.entity.d.ts +5 -0
- package/dist/entities/user/group.entity.js +33 -0
- package/dist/entities/user/group.entity.js.map +1 -0
- package/dist/entities/user/index.d.ts +6 -0
- package/dist/entities/user/index.js +23 -0
- package/dist/entities/user/index.js.map +1 -0
- package/dist/entities/user/menu-permissions.entity.d.ts +7 -0
- package/dist/entities/user/menu-permissions.entity.js +42 -0
- package/dist/entities/user/menu-permissions.entity.js.map +1 -0
- package/dist/entities/user/profile.entity.d.ts +9 -0
- package/dist/entities/user/profile.entity.js +56 -0
- package/dist/entities/user/profile.entity.js.map +1 -0
- package/dist/entities/user/role.entity.d.ts +5 -0
- package/dist/entities/user/role.entity.js +36 -0
- package/dist/entities/user/role.entity.js.map +1 -0
- package/dist/entities/user/user.entity.d.ts +28 -0
- package/dist/entities/user/user.entity.js +160 -0
- package/dist/entities/user/user.entity.js.map +1 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.TaskComment = void 0;
|
|
13
13
|
const common_1 = require("../../common");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const user_entity_1 = require("../user.entity");
|
|
15
|
+
const user_entity_1 = require("../user/user.entity");
|
|
16
16
|
const typeorm_1 = require("typeorm");
|
|
17
17
|
const task_entity_1 = require("./task.entity");
|
|
18
18
|
const swagger_1 = require("@nestjs/swagger");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/tools/task-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA0C;AAC1C,qDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"task-comment.entity.js","sourceRoot":"","sources":["../../../src/entities/tools/task-comment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA0C;AAC1C,qDAA4C;AAC5C,qDAA2C;AAC3C,qCAAoD;AACpD,+CAAqC;AACrC,6CAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,mBAAU;IAIvC,OAAO,CAAS;IAIhB,SAAS,CAAU;IAQnB,SAAS,CAAO;IAOhB,IAAI,CAAO;CACd,CAAA;AAxBY,kCAAW;AAIpB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACxE,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACT;AAIhB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACzF,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8CACR;AAQnB;IANC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC/F,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACnB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACjB,CAAC;8BACS,kBAAI;8CAAC;AAOhB;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAClF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;8BACI,kBAAI;yCAAC;sBAvBF,WAAW;IADvB,IAAA,gBAAM,GAAE;GACI,WAAW,CAwBvB"}
|
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Task = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
const user_entity_1 = require("../user.entity");
|
|
14
|
+
const user_entity_1 = require("../user/user.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const task_comment_entity_1 = require("./task-comment.entity");
|
|
17
17
|
const tag_entity_1 = require("../tag.entity");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.entity.js","sourceRoot":"","sources":["../../../src/entities/tools/task.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"task.entity.js","sourceRoot":"","sources":["../../../src/entities/tools/task.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,qDAA2C;AAC3C,qCAA6G;AAC7G,+DAAoD;AACpD,8CAAoC;AACpC,yCAA0C;AAC1C,8CAAgD;AAChD,uDAAkD;AAClD,oDAAiD;AACjD,6CAA8C;AAGvC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,mBAAU;IAGhC,QAAQ,CAAS;IAKjB,IAAI,CAAS;IAIb,MAAM,CAA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B,CAAC;IACD,IAAA,oBAAU,GAAE;8BACA,IAAI;wCAAC;AAIlB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;;sCAC7B;eA7IT,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CA8IhB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.Group = void 0;
|
|
13
|
+
const database_1 = require("../../common/database");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
let Group = class Group extends database_1.BaseEntity {
|
|
17
|
+
name;
|
|
18
|
+
level;
|
|
19
|
+
};
|
|
20
|
+
exports.Group = Group;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.MinLength)(1),
|
|
23
|
+
(0, typeorm_1.Column)({ unique: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Group.prototype, "name", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], Group.prototype, "level", void 0);
|
|
30
|
+
exports.Group = Group = __decorate([
|
|
31
|
+
(0, typeorm_1.Entity)()
|
|
32
|
+
], Group);
|
|
33
|
+
//# sourceMappingURL=group.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.entity.js","sourceRoot":"","sources":["../../../src/entities/user/group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,qBAAU;IAGnC,IAAI,CAAS;IAGb,KAAK,CAAS;CACf,CAAA;AAPY,sBAAK;AAGhB;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;mCACZ;AAGb;IADC,IAAA,gBAAM,GAAE;;oCACK;gBANH,KAAK;IADjB,IAAA,gBAAM,GAAE;GACI,KAAK,CAOjB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./group.entity"), exports);
|
|
18
|
+
__exportStar(require("./index"), exports);
|
|
19
|
+
__exportStar(require("./user.entity"), exports);
|
|
20
|
+
__exportStar(require("./role.entity"), exports);
|
|
21
|
+
__exportStar(require("./profile.entity"), exports);
|
|
22
|
+
__exportStar(require("./menu-permissions.entity"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/user/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,0CAAwB;AACxB,gDAA8B;AAC9B,gDAA8B;AAC9B,mDAAiC;AACjC,4DAA0C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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.MenuPermissions = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const database_1 = require("../../common/database");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const user_entity_1 = require("./user.entity");
|
|
17
|
+
let MenuPermissions = class MenuPermissions extends database_1.BaseEntity {
|
|
18
|
+
menu;
|
|
19
|
+
deny;
|
|
20
|
+
user;
|
|
21
|
+
};
|
|
22
|
+
exports.MenuPermissions = MenuPermissions;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)("string", { array: true }),
|
|
25
|
+
__metadata("design:type", Array)
|
|
26
|
+
], MenuPermissions.prototype, "menu", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)("string", { array: true }),
|
|
29
|
+
__metadata("design:type", Array)
|
|
30
|
+
], MenuPermissions.prototype, "deny", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User associated with the Menu Permission' }),
|
|
33
|
+
(0, typeorm_1.OneToOne)(() => user_entity_1.User, user => user.profile, {
|
|
34
|
+
onDelete: "CASCADE",
|
|
35
|
+
onUpdate: "CASCADE",
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", user_entity_1.User)
|
|
38
|
+
], MenuPermissions.prototype, "user", void 0);
|
|
39
|
+
exports.MenuPermissions = MenuPermissions = __decorate([
|
|
40
|
+
(0, typeorm_1.Entity)()
|
|
41
|
+
], MenuPermissions);
|
|
42
|
+
//# sourceMappingURL=menu-permissions.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-permissions.entity.js","sourceRoot":"","sources":["../../../src/entities/user/menu-permissions.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,oDAAmD;AACnD,qCAAmD;AACnD,+CAAqC;AAG9B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,qBAAU;IAE7C,IAAI,CAAW;IAGf,IAAI,CAAW;IAOf,IAAI,CAAO;CACZ,CAAA;AAbY,0CAAe;AAE1B;IADC,IAAA,gBAAM,EAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;;6CAClB;AAGf;IADC,IAAA,gBAAM,EAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;;6CAClB;AAOf;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;IAC1F,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;QAC1C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACI,kBAAI;6CAAC;0BAZA,eAAe;IAD3B,IAAA,gBAAM,GAAE;GACI,eAAe,CAa3B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.Profile = void 0;
|
|
13
|
+
const database_1 = require("../../common/database");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const user_entity_1 = require("./user.entity");
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
17
|
+
let Profile = class Profile extends database_1.BaseEntity {
|
|
18
|
+
firstName;
|
|
19
|
+
lastName;
|
|
20
|
+
idcard;
|
|
21
|
+
birthday;
|
|
22
|
+
user;
|
|
23
|
+
};
|
|
24
|
+
exports.Profile = Profile;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'First name of the user', required: false }),
|
|
27
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Profile.prototype, "firstName", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Last name of the user', required: false }),
|
|
32
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Profile.prototype, "lastName", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ID card of the user', required: false }),
|
|
37
|
+
(0, typeorm_1.Column)({ unique: true, nullable: true }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Profile.prototype, "idcard", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Birthday of the user', required: false }),
|
|
42
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], Profile.prototype, "birthday", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User associated with the profile' }),
|
|
47
|
+
(0, typeorm_1.OneToOne)(() => user_entity_1.User, user => user.profile, {
|
|
48
|
+
onDelete: "CASCADE",
|
|
49
|
+
onUpdate: "CASCADE",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", user_entity_1.User)
|
|
52
|
+
], Profile.prototype, "user", void 0);
|
|
53
|
+
exports.Profile = Profile = __decorate([
|
|
54
|
+
(0, typeorm_1.Entity)("user_profile")
|
|
55
|
+
], Profile);
|
|
56
|
+
//# sourceMappingURL=profile.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.entity.js","sourceRoot":"","sources":["../../../src/entities/user/profile.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAAmD;AACnD,+CAAqC;AACrC,6CAA8C;AAGvC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qBAAU;IAGrC,SAAS,CAAS;IAIlB,QAAQ,CAAS;IAIjB,MAAM,CAAS;IAIf,QAAQ,CAAO;IAOf,IAAI,CAAO;CACZ,CAAA;AAvBY,0BAAO;AAGlB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACrF,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACT;AAIlB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,uBAAuB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACpF,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACV;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAClF,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC1B;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACjF,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACjB,IAAI;yCAAC;AAOf;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAClF,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;QAC1C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACI,kBAAI;qCAAC;kBAtBA,OAAO;IADnB,IAAA,gBAAM,EAAC,cAAc,CAAC;GACV,OAAO,CAuBnB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.Role = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const database_1 = require("../../common/database");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
let Role = class Role extends database_1.BaseEntity {
|
|
18
|
+
name;
|
|
19
|
+
isDefault;
|
|
20
|
+
};
|
|
21
|
+
exports.Role = Role;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Name of the role', minLength: 3 }),
|
|
24
|
+
(0, class_validator_1.MinLength)(3),
|
|
25
|
+
(0, typeorm_1.Column)({ unique: true }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Role.prototype, "name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: '¿Is this the default role?' }),
|
|
30
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
31
|
+
__metadata("design:type", Boolean)
|
|
32
|
+
], Role.prototype, "isDefault", void 0);
|
|
33
|
+
exports.Role = Role = __decorate([
|
|
34
|
+
(0, typeorm_1.Entity)()
|
|
35
|
+
], Role);
|
|
36
|
+
//# sourceMappingURL=role.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../../src/entities/user/role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,oDAAmD;AACnD,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAIlC,IAAI,CAAS;IAIb,SAAS,CAAU;CACpB,CAAA;AATY,oBAAI;AAIf;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAC5E,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;kCACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IACzE,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uCACR;eARR,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CAShB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseEntity } from "../../common/database";
|
|
2
|
+
import { Profile } from "./profile.entity";
|
|
3
|
+
import { Role } from "./role.entity";
|
|
4
|
+
import { Tag } from "./../tag.entity";
|
|
5
|
+
import { UserEmailRelation } from "./../thirdparty/user-email-relation.entity";
|
|
6
|
+
import { PushToken } from "./../notifications/push-token.entity";
|
|
7
|
+
import { Group } from "./group.entity";
|
|
8
|
+
import { MenuPermissions } from "./menu-permissions.entity";
|
|
9
|
+
export declare class User extends BaseEntity {
|
|
10
|
+
username: string;
|
|
11
|
+
email: string;
|
|
12
|
+
bio: string;
|
|
13
|
+
avatar: string;
|
|
14
|
+
hash: string;
|
|
15
|
+
twoFactorSecret?: string;
|
|
16
|
+
isTwoFactorEnabled?: boolean;
|
|
17
|
+
phone?: string;
|
|
18
|
+
isVerified?: boolean;
|
|
19
|
+
lastLogin?: Date;
|
|
20
|
+
profile: Profile;
|
|
21
|
+
roles?: Role[];
|
|
22
|
+
tags: Tag[];
|
|
23
|
+
pushTokens: PushToken[];
|
|
24
|
+
emailRelations: UserEmailRelation[];
|
|
25
|
+
groups?: Group[];
|
|
26
|
+
menuPermissions: MenuPermissions;
|
|
27
|
+
get name(): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
const database_1 = require("../../common/database");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
const profile_entity_1 = require("./profile.entity");
|
|
17
|
+
const role_entity_1 = require("./role.entity");
|
|
18
|
+
const tag_entity_1 = require("./../tag.entity");
|
|
19
|
+
const user_email_relation_entity_1 = require("./../thirdparty/user-email-relation.entity");
|
|
20
|
+
const push_token_entity_1 = require("./../notifications/push-token.entity");
|
|
21
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
22
|
+
const group_entity_1 = require("./group.entity");
|
|
23
|
+
const menu_permissions_entity_1 = require("./menu-permissions.entity");
|
|
24
|
+
let User = class User extends database_1.BaseEntity {
|
|
25
|
+
username;
|
|
26
|
+
email;
|
|
27
|
+
bio;
|
|
28
|
+
avatar;
|
|
29
|
+
hash;
|
|
30
|
+
twoFactorSecret;
|
|
31
|
+
isTwoFactorEnabled;
|
|
32
|
+
phone;
|
|
33
|
+
isVerified;
|
|
34
|
+
lastLogin;
|
|
35
|
+
profile;
|
|
36
|
+
roles;
|
|
37
|
+
tags;
|
|
38
|
+
pushTokens;
|
|
39
|
+
emailRelations;
|
|
40
|
+
groups;
|
|
41
|
+
menuPermissions;
|
|
42
|
+
get name() {
|
|
43
|
+
return `${this.profile?.firstName ?? ''} ${this.profile?.lastName ?? ''}`.trim();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.User = User;
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Unique username' }),
|
|
49
|
+
(0, typeorm_1.Column)({ unique: true }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], User.prototype, "username", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Unique email address' }),
|
|
54
|
+
(0, typeorm_1.Column)({ unique: true }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], User.prototype, "email", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'User bio' }),
|
|
59
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], User.prototype, "bio", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'User avatar URL' }),
|
|
64
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], User.prototype, "avatar", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_transformer_1.Exclude)(),
|
|
69
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Password hash', writeOnly: true }),
|
|
70
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], User.prototype, "hash", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_transformer_1.Exclude)(),
|
|
75
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Two-factor authentication secret', required: false, writeOnly: true }),
|
|
76
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], User.prototype, "twoFactorSecret", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is two-factor authentication enabled', default: false }),
|
|
81
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
82
|
+
__metadata("design:type", Boolean)
|
|
83
|
+
], User.prototype, "isTwoFactorEnabled", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'User phone number', required: false }),
|
|
86
|
+
(0, typeorm_1.Column)({ unique: true }),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], User.prototype, "phone", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is user verified', default: false }),
|
|
91
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
92
|
+
__metadata("design:type", Boolean)
|
|
93
|
+
], User.prototype, "isVerified", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Last login timestamp', required: false }),
|
|
96
|
+
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
97
|
+
__metadata("design:type", Date)
|
|
98
|
+
], User.prototype, "lastLogin", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiProperty)({ type: () => profile_entity_1.Profile, description: 'User profile' }),
|
|
101
|
+
(0, typeorm_1.OneToOne)(() => profile_entity_1.Profile, {
|
|
102
|
+
onDelete: "CASCADE",
|
|
103
|
+
onUpdate: "CASCADE",
|
|
104
|
+
eager: true
|
|
105
|
+
}),
|
|
106
|
+
(0, typeorm_1.JoinColumn)(),
|
|
107
|
+
__metadata("design:type", profile_entity_1.Profile)
|
|
108
|
+
], User.prototype, "profile", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, swagger_1.ApiProperty)({ type: () => [role_entity_1.Role], description: 'Roles assigned to the user' }),
|
|
111
|
+
(0, typeorm_1.ManyToMany)(() => role_entity_1.Role, {
|
|
112
|
+
onDelete: "CASCADE",
|
|
113
|
+
onUpdate: "CASCADE",
|
|
114
|
+
}),
|
|
115
|
+
(0, typeorm_1.JoinTable)(),
|
|
116
|
+
__metadata("design:type", Array)
|
|
117
|
+
], User.prototype, "roles", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, swagger_1.ApiProperty)({ type: () => [tag_entity_1.Tag], description: 'Tags associated with the user' }),
|
|
120
|
+
(0, typeorm_1.OneToMany)(() => tag_entity_1.Tag, (tag) => tag.user),
|
|
121
|
+
__metadata("design:type", Array)
|
|
122
|
+
], User.prototype, "tags", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, swagger_1.ApiProperty)({ type: () => [push_token_entity_1.PushToken], description: 'Push tokens associated with the user' }),
|
|
125
|
+
(0, typeorm_1.OneToMany)(() => push_token_entity_1.PushToken, (pushToken) => pushToken.user),
|
|
126
|
+
__metadata("design:type", Array)
|
|
127
|
+
], User.prototype, "pushTokens", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, swagger_1.ApiProperty)({ type: () => [user_email_relation_entity_1.UserEmailRelation], description: 'Email relations associated with the user' }),
|
|
130
|
+
(0, typeorm_1.OneToMany)(() => user_email_relation_entity_1.UserEmailRelation, (relation) => relation.user),
|
|
131
|
+
__metadata("design:type", Array)
|
|
132
|
+
], User.prototype, "emailRelations", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, swagger_1.ApiProperty)({ type: () => [group_entity_1.Group], description: 'Groups assigned to the user' }),
|
|
135
|
+
(0, typeorm_1.ManyToMany)(() => group_entity_1.Group, {
|
|
136
|
+
onDelete: "CASCADE",
|
|
137
|
+
onUpdate: "CASCADE",
|
|
138
|
+
}),
|
|
139
|
+
(0, typeorm_1.JoinTable)(),
|
|
140
|
+
__metadata("design:type", Array)
|
|
141
|
+
], User.prototype, "groups", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, swagger_1.ApiProperty)({ type: () => menu_permissions_entity_1.MenuPermissions, description: 'Menu Permissions' }),
|
|
144
|
+
(0, typeorm_1.OneToOne)(() => menu_permissions_entity_1.MenuPermissions, {
|
|
145
|
+
onDelete: "CASCADE",
|
|
146
|
+
onUpdate: "CASCADE",
|
|
147
|
+
eager: true
|
|
148
|
+
}),
|
|
149
|
+
(0, typeorm_1.JoinColumn)(),
|
|
150
|
+
__metadata("design:type", menu_permissions_entity_1.MenuPermissions)
|
|
151
|
+
], User.prototype, "menuPermissions", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Full name of the user' }),
|
|
154
|
+
__metadata("design:type", String),
|
|
155
|
+
__metadata("design:paramtypes", [])
|
|
156
|
+
], User.prototype, "name", null);
|
|
157
|
+
exports.User = User = __decorate([
|
|
158
|
+
(0, typeorm_1.Entity)()
|
|
159
|
+
], User);
|
|
160
|
+
//# sourceMappingURL=user.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../src/entities/user/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAAiG;AACjG,yDAA4C;AAC5C,qDAA2C;AAC3C,+CAAqC;AACrC,gDAAsC;AACtC,2FAA+E;AAC/E,4EAAiE;AACjE,6CAA8C;AAC9C,iDAAuC;AACvC,uEAA4D;AAGrD,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAGlC,QAAQ,CAAU;IAIlB,KAAK,CAAU;IAIf,GAAG,CAAU;IAIb,MAAM,CAAU;IAKhB,IAAI,CAAU;IAKd,eAAe,CAAU;IAIzB,kBAAkB,CAAW;IAI7B,KAAK,CAAU;IAIf,UAAU,CAAW;IAIrB,SAAS,CAAQ;IASjB,OAAO,CAAU;IAQjB,KAAK,CAAU;IAIf,IAAI,CAAQ;IAIZ,UAAU,CAAc;IAIxB,cAAc,CAAsB;IAQpC,MAAM,CAAW;IASjB,eAAe,CAAkB;IAGjC,IACI,IAAI;QACN,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,IAAI,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAA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