Move userName and repositoryName to the base table class.

This commit is contained in:
shimamoto
2013-06-27 21:59:13 +09:00
parent 89c0e52c1d
commit a217513205
9 changed files with 43 additions and 37 deletions

View File

@@ -1,12 +1,11 @@
package model
import scala.slick.driver.H2Driver.simple._
import model.{BaseTable => Table}
object Collaborators extends Table[Collaborator]("COLLABORATOR") {
def userName = column[String]("USER_NAME", O PrimaryKey)
def repositoryName = column[String]("REPOSITORY_NAME")
def collaboratorName = column[String]("COLLABORATOR_NAME")
def * = userName ~ repositoryName ~ collaboratorName <> (Collaborator, Collaborator.unapply _)
def * = base ~ collaboratorName <> (Collaborator, Collaborator.unapply _)
}
case class Collaborator(