mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 22:45:51 +01:00
Fix model composition.
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
package model
|
||||
|
||||
import scala.slick.driver.H2Driver.simple._
|
||||
import model.{BaseTable => Table}
|
||||
|
||||
object IssueId extends Table[(String, String, Int)]("ISSUE_ID") {
|
||||
def issueId = column[Int]("ISSUE_ID")
|
||||
def * = base ~ issueId
|
||||
object IssueId extends Table[(String, String, Int)]("ISSUE_ID") with IssueTemplate {
|
||||
def * = userName ~ repositoryName ~ issueId
|
||||
}
|
||||
|
||||
object Issues extends Table[Issue]("ISSUE") with Functions {
|
||||
def issueId = column[Int]("ISSUE_ID")
|
||||
object Issues extends Table[Issue]("ISSUE") with IssueTemplate with Functions {
|
||||
def openedUserName = column[String]("OPENED_USER_NAME")
|
||||
def milestoneId = column[Int]("MILESTONE_ID")
|
||||
def assignedUserName = column[String]("ASSIGNED_USER_NAME")
|
||||
@@ -18,7 +15,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 * = base ~ issueId ~ openedUserName ~ milestoneId.? ~ assignedUserName.? ~ title ~ content.? ~ closed ~ registeredDate ~ updatedDate <> (Issue, Issue.unapply _)
|
||||
def * = userName ~ repositoryName ~ issueId ~ openedUserName ~ milestoneId.? ~ assignedUserName.? ~ title ~ content.? ~ closed ~ registeredDate ~ updatedDate <> (Issue, Issue.unapply _)
|
||||
}
|
||||
|
||||
case class Issue(
|
||||
|
||||
Reference in New Issue
Block a user