2016-08-31 05:31:14 -06:00
|
|
|
package lila.coach
|
|
|
|
|
|
|
|
import play.api.data._
|
|
|
|
import play.api.data.Forms._
|
|
|
|
|
|
|
|
object CoachReviewForm {
|
|
|
|
|
2019-12-13 07:30:20 -07:00
|
|
|
lazy val form = Form(
|
|
|
|
mapping(
|
|
|
|
"text" -> text(minLength = 3, maxLength = 2010),
|
|
|
|
"score" -> number(min = 1, max = 5)
|
|
|
|
)(Data.apply)(Data.unapply)
|
|
|
|
)
|
2016-08-31 05:31:14 -06:00
|
|
|
|
2016-08-31 07:20:30 -06:00
|
|
|
case class Data(text: String, score: Int)
|
2016-08-31 05:31:14 -06:00
|
|
|
}
|