easywork-common-lib 1.0.1045 → 1.0.1046
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 +2 -2
- package/dist/common/database/base.entity.js +18 -30
- package/dist/common/database/base.entity.js.map +1 -1
- package/dist/entities/app_config/app-config.entity.d.ts +2 -7
- package/dist/entities/app_config/app-config.entity.js +4 -31
- package/dist/entities/app_config/app-config.entity.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,17 +13,17 @@ exports.BaseEntityOnlyEssential = exports.BaseEntitySimple = exports.EntityBaseW
|
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const entities_1 = require("../../entities");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
-
|
|
16
|
+
class EntityBase extends typeorm_1.BaseEntity {
|
|
17
17
|
id;
|
|
18
18
|
isActive;
|
|
19
19
|
isDeleted;
|
|
20
20
|
createdAt;
|
|
21
21
|
updatedAt;
|
|
22
22
|
deletedAt;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
exports.EntityBase = EntityBase;
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], EntityBase.prototype, "id", void 0);
|
|
29
29
|
__decorate([
|
|
@@ -46,10 +46,7 @@ __decorate([
|
|
|
46
46
|
(0, typeorm_1.DeleteDateColumn)(),
|
|
47
47
|
__metadata("design:type", Date)
|
|
48
48
|
], EntityBase.prototype, "deletedAt", void 0);
|
|
49
|
-
|
|
50
|
-
(0, typeorm_1.Entity)()
|
|
51
|
-
], EntityBase);
|
|
52
|
-
let EntityBaseWithUser = class EntityBaseWithUser extends typeorm_1.BaseEntity {
|
|
49
|
+
class EntityBaseWithUser extends typeorm_1.BaseEntity {
|
|
53
50
|
id;
|
|
54
51
|
isActive;
|
|
55
52
|
isDeleted;
|
|
@@ -58,10 +55,10 @@ let EntityBaseWithUser = class EntityBaseWithUser extends typeorm_1.BaseEntity {
|
|
|
58
55
|
deletedAt;
|
|
59
56
|
createdBy;
|
|
60
57
|
updatedBy;
|
|
61
|
-
}
|
|
58
|
+
}
|
|
62
59
|
exports.EntityBaseWithUser = EntityBaseWithUser;
|
|
63
60
|
__decorate([
|
|
64
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
61
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
65
62
|
__metadata("design:type", String)
|
|
66
63
|
], EntityBaseWithUser.prototype, "id", void 0);
|
|
67
64
|
__decorate([
|
|
@@ -87,12 +84,12 @@ __decorate([
|
|
|
87
84
|
__decorate([
|
|
88
85
|
(0, swagger_1.ApiProperty)({
|
|
89
86
|
type: () => entities_1.User,
|
|
90
|
-
description:
|
|
87
|
+
description: 'User who created the entity',
|
|
91
88
|
required: false,
|
|
92
89
|
}),
|
|
93
90
|
(0, typeorm_1.ManyToOne)(() => entities_1.User, {
|
|
94
|
-
onDelete:
|
|
95
|
-
onUpdate:
|
|
91
|
+
onDelete: 'SET NULL',
|
|
92
|
+
onUpdate: 'CASCADE',
|
|
96
93
|
nullable: true,
|
|
97
94
|
}),
|
|
98
95
|
(0, typeorm_1.JoinColumn)(),
|
|
@@ -101,29 +98,26 @@ __decorate([
|
|
|
101
98
|
__decorate([
|
|
102
99
|
(0, swagger_1.ApiProperty)({
|
|
103
100
|
type: () => entities_1.User,
|
|
104
|
-
description:
|
|
101
|
+
description: 'User who modified the entity',
|
|
105
102
|
required: false,
|
|
106
103
|
}),
|
|
107
104
|
(0, typeorm_1.ManyToOne)(() => entities_1.User, {
|
|
108
|
-
onDelete:
|
|
109
|
-
onUpdate:
|
|
105
|
+
onDelete: 'SET NULL',
|
|
106
|
+
onUpdate: 'CASCADE',
|
|
110
107
|
nullable: true,
|
|
111
108
|
}),
|
|
112
109
|
(0, typeorm_1.JoinColumn)(),
|
|
113
110
|
__metadata("design:type", entities_1.User)
|
|
114
111
|
], EntityBaseWithUser.prototype, "updatedBy", void 0);
|
|
115
|
-
|
|
116
|
-
(0, typeorm_1.Entity)()
|
|
117
|
-
], EntityBaseWithUser);
|
|
118
|
-
let BaseEntitySimple = class BaseEntitySimple extends typeorm_1.BaseEntity {
|
|
112
|
+
class BaseEntitySimple extends typeorm_1.BaseEntity {
|
|
119
113
|
id;
|
|
120
114
|
createdAt;
|
|
121
115
|
updatedAt;
|
|
122
116
|
deletedAt;
|
|
123
|
-
}
|
|
117
|
+
}
|
|
124
118
|
exports.BaseEntitySimple = BaseEntitySimple;
|
|
125
119
|
__decorate([
|
|
126
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
120
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
127
121
|
__metadata("design:type", String)
|
|
128
122
|
], BaseEntitySimple.prototype, "id", void 0);
|
|
129
123
|
__decorate([
|
|
@@ -138,17 +132,14 @@ __decorate([
|
|
|
138
132
|
(0, typeorm_1.DeleteDateColumn)(),
|
|
139
133
|
__metadata("design:type", Date)
|
|
140
134
|
], BaseEntitySimple.prototype, "deletedAt", void 0);
|
|
141
|
-
|
|
142
|
-
(0, typeorm_1.Entity)()
|
|
143
|
-
], BaseEntitySimple);
|
|
144
|
-
let BaseEntityOnlyEssential = class BaseEntityOnlyEssential extends typeorm_1.BaseEntity {
|
|
135
|
+
class BaseEntityOnlyEssential extends typeorm_1.BaseEntity {
|
|
145
136
|
id;
|
|
146
137
|
createdAt;
|
|
147
138
|
updatedAt;
|
|
148
|
-
}
|
|
139
|
+
}
|
|
149
140
|
exports.BaseEntityOnlyEssential = BaseEntityOnlyEssential;
|
|
150
141
|
__decorate([
|
|
151
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
142
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
152
143
|
__metadata("design:type", String)
|
|
153
144
|
], BaseEntityOnlyEssential.prototype, "id", void 0);
|
|
154
145
|
__decorate([
|
|
@@ -159,7 +150,4 @@ __decorate([
|
|
|
159
150
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
160
151
|
__metadata("design:type", Date)
|
|
161
152
|
], BaseEntityOnlyEssential.prototype, "updatedAt", void 0);
|
|
162
|
-
exports.BaseEntityOnlyEssential = BaseEntityOnlyEssential = __decorate([
|
|
163
|
-
(0, typeorm_1.Entity)()
|
|
164
|
-
], BaseEntityOnlyEssential);
|
|
165
153
|
//# sourceMappingURL=base.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.entity.js","sourceRoot":"","sources":["../../../src/common/database/base.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,6CAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"base.entity.js","sourceRoot":"","sources":["../../../src/common/database/base.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,6CAAsC;AACtC,qCAAkJ;AAElJ,MAAa,UAAW,SAAQ,oBAAU;IAExC,EAAE,CAAU;IAGZ,QAAQ,CAAW;IAGnB,SAAS,CAAW;IAGpB,SAAS,CAAQ;IAGjB,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB;AAlBD,gCAkBC;AAhBC;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;sCACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;4CACP;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6CACP;AAGpB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;6CAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;6CAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;6CAAC;AAGnB,MAAa,kBAAmB,SAAQ,oBAAU;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AU;IAGZ,SAAS,CAAQ;IAGjB,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB;AAZD,4CAYC;AAVC;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;4CACnB;AAGZ;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;mDAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;mDAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;mDAAC;AAGnB,MAAa,uBAAwB,SAAQ,oBAAU;IAErD,EAAE,CAAU;IAGZ,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB;AATD,0DASC;AAPC;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;mDACnB;AAGZ;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;0DAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;0DAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
isActive?: boolean;
|
|
4
|
-
isDeleted?: boolean;
|
|
5
|
-
createdAt?: Date;
|
|
6
|
-
updatedAt?: Date;
|
|
7
|
-
deletedAt?: Date;
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
export declare class AppConfig extends EntityBase {
|
|
8
3
|
key: string;
|
|
9
4
|
value: string;
|
|
10
5
|
}
|
|
@@ -10,43 +10,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AppConfig = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
13
15
|
const typeorm_1 = require("typeorm");
|
|
14
|
-
let AppConfig = class AppConfig {
|
|
15
|
-
id;
|
|
16
|
-
isActive;
|
|
17
|
-
isDeleted;
|
|
18
|
-
createdAt;
|
|
19
|
-
updatedAt;
|
|
20
|
-
deletedAt;
|
|
16
|
+
let AppConfig = class AppConfig extends base_entity_1.EntityBase {
|
|
21
17
|
key;
|
|
22
18
|
value;
|
|
23
19
|
};
|
|
24
20
|
exports.AppConfig = AppConfig;
|
|
25
21
|
__decorate([
|
|
26
|
-
(0,
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], AppConfig.prototype, "id", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ default: true }),
|
|
31
|
-
__metadata("design:type", Boolean)
|
|
32
|
-
], AppConfig.prototype, "isActive", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
35
|
-
__metadata("design:type", Boolean)
|
|
36
|
-
], AppConfig.prototype, "isDeleted", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
39
|
-
__metadata("design:type", Date)
|
|
40
|
-
], AppConfig.prototype, "createdAt", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.UpdateDateColumn)(),
|
|
43
|
-
__metadata("design:type", Date)
|
|
44
|
-
], AppConfig.prototype, "updatedAt", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.DeleteDateColumn)(),
|
|
47
|
-
__metadata("design:type", Date)
|
|
48
|
-
], AppConfig.prototype, "deletedAt", void 0);
|
|
49
|
-
__decorate([
|
|
22
|
+
(0, class_validator_1.MinLength)(3),
|
|
50
23
|
(0, typeorm_1.Column)({ unique: true }),
|
|
51
24
|
__metadata("design:type", String)
|
|
52
25
|
], AppConfig.prototype, "key", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-config.entity.js","sourceRoot":"","sources":["../../../src/entities/app_config/app-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"app-config.entity.js","sourceRoot":"","sources":["../../../src/entities/app_config/app-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAA+D;AAC/D,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAU;IAGvC,GAAG,CAAS;IAGZ,KAAK,CAAS;CACf,CAAA;AAPY,8BAAS;AAGpB;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;sCACb;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACb;oBANH,SAAS;IADrB,IAAA,gBAAM,GAAE;GACI,SAAS,CAOrB"}
|