mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-01-15 00:03:59 +01:00
21 lines
490 B
Scala
21 lines
490 B
Scala
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)
|
|
|
|
}
|