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

im.actor.server.persist.contact.UserEmailContactRepo.scala Maven / Gradle / Ivy

The newest version!
package im.actor.server.persist.contact

import im.actor.server.db.ActorPostgresDriver.api._
import im.actor.server.model.contact.UserEmailContact

final class UserEmailContactTable(tag: Tag) extends UserContactBase[UserEmailContact](tag, "user_email_contacts") with InheritingTable {
  def email = column[String]("email")
  val inherited = UserContactRepo.contacts.baseTableRow

  def * = (email, ownerUserId, contactUserId, name, isDeleted) <> (UserEmailContact.tupled, UserEmailContact.unapply)
}

object UserEmailContactRepo {
  val econtacts = TableQuery[UserEmailContactTable]

  def insertOrUpdate(contact: UserEmailContact) =
    econtacts.insertOrUpdate(contact)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy