pangea-server 3.3.85 → 3.3.86
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.
|
@@ -13,10 +13,9 @@ declare global {
|
|
|
13
13
|
__brand: 'hidden';
|
|
14
14
|
};
|
|
15
15
|
type ColVirtual<T> = CreationOptional<T>;
|
|
16
|
-
type FieldsToExclude = '__brand' | 'version';
|
|
17
16
|
type ModelInstance<BM extends BaseModel> = InferAttributes<BM>;
|
|
18
17
|
type Where<BM extends BaseModel> = WhereOptions<BM> & Record<symbol, any>;
|
|
19
|
-
type InsertParams<BM extends BaseModel> = OptionalIfNullish<OptionalIfOptional<StripRelations<OptionalFields<IncludeHidden<
|
|
18
|
+
type InsertParams<BM extends BaseModel> = OptionalIfNullish<OptionalIfOptional<StripRelations<OptionalFields<IncludeHidden<InferCreationAttributes<BM>>, keyof InferCreationAttributes<BM> & 'id'>>>>;
|
|
20
19
|
type UpdateParams<BM extends BaseModel> = Partial<InsertParams<BM>>;
|
|
21
20
|
type UpdateParamsWithId<BM extends BaseModel> = UpdateParams<BM> & {
|
|
22
21
|
id: ModelId;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Model, Column } from 'sequelize-typescript';
|
|
2
|
+
import type { NonAttribute } from 'sequelize';
|
|
2
3
|
import type { Index, DefaultValue, GetModelFn } from '../database.types';
|
|
3
4
|
type Column = {
|
|
4
5
|
allowNull: boolean;
|
|
@@ -14,6 +15,7 @@ type Relation = {
|
|
|
14
15
|
};
|
|
15
16
|
type Relations = Record<string, Relation>;
|
|
16
17
|
export declare abstract class BaseModel extends Model {
|
|
18
|
+
version: NonAttribute<number>;
|
|
17
19
|
private static __HiddenAttributes?;
|
|
18
20
|
private static __Columns?;
|
|
19
21
|
private static __ColumnIndexes?;
|