defined model relationships in classes