Make case classes serializable