@bearei/server-common 0.0.37 → 0.0.38
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/app.entity.d.ts +1 -1
- package/dist/app.entity.js +8 -12
- package/dist/app.entity.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/util/index.d.ts +1 -0
- package/dist/util/index.js +1 -0
- package/dist/util/index.js.map +1 -1
- package/dist/util/response.util.d.ts +1 -0
- package/dist/util/response.util.js +10 -0
- package/dist/util/response.util.js.map +1 -0
- package/package.json +1 -1
package/dist/app.entity.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from 'typeorm';
|
|
2
2
|
import { EntityStatus } from './app.interface';
|
|
3
3
|
export declare class AppEntity extends BaseEntity {
|
|
4
|
+
privateId: number;
|
|
4
5
|
id: string;
|
|
5
6
|
entityStatus: EntityStatus;
|
|
6
7
|
createdAt: Date;
|
|
@@ -8,7 +9,6 @@ export declare class AppEntity extends BaseEntity {
|
|
|
8
9
|
version: string;
|
|
9
10
|
deletedAt: Date;
|
|
10
11
|
beforeInsert(): void;
|
|
11
|
-
afterLoad(): void;
|
|
12
12
|
beforeSoftRemove(): void;
|
|
13
13
|
beforeRecover(): void;
|
|
14
14
|
}
|
package/dist/app.entity.js
CHANGED
|
@@ -14,6 +14,7 @@ const nanoid_1 = require("nanoid");
|
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
15
|
const app_interface_1 = require("./app.interface");
|
|
16
16
|
let AppEntity = class AppEntity extends typeorm_1.BaseEntity {
|
|
17
|
+
privateId;
|
|
17
18
|
id;
|
|
18
19
|
entityStatus;
|
|
19
20
|
createdAt;
|
|
@@ -23,10 +24,6 @@ let AppEntity = class AppEntity extends typeorm_1.BaseEntity {
|
|
|
23
24
|
beforeInsert() {
|
|
24
25
|
this.id = (0, nanoid_1.nanoid)();
|
|
25
26
|
}
|
|
26
|
-
afterLoad() {
|
|
27
|
-
!this.deletedAt && (this.deletedAt = undefined);
|
|
28
|
-
this.version = `${this.version}`;
|
|
29
|
-
}
|
|
30
27
|
beforeSoftRemove() {
|
|
31
28
|
this.entityStatus = app_interface_1.EntityStatus.SOFT_REMOVED;
|
|
32
29
|
}
|
|
@@ -36,7 +33,11 @@ let AppEntity = class AppEntity extends typeorm_1.BaseEntity {
|
|
|
36
33
|
};
|
|
37
34
|
exports.AppEntity = AppEntity;
|
|
38
35
|
__decorate([
|
|
39
|
-
(0, typeorm_1.
|
|
36
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('identity'),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], AppEntity.prototype, "privateId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ length: 32 }),
|
|
40
41
|
__metadata("design:type", String)
|
|
41
42
|
], AppEntity.prototype, "id", void 0);
|
|
42
43
|
__decorate([
|
|
@@ -65,12 +66,6 @@ __decorate([
|
|
|
65
66
|
__metadata("design:paramtypes", []),
|
|
66
67
|
__metadata("design:returntype", void 0)
|
|
67
68
|
], AppEntity.prototype, "beforeInsert", null);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, typeorm_1.AfterLoad)(),
|
|
70
|
-
__metadata("design:type", Function),
|
|
71
|
-
__metadata("design:paramtypes", []),
|
|
72
|
-
__metadata("design:returntype", void 0)
|
|
73
|
-
], AppEntity.prototype, "afterLoad", null);
|
|
74
69
|
__decorate([
|
|
75
70
|
(0, typeorm_1.BeforeSoftRemove)(),
|
|
76
71
|
__metadata("design:type", Function),
|
|
@@ -84,6 +79,7 @@ __decorate([
|
|
|
84
79
|
__metadata("design:returntype", void 0)
|
|
85
80
|
], AppEntity.prototype, "beforeRecover", null);
|
|
86
81
|
exports.AppEntity = AppEntity = __decorate([
|
|
87
|
-
(0, typeorm_1.Index)(['createdAt'])
|
|
82
|
+
(0, typeorm_1.Index)(['createdAt']),
|
|
83
|
+
(0, typeorm_1.Index)(['id'], { unique: true })
|
|
88
84
|
], AppEntity);
|
|
89
85
|
//# sourceMappingURL=app.entity.js.map
|
package/dist/app.entity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.entity.js","sourceRoot":"","sources":["../src/app.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"app.entity.js","sourceRoot":"","sources":["../src/app.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAA6B;AAC7B,qCAYgB;AAChB,mDAA4C;AAIrC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,oBAAU;IAErC,SAAS,CAAQ;IAGjB,EAAE,CAAQ;IAGV,YAAY,CAAc;IAG1B,SAAS,CAAM;IAGf,SAAS,CAAM;IAGf,OAAO,CAAQ;IAGf,SAAS,CAAM;IAGf,YAAY;QACR,IAAI,CAAC,EAAE,GAAG,IAAA,eAAM,GAAE,CAAA;IACtB,CAAC;IAGD,gBAAgB;QACZ,IAAI,CAAC,YAAY,GAAG,4BAAY,CAAC,YAAY,CAAA;IACjD,CAAC;IAGD,aAAa;QACT,IAAI,CAAC,YAAY,GAAG,4BAAY,CAAC,SAAS,CAAA;IAC9C,CAAC;CACJ,CAAA;AApCY,8BAAS;AAElB;IADC,IAAA,gCAAsB,EAAC,UAAU,CAAC;;4CAClB;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAC,MAAM,EAAE,EAAE,EAAC,CAAC;;qCACX;AAGV;IADC,IAAA,gBAAM,EAAC,EAAC,OAAO,EAAE,4BAAY,CAAC,SAAS,EAAE,IAAI,EAAE,4BAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC;;+CACnE;AAG1B;IADC,IAAA,0BAAgB,EAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC;8BACzB,IAAI;4CAAA;AAGf;IADC,IAAA,0BAAgB,EAAC,EAAC,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