mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #2)Add PullRequest model.
This commit is contained in:
19
src/main/scala/model/PullRequest.scala
Normal file
19
src/main/scala/model/PullRequest.scala
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import scala.slick.driver.H2Driver.simple._
|
||||||
|
|
||||||
|
object PullRequests extends Table[PullRequest]("PULL_REQUEST") with IssueTemplate {
|
||||||
|
def pullRequestId = column[Int]("PULL_REQUEST_ID")
|
||||||
|
def commitId = column[String]("COMMIT_ID")
|
||||||
|
def * = pullRequestId ~ userName ~ repositoryName ~ issueId ~ commitId <> (PullRequest, PullRequest.unapply _)
|
||||||
|
|
||||||
|
def autoinc = userName ~ repositoryName ~ issueId ~ commitId returning pullRequestId
|
||||||
|
def byPrimaryKey(pullRequestId: Int) = this.pullRequestId is pullRequestId.bind
|
||||||
|
}
|
||||||
|
|
||||||
|
case class PullRequest(
|
||||||
|
pullRequestId: Int,
|
||||||
|
userName: String,
|
||||||
|
repositoryName: String,
|
||||||
|
issueId: Int,
|
||||||
|
commitId: String)
|
||||||
Reference in New Issue
Block a user