diff --git a/src/main/scala/model/Labels.scala b/src/main/scala/model/Labels.scala new file mode 100644 index 0000000..894caeb --- /dev/null +++ b/src/main/scala/model/Labels.scala @@ -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) \ No newline at end of file