@ccci/micro-server 0.0.30 → 0.0.31
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 +2 -0
- package/dist/index.js +25 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,7 @@ export { default as RouterFactory } from './utils/RouterFactory';
|
|
|
4
4
|
export { default as BaseRouter } from './utils/BaseRouter';
|
|
5
5
|
export { default as BaseController } from './utils/BaseController';
|
|
6
6
|
export { ConstructQuery, ResponseHelper, ErrorResponseHandler, } from './utils/BaseControllerHelper';
|
|
7
|
+
export { default as IBaseModel } from './utils/IBaseModel';
|
|
8
|
+
export { default as BaseModel } from './utils/BaseModel';
|
|
7
9
|
export { default as DatabaseConnector } from './utils/DatabaseConnector';
|
|
8
10
|
export { PublicAccess, PrivateAccess, endpoint } from './decorators/Endpoints';
|
package/dist/index.js
CHANGED
|
@@ -88237,6 +88237,30 @@ class BaseController {
|
|
|
88237
88237
|
async afterFind(req) {
|
|
88238
88238
|
}
|
|
88239
88239
|
}
|
|
88240
|
+
// src/utils/BaseModel.ts
|
|
88241
|
+
class BaseModel extends Model {
|
|
88242
|
+
constructor() {
|
|
88243
|
+
super(...arguments);
|
|
88244
|
+
}
|
|
88245
|
+
static getCommonAttributes() {
|
|
88246
|
+
return {
|
|
88247
|
+
createdById: {
|
|
88248
|
+
type: new DataTypes.INTEGER,
|
|
88249
|
+
comment: "UserId of the creator"
|
|
88250
|
+
},
|
|
88251
|
+
updatedById: {
|
|
88252
|
+
type: new DataTypes.INTEGER,
|
|
88253
|
+
comment: "UserId of the modifier"
|
|
88254
|
+
},
|
|
88255
|
+
isActive: {
|
|
88256
|
+
type: new DataTypes.BOOLEAN,
|
|
88257
|
+
comment: "Record active indicator"
|
|
88258
|
+
}
|
|
88259
|
+
};
|
|
88260
|
+
}
|
|
88261
|
+
static getCommonAssociations() {
|
|
88262
|
+
}
|
|
88263
|
+
}
|
|
88240
88264
|
// src/decorators/Endpoints.ts
|
|
88241
88265
|
var endpoint = (target, methodName, descriptor) => {
|
|
88242
88266
|
};
|
|
@@ -88260,6 +88284,7 @@ export {
|
|
|
88260
88284
|
DatabaseConnector,
|
|
88261
88285
|
ConstructQuery,
|
|
88262
88286
|
BaseRouter,
|
|
88287
|
+
BaseModel,
|
|
88263
88288
|
BaseController,
|
|
88264
88289
|
ApplicationServer
|
|
88265
88290
|
};
|