mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-24 01:29:19 +02:00
13 lines
257 B
JavaScript
13 lines
257 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Register statics for this model
|
|
* @param {Model} model
|
|
* @param {Schema} schema
|
|
* @api private
|
|
*/
|
|
module.exports = function applyStatics(model, schema) {
|
|
for (const i in schema.statics) {
|
|
model[i] = schema.statics[i];
|
|
}
|
|
};
|