salix/services/item/common/methods/item-log/getLog.js

23 lines
523 B
JavaScript

module.exports = Self => {
Self.installMethod('getLog', filterParams);
function filterParams(params) {
return {
where: {
originFk: params.itemFk
},
skip: (params.page - 1) * params.size,
limit: params.size,
include: [{
relation: "item"
},
{
relation: "user",
scope: {
fields: ["name"]
}
}]
};
}
};