camilosampedro/Aton

View on GitHub
app/model/form/RoomForm.scala

Summary

Maintainability
A
35 mins
Test Coverage
package model.form

import model.form.data.RoomFormData
import play.api.data.Form
import play.api.data.Forms._

/**
  * @author Camilo Sampedro <camilo.sampedro@udea.edu.co>
  */
object RoomForm {
  val form = Form(
    mapping(
      "room.name" -> nonEmptyText,
      "room.laboratoryID" -> longNumber
    )(RoomFormData.apply)(RoomFormData.unapply)
  )
}