complete generate model