Files
爱喝水的木子 00b48da363 fix
2026-03-02 15:35:39 +08:00

8 lines
173 B
JavaScript

'use strict';
module.exports = function addAutoId(schema) {
const _obj = { _id: { auto: true } };
_obj._id[schema.options.typeKey] = 'ObjectId';
schema.add(_obj);
};