make repo model query by type if defined
update post repository
add media