generate model types constraint