Created
June 5, 2015 20:33
-
-
Save Jacoby6000/68e3ffd86a114980c6a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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