Generate models Link, Sub, SubLink.