Fix model composition.

This commit is contained in:
shimamoto
2013-06-28 15:05:15 +09:00
parent c308e1993a
commit f170aa0a04
9 changed files with 54 additions and 47 deletions

View File

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