Created
May 26, 2016 06:14
-
-
Save anonymous/28cb26a9de2fcd56b2e7e284f1dc708a to your computer and use it in GitHub Desktop.
the description for this gist
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
object Users { | |
case class UserRow( | |
id: UserID, | |
email: Email | |
) | |
class Users(_tag: Tag) extends Table[UserRow](_tag, "users") with TaggedTypesImplicitMapper { | |
override def * = (id, email) <>(UserRow.tupled, UserRow.unapply) | |
val id = column[UserID]("id", O.PrimaryKey, O.AutoInc) | |
val email = column[Email]("email") | |
} | |
val users = TableQuery(new Users(_)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment