def METHOD_NAME(badge: UserBadge) -> dict:
    return {
        "badge_id": str(badge.badge_id),
        "from_user_id": str(badge.from_user_id),
        "created_at": badge.created_at.isoformat() if badge.created_at else None,
        "post_id": str(badge.post_id),
        "comment_id": str(badge.comment_id),
        "note": badge.note,
    }