mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 06:25:51 +01:00
Improved model package. The details are as follows:
* Fix the Profiles class from package object to simple object * Fix the row case class to model package * Define the alias of JdbcBackend#Session
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.{Account, GroupMember}
|
||||
// TODO [Slick 2.0]NOT import directly?
|
||||
import model.dateColumnType
|
||||
import model.Profile.dateColumnType
|
||||
import service.SystemSettingsService.SystemSettings
|
||||
import util.StringUtil._
|
||||
import util.LDAPUtil
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.Activity
|
||||
|
||||
trait ActivityService {
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@ package service
|
||||
import scala.slick.jdbc.{StaticQuery => Q}
|
||||
import Q.interpolation
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.{Issue, IssueComment, IssueLabel, Label}
|
||||
import util.Implicits._
|
||||
import util.StringUtil._
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.Label
|
||||
|
||||
trait LabelsService {
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.Milestone
|
||||
// TODO [Slick 2.0]NOT import directly?
|
||||
import model.dateColumnType
|
||||
import model.Profile.dateColumnType
|
||||
|
||||
trait MilestonesService {
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.{PullRequest, Issue}
|
||||
|
||||
trait PullRequestService { self: IssuesService =>
|
||||
import PullRequestService._
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.eclipse.jgit.revwalk.RevWalk
|
||||
import org.eclipse.jgit.treewalk.TreeWalk
|
||||
import org.eclipse.jgit.lib.FileMode
|
||||
import org.eclipse.jgit.api.Git
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
|
||||
trait RepositorySearchService { self: IssuesService =>
|
||||
@@ -107,7 +107,7 @@ object RepositorySearchService {
|
||||
|
||||
case class SearchResult(
|
||||
files : List[(String, String)],
|
||||
issues: List[(Issue, Int, String)])
|
||||
issues: List[(model.Issue, Int, String)])
|
||||
|
||||
case class IssueSearchResult(
|
||||
issueId: Int,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.{Repository, Account, Collaborator}
|
||||
import util.JGitUtil
|
||||
|
||||
trait RepositoryService { self: AccountService =>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import slick.jdbc.JdbcBackend
|
||||
import model.{Account, Issue, Session}
|
||||
import util.Implicits.request2Session
|
||||
|
||||
/**
|
||||
@@ -12,7 +11,7 @@ import util.Implicits.request2Session
|
||||
*/
|
||||
trait RequestCache extends SystemSettingsService with AccountService with IssuesService {
|
||||
|
||||
private implicit def context2Session(implicit context: app.Context): JdbcBackend#Session =
|
||||
private implicit def context2Session(implicit context: app.Context): Session =
|
||||
request2Session(context.request)
|
||||
|
||||
def getIssue(userName: String, repositoryName: String, issueId: String)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.SshKey
|
||||
|
||||
trait SshKeyService {
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import model.Profile._
|
||||
import profile.simple._
|
||||
import model.{WebHook, Account}
|
||||
import org.slf4j.LoggerFactory
|
||||
import service.RepositoryService.RepositoryInfo
|
||||
import util.JGitUtil
|
||||
|
||||
Reference in New Issue
Block a user