pangea-server 3.3.102 → 3.3.104
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.
|
@@ -16,7 +16,7 @@ declare global {
|
|
|
16
16
|
id: ModelId;
|
|
17
17
|
};
|
|
18
18
|
type Where<BM extends BaseModel> = WhereOptions<BM> & Record<symbol, any>;
|
|
19
|
-
type InsertParams<BM extends BaseModel> = OptionalIfNullish<IncludeHidden<StripRelations<Omit<InferCreationAttributes<BM>, 'id'>>>> & {
|
|
19
|
+
type InsertParams<BM extends BaseModel> = OptionalIfNullish<IncludeHidden<StripRelations<Omit<InferCreationAttributes<BM>, 'id' | 'init'>>>> & {
|
|
20
20
|
id?: ModelId;
|
|
21
21
|
};
|
|
22
22
|
type UpdateParams<BM extends BaseModel> = Partial<InsertParams<BM>>;
|
|
@@ -21,7 +21,7 @@ export declare abstract class BaseModel extends Model {
|
|
|
21
21
|
private static __Relations?;
|
|
22
22
|
id: ModelId;
|
|
23
23
|
version: NonAttribute<number>;
|
|
24
|
-
init?:
|
|
24
|
+
init?: () => void;
|
|
25
25
|
static get HiddenAttributes(): string[];
|
|
26
26
|
static get Columns(): Columns;
|
|
27
27
|
static get ColumnIndexes(): Index[];
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BaseModel = void 0;
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const decorators_1 = require("../decorators");
|
|
14
15
|
class BaseModel extends sequelize_typescript_1.Model {
|
|
15
16
|
static get HiddenAttributes() {
|
|
16
17
|
return this.__HiddenAttributes || [];
|
|
@@ -74,3 +75,7 @@ __decorate([
|
|
|
74
75
|
sequelize_typescript_1.Column,
|
|
75
76
|
__metadata("design:type", Number)
|
|
76
77
|
], BaseModel.prototype, "id", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
decorators_1.col.Computed(),
|
|
80
|
+
__metadata("design:type", Function)
|
|
81
|
+
], BaseModel.prototype, "init", void 0);
|