UNPKG

@on-time/core

Version:

core business logic for OT API

14 lines (11 loc) 320 B
// Third Party modules Import const { Schema, model } = require('mongoose'); class Model { constructor(schemaObject) { this.init(schemaObject); } init(schemaObject) { this.schema = new Schema(schemaObject, { timestamps: true }); this.model = model('earnings', this.schema); } }