mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 04:56:02 +01:00
21 lines
651 B
Scala
21 lines
651 B
Scala
package model
|
|
|
|
trait IssueLabelComponent extends TemplateComponent { self: Profile =>
|
|
import profile.simple._
|
|
|
|
lazy val IssueLabels = TableQuery[IssueLabels]
|
|
|
|
class IssueLabels(tag: Tag) extends Table[IssueLabel](tag, "ISSUE_LABEL") with IssueTemplate with LabelTemplate {
|
|
def * = (userName, repositoryName, issueId, labelId) <> (IssueLabel.tupled, IssueLabel.unapply)
|
|
def byPrimaryKey(owner: String, repository: String, issueId: Int, labelId: Int) =
|
|
byIssue(owner, repository, issueId) && (this.labelId === labelId.bind)
|
|
}
|
|
}
|
|
|
|
case class IssueLabel(
|
|
userName: String,
|
|
repositoryName: String,
|
|
issueId: Int,
|
|
labelId: Int
|
|
)
|