var object = require('../object'),
    define = object.define,
    copy = object.copy;

module.exports = function (def) {
    var Prototype = require('../../lib/db/model');
    def.prototype = Prototype;
    var Model = define(def);

    copy(Prototype, Model);
    return Model;
};