A common pattern in scala for enum is the following:
I found that first the Macro codec do not support decode/encode for this kind of enum pattern. And I have tried to write my own Codec[Greeting] but with no luck. Runtime error: cannot found codec for type Greeting$Hello$. It seems that no way I can write my own codec unless using marco. Can org.mongodb.scala.bson.codecs.Macros add support to this since this is a common enum pattern in Scala.