mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 03:55:58 +01:00
Add action to model 'issue comment'.
This commit is contained in:
@@ -4,13 +4,14 @@ import scala.slick.driver.H2Driver.simple._
|
|||||||
|
|
||||||
object IssueComments extends Table[IssueComment]("ISSUE_COMMENT") with IssueTemplate with Functions {
|
object IssueComments extends Table[IssueComment]("ISSUE_COMMENT") with IssueTemplate with Functions {
|
||||||
def commentId = column[Int]("COMMENT_ID", O AutoInc)
|
def commentId = column[Int]("COMMENT_ID", O AutoInc)
|
||||||
|
def action = column[String]("ACTION")
|
||||||
def commentedUserName = column[String]("COMMENTED_USER_NAME")
|
def commentedUserName = column[String]("COMMENTED_USER_NAME")
|
||||||
def content = column[String]("CONTENT")
|
def content = column[String]("CONTENT")
|
||||||
def registeredDate = column[java.util.Date]("REGISTERED_DATE")
|
def registeredDate = column[java.util.Date]("REGISTERED_DATE")
|
||||||
def updatedDate = column[java.util.Date]("UPDATED_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
|
def byPrimaryKey(commentId: Int) = this.commentId is commentId.bind
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ case class IssueComment(
|
|||||||
repositoryName: String,
|
repositoryName: String,
|
||||||
issueId: Int,
|
issueId: Int,
|
||||||
commentId: Int,
|
commentId: Int,
|
||||||
|
action: Option[String],
|
||||||
commentedUserName: String,
|
commentedUserName: String,
|
||||||
content: String,
|
content: String,
|
||||||
registeredDate: java.util.Date,
|
registeredDate: java.util.Date,
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ trait IssuesService {
|
|||||||
owner,
|
owner,
|
||||||
repository,
|
repository,
|
||||||
issueId,
|
issueId,
|
||||||
|
None,
|
||||||
loginUser,
|
loginUser,
|
||||||
content,
|
content,
|
||||||
currentDate,
|
currentDate,
|
||||||
|
|||||||
Reference in New Issue
Block a user