mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 05:55:51 +01:00
19 lines
655 B
Scala
19 lines
655 B
Scala
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) |