feat(news): Add relations

pull/17974/head
Mrugesh Mohapatra 2018-07-31 01:36:56 +05:30 committed by mrugesh mohapatra
parent 2cce8bbfd5
commit 60719fcbe6
3 changed files with 24 additions and 2 deletions

View File

@ -68,7 +68,18 @@
}
},
"validations": [],
"relations": {},
"relations": {
"user": {
"type": "belongsTo",
"model": "user",
"foreignKey": "externalId"
},
"popularity": {
"type": "hasOne",
"model": "popularity",
"foreignKey": "popularityId"
}
},
"acls": [],
"methods": {}
}

View File

@ -15,7 +15,13 @@
}
},
"validations": [],
"relations": {},
"relations": {
"article": {
"type": "belongsTo",
"model": "article",
"foreignKey": "articleId"
}
},
"acls": [],
"methods": {}
}

View File

@ -284,6 +284,11 @@
"options": {
"disableInclude": true
}
},
"articles": {
"type": "hasMany",
"model": "article",
"foreignKey": "externalId"
}
},
"acls": [