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,16 +1,15 @@
package model
import scala.slick.driver.H2Driver.simple._
import model.{BaseTable => Table}
object Repositories extends Table[Repository]("REPOSITORY") with Functions {
object Repositories extends Table[Repository]("REPOSITORY") with BasicTemplate with Functions {
def isPrivate = column[Boolean]("PRIVATE")
def description = column[String]("DESCRIPTION")
def defaultBranch = column[String]("DEFAULT_BRANCH")
def registeredDate = column[java.util.Date]("REGISTERED_DATE")
def updatedDate = column[java.util.Date]("UPDATED_DATE")
def lastActivityDate = column[java.util.Date]("LAST_ACTIVITY_DATE")
def * = base ~ isPrivate ~ description.? ~ defaultBranch ~ registeredDate ~ updatedDate ~ lastActivityDate <> (Repository, Repository.unapply _)
def * = userName ~ repositoryName ~ isPrivate ~ description.? ~ defaultBranch ~ registeredDate ~ updatedDate ~ lastActivityDate <> (Repository, Repository.unapply _)
}
case class Repository(