Skip to content

Instantly share code, notes, and snippets.

@Jacoby6000
Created June 5, 2015 20:33
Show Gist options
  • Save Jacoby6000/68e3ffd86a114980c6a1 to your computer and use it in GitHub Desktop.
Save Jacoby6000/68e3ffd86a114980c6a1 to your computer and use it in GitHub Desktop.
package tables
import models.Cat
import slick.driver.JdbcProfile
class CatTable(driver: JdbcProfile) {
import driver.api._
class Cats(tag: Tag) extends Table[Cat](tag, "CAT") {
def name = column[String]("NAME", O.PrimaryKey)
def color = column[String]("COLOR")
def * = (name, color) <> (Cat.tupled, Cat.unapply _)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment