add api and model relationships