itemLog for item history refactor
This commit is contained in:
parent
378c04b123
commit
76f808e7f6
|
@ -4,12 +4,12 @@ module.exports = Self => {
|
||||||
function filterParams(params) {
|
function filterParams(params) {
|
||||||
return {
|
return {
|
||||||
where: {
|
where: {
|
||||||
itemFk: params.itemFk
|
originFk: params.itemFk
|
||||||
},
|
},
|
||||||
skip: (params.page - 1) * params.size,
|
skip: (params.page - 1) * params.size,
|
||||||
limit: params.size,
|
limit: params.size,
|
||||||
include: [{
|
include: [{
|
||||||
relation: "origin"
|
relation: "item"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
relation: "user"
|
relation: "user"
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
"origin": {
|
"item": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Origin",
|
"model": "Item",
|
||||||
"foreignKey": "originFk"
|
"foreignKey": "originFk"
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
|
|
Loading…
Reference in New Issue