@ccci/micro-server 1.0.195 → 1.0.197

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.
@@ -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} tableName name of the table
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, tableName: string, schema?: string, paranoid?: boolean, defaultAttributes?: boolean): void;
42
+ static initialize(fields: ModelAttributes, options: ModelOptions): void;
36
43
  }
37
44
  //# sourceMappingURL=BaseModel.d.ts.map
@@ -26,4 +26,4 @@ export default class WebSocketServer {
26
26
  */
27
27
  static getHandler(path: string): ServerWebSocket | null;
28
28
  }
29
- //# sourceMappingURL=WebsocketServer.d.ts.map
29
+ //# sourceMappingURL=WebSocketServer.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.195",
3
+ "version": "1.0.197",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",