mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 22:45:51 +01:00
Move userName and repositoryName to the base table class.
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
package model
|
||||
|
||||
import scala.slick.driver.H2Driver.simple._
|
||||
import model.{BaseTable => Table}
|
||||
|
||||
object IssueId extends Table[(String, String, Int)]("ISSUE_ID") {
|
||||
def userName = column[String]("USER_NAME", O PrimaryKey)
|
||||
def repositoryName = column[String]("REPOSITORY_NAME", O PrimaryKey)
|
||||
def issueId = column[Int]("ISSUE_ID")
|
||||
def * = userName ~ repositoryName ~ issueId
|
||||
def * = base ~ issueId
|
||||
}
|
||||
|
||||
object Issues extends Table[Issue]("ISSUE") with Functions {
|
||||
def userName = column[String]("USER_NAME", O PrimaryKey)
|
||||
def repositoryName = column[String]("REPOSITORY_NAME", O PrimaryKey)
|
||||
def issueId = column[Int]("ISSUE_ID", O PrimaryKey)
|
||||
def issueId = column[Int]("ISSUE_ID")
|
||||
def openedUserName = column[String]("OPENED_USER_NAME")
|
||||
def milestoneId = column[Int]("MILESTONE_ID")
|
||||
def assignedUserName = column[String]("ASSIGNED_USER_NAME")
|
||||
@@ -21,7 +18,7 @@ object Issues extends Table[Issue]("ISSUE") with Functions {
|
||||
def closed = column[Boolean]("CLOSED")
|
||||
def registeredDate = column[java.util.Date]("REGISTERED_DATE")
|
||||
def updatedDate = column[java.util.Date]("UPDATED_DATE")
|
||||
def * = userName ~ repositoryName ~ issueId ~ openedUserName ~ milestoneId.? ~ assignedUserName.? ~ title ~ content.? ~ closed ~ registeredDate ~ updatedDate <> (Issue, Issue.unapply _)
|
||||
def * = base ~ issueId ~ openedUserName ~ milestoneId.? ~ assignedUserName.? ~ title ~ content.? ~ closed ~ registeredDate ~ updatedDate <> (Issue, Issue.unapply _)
|
||||
}
|
||||
|
||||
case class Issue(
|
||||
|
||||
Reference in New Issue
Block a user