generates Link model