@classmethod
def detail(cls, attachment, flat=False):
    """Detailed view of an attachment."""
    result = cls.summary(attachment, flat=True)
    result.update(attached_at=cls._normalize(attachment.attach_time),
        detached_at=cls._normalize(attachment.detach_time), attach_mode=
        attachment.attach_mode, connection_info=attachment.connection_info)
    if flat:
        return result
    return {'attachment': result}
