mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-21 00:29:38 +01:00
Initial commit
This commit is contained in:
20
app/models/odc/CpeEntry.scala
Normal file
20
app/models/odc/CpeEntry.scala
Normal file
@@ -0,0 +1,20 @@
|
||||
package models.odc
|
||||
|
||||
import models.odc.profile.api._
|
||||
import slick.lifted.Tag
|
||||
|
||||
final case class CpeEntry(cpe: String, vendor: String, product: String)
|
||||
|
||||
class CpeEntries(tag: Tag) extends Table[(Int, CpeEntry)](tag, "cpeEntry") {
|
||||
|
||||
def id = column[Int]("id", O.PrimaryKey)
|
||||
|
||||
def cpe = column[String]("cpe")
|
||||
def vendor = column[String]("vendor")
|
||||
def product = column[String]("product")
|
||||
|
||||
def base = (cpe, vendor, product) <> (CpeEntry.tupled, CpeEntry.unapply)
|
||||
|
||||
def * = (id, base)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user