@ccci/micro-server 1.0.194 → 1.0.196
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/index.d.ts +1 -1
- package/dist/index.js +90662 -92542
- package/dist/types/BaseModelTypes.d.ts +7 -0
- package/dist/utils/BaseModel.d.ts +12 -5
- package/dist/utils/{WebsocketServer.d.ts → WebSocketServer.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -30,4 +30,11 @@ export type RequestUserType = {
|
|
|
30
30
|
id?: number;
|
|
31
31
|
email?: string;
|
|
32
32
|
};
|
|
33
|
+
export type ModelOptions = {
|
|
34
|
+
tableName: string;
|
|
35
|
+
schema?: string;
|
|
36
|
+
paranoid?: boolean;
|
|
37
|
+
defaultAttributes?: boolean;
|
|
38
|
+
comment?: string;
|
|
39
|
+
};
|
|
33
40
|
//# sourceMappingURL=BaseModelTypes.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DataTypes, Model } from 'sequelize';
|
|
2
2
|
import type { ModelAttributes } from "sequelize";
|
|
3
3
|
import type IBaseModel from './IBaseModel';
|
|
4
|
+
import { ModelOptions } from '@/types/BaseModelTypes';
|
|
4
5
|
export default class BaseModel extends Model implements IBaseModel {
|
|
5
6
|
id?: number;
|
|
6
7
|
/**
|
|
@@ -24,14 +25,20 @@ export default class BaseModel extends Model implements IBaseModel {
|
|
|
24
25
|
};
|
|
25
26
|
} | null;
|
|
26
27
|
static getCommonAssociations(): void;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param {ModelAttributes} fields table columns
|
|
31
|
+
* @param {string} tableName name of the table
|
|
32
|
+
* @param {string} schema this will overwrite the default schema
|
|
33
|
+
* @param {boolean} paranoid paranoid option. defaults to true
|
|
34
|
+
* @param {boolean} defaultAttributes need to inherit default attributes. defaults to true
|
|
35
|
+
*/
|
|
36
|
+
static initialize(fields: ModelAttributes, tableName: string, schema?: string, paranoid?: boolean, defaultAttributes?: boolean, comment?: string): void;
|
|
27
37
|
/**
|
|
28
38
|
*
|
|
29
39
|
* @param {ModelAttributes} fields table columns
|
|
30
|
-
* @param {string}
|
|
31
|
-
* @param {string} schema this will overwrite the default schema
|
|
32
|
-
* @param {boolean} paranoid paranoid option. defaults to true
|
|
33
|
-
* @param {boolean} defaultAttributes need to inherit default attributes. defaults to true
|
|
40
|
+
* @param {string} options Model Options
|
|
34
41
|
*/
|
|
35
|
-
static initialize(fields: ModelAttributes,
|
|
42
|
+
static initialize(fields: ModelAttributes, options: ModelOptions): void;
|
|
36
43
|
}
|
|
37
44
|
//# sourceMappingURL=BaseModel.d.ts.map
|