mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
(refs #464)Add PLUGIN table for plugin management
This commit is contained in:
19
src/main/scala/model/Plugin.scala
Normal file
19
src/main/scala/model/Plugin.scala
Normal file
@@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
trait PluginComponent extends TemplateComponent { self: Profile =>
|
||||
import profile.simple._
|
||||
import self._
|
||||
|
||||
lazy val Plugins = TableQuery[Plugins]
|
||||
|
||||
class Plugins(tag: Tag) extends Table[Plugin](tag, "PLUGIN"){
|
||||
val pluginId = column[String]("PLUGIN_ID")
|
||||
val version = column[String]("VERSION")
|
||||
def * = (pluginId, version) <> (Plugin.tupled, Plugin.unapply)
|
||||
}
|
||||
}
|
||||
|
||||
case class Plugin(
|
||||
pluginId: String,
|
||||
version: String
|
||||
)
|
||||
Reference in New Issue
Block a user