Move the attachment getter to the HasAttachedFile class
Move the attachment query to the HasAttachedFile class