feat(news): Add relations
parent
2cce8bbfd5
commit
60719fcbe6
|
@ -68,7 +68,18 @@
|
|||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {},
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "user",
|
||||
"foreignKey": "externalId"
|
||||
},
|
||||
"popularity": {
|
||||
"type": "hasOne",
|
||||
"model": "popularity",
|
||||
"foreignKey": "popularityId"
|
||||
}
|
||||
},
|
||||
"acls": [],
|
||||
"methods": {}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,13 @@
|
|||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {},
|
||||
"relations": {
|
||||
"article": {
|
||||
"type": "belongsTo",
|
||||
"model": "article",
|
||||
"foreignKey": "articleId"
|
||||
}
|
||||
},
|
||||
"acls": [],
|
||||
"methods": {}
|
||||
}
|
||||
|
|
|
@ -284,6 +284,11 @@
|
|||
"options": {
|
||||
"disableInclude": true
|
||||
}
|
||||
},
|
||||
"articles": {
|
||||
"type": "hasMany",
|
||||
"model": "article",
|
||||
"foreignKey": "externalId"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
Loading…
Reference in New Issue