Skip to content

Instantly share code, notes, and snippets.

Created May 26, 2016 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/28cb26a9de2fcd56b2e7e284f1dc708a to your computer and use it in GitHub Desktop.
Save anonymous/28cb26a9de2fcd56b2e7e284f1dc708a to your computer and use it in GitHub Desktop.
the description for this gist
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