mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 14:35:52 +01:00
(refs #341) Migrate service package.
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
package model
|
||||
|
||||
trait ActivityComponent extends TemplateComponent { self: Profile =>
|
||||
import profile.simple._
|
||||
import self._
|
||||
|
||||
lazy val Activities = TableQuery[Activities]
|
||||
|
||||
class Activities(tag: Tag) extends Table[Activity](tag, "ACTIVITY") with BasicTemplate {
|
||||
val activityId = column[Int]("ACTIVITY_ID", O AutoInc)
|
||||
val activityUserName = column[String]("ACTIVITY_USER_NAME")
|
||||
val activityType = column[String]("ACTIVITY_TYPE")
|
||||
val message = column[String]("MESSAGE")
|
||||
val additionalInfo = column[String]("ADDITIONAL_INFO")
|
||||
val activityDate = column[java.util.Date]("ACTIVITY_DATE")
|
||||
def * = (activityId, userName, repositoryName, activityUserName, activityType, message, additionalInfo.?, activityDate) <> (Activity.tupled, Activity.unapply)
|
||||
}
|
||||
|
||||
case class Activity(
|
||||
activityId: Int,
|
||||
userName: String,
|
||||
repositoryName: String,
|
||||
activityUserName: String,
|
||||
activityType: String,
|
||||
message: String,
|
||||
additionalInfo: Option[String],
|
||||
activityDate: java.util.Date
|
||||
)
|
||||
}
|
||||
package model
|
||||
|
||||
trait ActivityComponent extends TemplateComponent { self: Profile =>
|
||||
import profile.simple._
|
||||
import self._
|
||||
|
||||
lazy val Activities = TableQuery[Activities]
|
||||
|
||||
class Activities(tag: Tag) extends Table[Activity](tag, "ACTIVITY") with BasicTemplate {
|
||||
val activityId = column[Int]("ACTIVITY_ID", O AutoInc)
|
||||
val activityUserName = column[String]("ACTIVITY_USER_NAME")
|
||||
val activityType = column[String]("ACTIVITY_TYPE")
|
||||
val message = column[String]("MESSAGE")
|
||||
val additionalInfo = column[String]("ADDITIONAL_INFO")
|
||||
val activityDate = column[java.util.Date]("ACTIVITY_DATE")
|
||||
def * = (userName, repositoryName, activityUserName, activityType, message, additionalInfo.?, activityDate, activityId) <> (Activity.tupled, Activity.unapply)
|
||||
}
|
||||
|
||||
case class Activity(
|
||||
userName: String,
|
||||
repositoryName: String,
|
||||
activityUserName: String,
|
||||
activityType: String,
|
||||
message: String,
|
||||
additionalInfo: Option[String],
|
||||
activityDate: java.util.Date,
|
||||
activityId: Int = 0
|
||||
)
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ trait IssueCommentComponent extends TemplateComponent { self: Profile =>
|
||||
userName: String,
|
||||
repositoryName: String,
|
||||
issueId: Int,
|
||||
commentId: Int,
|
||||
commentId: Int = 0,
|
||||
action: String,
|
||||
commentedUserName: String,
|
||||
content: String,
|
||||
|
||||
@@ -18,7 +18,7 @@ trait LabelComponent extends TemplateComponent { self: Profile =>
|
||||
case class Label(
|
||||
userName: String,
|
||||
repositoryName: String,
|
||||
labelId: Int,
|
||||
labelId: Int = 0,
|
||||
labelName: String,
|
||||
color: String){
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ trait MilestoneComponent extends TemplateComponent { self: Profile =>
|
||||
case class Milestone(
|
||||
userName: String,
|
||||
repositoryName: String,
|
||||
milestoneId: Int,
|
||||
milestoneId: Int = 0,
|
||||
title: String,
|
||||
description: Option[String],
|
||||
dueDate: Option[java.util.Date],
|
||||
|
||||
@@ -2,7 +2,6 @@ package model
|
||||
|
||||
import slick.driver.JdbcProfile
|
||||
|
||||
//private[model]
|
||||
trait Profile {
|
||||
val profile: JdbcProfile
|
||||
import profile.simple._
|
||||
|
||||
Reference in New Issue
Block a user