(refs #2)Create pull request is available.

This commit is contained in:
takezoe
2013-07-14 02:43:45 +09:00
parent bf3380755b
commit 0903721a62
7 changed files with 160 additions and 64 deletions

View File

@@ -3,21 +3,21 @@ 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 requestUserName = column[String]("REQUEST_USER_NAME")
def requestRepositoryName = column[String]("REQUEST_REPOSITORY_NAME")
def requestCommitId = column[String]("REQUEST_COMMIT_ID")
def * = pullRequestId ~ userName ~ repositoryName ~ issueId ~ requestUserName ~ requestRepositoryName ~ requestCommitId <> (PullRequest, PullRequest.unapply _)
def originBranch = column[String]("ORIGIN_BRANCH")
def * = userName ~ repositoryName ~ issueId ~ originBranch ~ requestUserName ~ requestRepositoryName ~ requestCommitId <> (PullRequest, PullRequest.unapply _)
def autoinc = userName ~ repositoryName ~ issueId ~ requestUserName ~ requestRepositoryName ~ requestCommitId returning pullRequestId
def byPrimaryKey(pullRequestId: Int) = this.pullRequestId is pullRequestId.bind
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(
pullRequestId: Int,
userName: String,
repositoryName: String,
issueId: Int,
originBranch: String,
requestUserName: String,
requestRepositoryName: String,
requestCommitId: String)