Add Label model.

This commit is contained in:
takezoe
2013-06-24 13:47:58 +09:00
parent 2703b22718
commit 3fb709fad2

View File

@@ -0,0 +1,19 @@
package model
import scala.slick.driver.H2Driver.simple._
object Labels extends Table[Label]("LABEL") with Functions {
def userName = column[String]("USER_NAME", O PrimaryKey)
def repositoryName = column[String]("REPOSITORY_NAME", O PrimaryKey)
def labelId = column[Int]("LABEL_ID", O PrimaryKey, O AutoInc)
def labelName = column[String]("LABEL_NAME")
def color = column[Int]("COLOR")
def * = userName ~ repositoryName ~ labelId ~ labelName ~ color <> (Label, Label.unapply _)
}
case class Label(
userName: String,
repositoryName: String,
labelId: Int,
labelName: String,
color: String)