mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 12:05:59 +01:00
* Fix the Profiles class from package object to simple object * Fix the row case class to model package * Define the alias of JdbcBackend#Session
33 lines
1.3 KiB
Scala
33 lines
1.3 KiB
Scala
package model
|
|
|
|
trait PullRequestComponent extends TemplateComponent { self: Profile =>
|
|
import profile.simple._
|
|
|
|
lazy val PullRequests = TableQuery[PullRequests]
|
|
|
|
class PullRequests(tag: Tag) extends Table[PullRequest](tag, "PULL_REQUEST") with IssueTemplate {
|
|
val branch = column[String]("BRANCH")
|
|
val requestUserName = column[String]("REQUEST_USER_NAME")
|
|
val requestRepositoryName = column[String]("REQUEST_REPOSITORY_NAME")
|
|
val requestBranch = column[String]("REQUEST_BRANCH")
|
|
val commitIdFrom = column[String]("COMMIT_ID_FROM")
|
|
val commitIdTo = column[String]("COMMIT_ID_TO")
|
|
def * = (userName, repositoryName, issueId, branch, requestUserName, requestRepositoryName, requestBranch, commitIdFrom, commitIdTo) <> (PullRequest.tupled, PullRequest.unapply)
|
|
|
|
def byPrimaryKey(userName: String, repositoryName: String, issueId: Int) = byIssue(userName, repositoryName, issueId)
|
|
def byPrimaryKey(userName: Column[String], repositoryName: Column[String], issueId: Column[Int]) = byIssue(userName, repositoryName, issueId)
|
|
}
|
|
}
|
|
|
|
case class PullRequest(
|
|
userName: String,
|
|
repositoryName: String,
|
|
issueId: Int,
|
|
branch: String,
|
|
requestUserName: String,
|
|
requestRepositoryName: String,
|
|
requestBranch: String,
|
|
commitIdFrom: String,
|
|
commitIdTo: String
|
|
)
|