sort log by model primary key
add badges