@bearei/server-common 1.2.0 → 1.2.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/dist/app.entity.d.ts
CHANGED
package/dist/app.entity.js
CHANGED
|
@@ -24,14 +24,14 @@ let CommonEntity = class CommonEntity extends typeorm_1.BaseEntity {
|
|
|
24
24
|
createdAt;
|
|
25
25
|
updatedAt;
|
|
26
26
|
version;
|
|
27
|
-
deletedAt;
|
|
28
27
|
sort;
|
|
28
|
+
deletedAt;
|
|
29
29
|
beforeInsert() {
|
|
30
30
|
this.createdAt = dayjs_1.default.utc().toDate();
|
|
31
31
|
this.id = (0, nanoid_1.nanoid)();
|
|
32
32
|
}
|
|
33
33
|
afterInsert() {
|
|
34
|
-
this.sort =
|
|
34
|
+
this.sort = this.primaryId;
|
|
35
35
|
}
|
|
36
36
|
beforeUpdate() {
|
|
37
37
|
this.updatedAt = dayjs_1.default.utc().toDate();
|
|
@@ -75,14 +75,14 @@ __decorate([
|
|
|
75
75
|
(0, typeorm_1.VersionColumn)({ nullable: false }),
|
|
76
76
|
__metadata("design:type", Number)
|
|
77
77
|
], CommonEntity.prototype, "version", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ nullable: false, type: 'int', default: 0 }),
|
|
80
|
+
__metadata("design:type", Number)
|
|
81
|
+
], CommonEntity.prototype, "sort", void 0);
|
|
78
82
|
__decorate([
|
|
79
83
|
(0, typeorm_1.DeleteDateColumn)({ default: null, type: 'timestamptz' }),
|
|
80
84
|
__metadata("design:type", Date)
|
|
81
85
|
], CommonEntity.prototype, "deletedAt", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ nullable: false, type: 'bigint', default: 0 }),
|
|
84
|
-
__metadata("design:type", Number)
|
|
85
|
-
], CommonEntity.prototype, "sort", void 0);
|
|
86
86
|
__decorate([
|
|
87
87
|
(0, typeorm_1.BeforeInsert)(),
|
|
88
88
|
__metadata("design:type", Function),
|
|
@@ -115,6 +115,7 @@ __decorate([
|
|
|
115
115
|
], CommonEntity.prototype, "beforeRecover", null);
|
|
116
116
|
exports.CommonEntity = CommonEntity = __decorate([
|
|
117
117
|
(0, typeorm_1.Index)(['createdAt']),
|
|
118
|
-
(0, typeorm_1.Index)(['id'], { unique: true })
|
|
118
|
+
(0, typeorm_1.Index)(['id'], { unique: true }),
|
|
119
|
+
(0, typeorm_1.Index)(['sort'])
|
|
119
120
|
], CommonEntity);
|
|
120
121
|
//# 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,kDAAyB;AACzB,mCAA6B;AAC7B,qCAcgB;AAChB,yCAAwC;
|
|
1
|
+
{"version":3,"file":"app.entity.js","sourceRoot":"","sources":["../src/app.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,mCAA6B;AAC7B,qCAcgB;AAChB,yCAAwC;AAMjC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,oBAAU;IAE3C,SAAS,CAAQ;IAGjB,EAAE,CAAQ;IASV,YAAY,CAAc;IAG1B,SAAS,CAAM;IAGf,SAAS,CAAM;IAGf,OAAO,CAAQ;IAGf,IAAI,CAAQ;IAGZ,SAAS,CAAM;IAGf,YAAY;QACX,IAAI,CAAC,SAAS,GAAG,eAAK,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAA;QACrC,IAAI,CAAC,EAAE,GAAG,IAAA,eAAM,GAAE,CAAA;IACnB,CAAC;IAGD,WAAW;QACV,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAA;IAC3B,CAAC;IAGD,YAAY;QACX,IAAI,CAAC,SAAS,GAAG,eAAK,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAA;IACt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