Add action to model 'issue comment'.

This commit is contained in:
shimamoto
2013-07-01 19:05:20 +09:00
parent 8c57c00a52
commit 741596a6f5
2 changed files with 5 additions and 2 deletions

View File

@@ -4,13 +4,14 @@ import scala.slick.driver.H2Driver.simple._
object IssueComments extends Table[IssueComment]("ISSUE_COMMENT") with IssueTemplate with Functions {
def commentId = column[Int]("COMMENT_ID", O AutoInc)
def action = column[String]("ACTION")
def commentedUserName = column[String]("COMMENTED_USER_NAME")
def content = column[String]("CONTENT")
def registeredDate = column[java.util.Date]("REGISTERED_DATE")
def updatedDate = column[java.util.Date]("UPDATED_DATE")
def * = userName ~ repositoryName ~ issueId ~ commentId ~ commentedUserName ~ content ~ registeredDate ~ updatedDate <> (IssueComment, IssueComment.unapply _)
def * = userName ~ repositoryName ~ issueId ~ commentId ~ action.? ~ commentedUserName ~ content ~ registeredDate ~ updatedDate <> (IssueComment, IssueComment.unapply _)
def autoInc = userName ~ repositoryName ~ issueId ~ commentedUserName ~ content ~ registeredDate ~ updatedDate returning commentId
def autoInc = userName ~ repositoryName ~ issueId ~ action.? ~ commentedUserName ~ content ~ registeredDate ~ updatedDate returning commentId
def byPrimaryKey(commentId: Int) = this.commentId is commentId.bind
}
@@ -19,6 +20,7 @@ case class IssueComment(
repositoryName: String,
issueId: Int,
commentId: Int,
action: Option[String],
commentedUserName: String,
content: String,
registeredDate: java.util.Date,

View File

@@ -190,6 +190,7 @@ trait IssuesService {
owner,
repository,
issueId,
None,
loginUser,
content,
currentDate,