@ccci/micro-server 1.0.232 → 1.0.234
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.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -299694,19 +299694,20 @@ class BaseModel extends Model {
|
|
|
299694
299694
|
schema: schema || process.env.DB_SCHEMA,
|
|
299695
299695
|
paranoid,
|
|
299696
299696
|
comment: tableOption,
|
|
299697
|
-
timestamps: defaultAttributes
|
|
299697
|
+
timestamps: defaultAttributes ? defaultAttributes : true
|
|
299698
299698
|
};
|
|
299699
|
-
enableDefaultFields = defaultAttributes
|
|
299699
|
+
enableDefaultFields = defaultAttributes ? defaultAttributes : true;
|
|
299700
299700
|
} else {
|
|
299701
299701
|
initOptions = {
|
|
299702
299702
|
sequelize: DatabaseConnector.getConnection(),
|
|
299703
299703
|
tableName: tableOption.tableName,
|
|
299704
299704
|
schema: tableOption.schema || process.env.DB_SCHEMA,
|
|
299705
|
-
paranoid: tableOption.paranoid
|
|
299705
|
+
paranoid: tableOption.paranoid ? Boolean(tableOption.paranoid) : true,
|
|
299706
299706
|
comment: tableOption.comment ? tableOption.comment : tableOption.tableName,
|
|
299707
|
-
timestamps: tableOption.defaultAttributes
|
|
299707
|
+
timestamps: tableOption.defaultAttributes ? Boolean(tableOption.defaultAttributes) : true
|
|
299708
299708
|
};
|
|
299709
|
-
|
|
299709
|
+
Logger.info("defaultAttributes :>> ", Boolean(tableOption.defaultAttributes));
|
|
299710
|
+
enableDefaultFields = tableOption.defaultAttributes ? Boolean(tableOption.defaultAttributes) : true;
|
|
299710
299711
|
}
|
|
299711
299712
|
if (initOptions.tableName === "Users") {
|
|
299712
299713
|
Logger.info("tableOption :>> ", tableOption);
|