Added attachment type to posts model