2020-07-25 06:40:51 -06:00
|
|
|
package lila.appeal
|
|
|
|
|
|
|
|
import lila.db.dsl._
|
|
|
|
import reactivemongo.api.bson._
|
|
|
|
|
|
|
|
private[appeal] object BsonHandlers {
|
|
|
|
|
|
|
|
import Appeal.Status
|
|
|
|
|
|
|
|
implicit val statusHandler = lila.db.dsl.quickHandler[Status](
|
|
|
|
{
|
2020-10-05 01:40:05 -06:00
|
|
|
case BSONString(v) => Status(v) | Status.Read
|
|
|
|
case _ => Status.Read
|
2020-07-25 06:40:51 -06:00
|
|
|
},
|
|
|
|
s => BSONString(s.key)
|
|
|
|
)
|
|
|
|
|
2020-08-16 06:43:26 -06:00
|
|
|
implicit val appealMsgHandler = Macros.handler[AppealMsg]
|
|
|
|
implicit val appealHandler = Macros.handler[Appeal]
|
2020-07-25 06:40:51 -06:00
|
|
|
}
|