All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.touk.nussknacker.ui.db.entity.EnvironmentsEntityFactory.scala Maven / Gradle / Ivy

There is a newer version: 1.17.0
Show newest version
package pl.touk.nussknacker.ui.db.entity

import slick.jdbc.JdbcProfile
import slick.lifted.{ProvenShape, TableQuery => LTableQuery}

//TODO: Remove it in next release
trait EnvironmentsEntityFactory {

  protected val profile: JdbcProfile
  import profile.api._

  val environmentsTable: LTableQuery[EnvironmentsEntityFactory#EnvironmentsEntity] = LTableQuery(
    new EnvironmentsEntity(_)
  )

  class EnvironmentsEntity(tag: Tag) extends Table[EnvironmentsEntityData](tag, "environments") {
    def name: Rep[String] = column[String]("name", O.PrimaryKey)

    def * : ProvenShape[EnvironmentsEntityData] = name <> (EnvironmentsEntityData.apply, EnvironmentsEntityData.unapply)
  }

}

final case class EnvironmentsEntityData(name: String)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy