Added support for mail digests

This commit is contained in:
Šesták Vít
2016-03-10 16:25:32 +01:00
parent dd99fe8e9b
commit 7b6192593d
12 changed files with 216 additions and 31 deletions

View File

@@ -0,0 +1,15 @@
package models
import com.mohiva.play.silhouette.api.LoginInfo
import models.profile.api._
import slick.lifted.Tag
case class NotificationDigestStatus(user: LoginInfo, lastChangelogIdOption: Option[Int])
class NotificationDigestStatuses(tag: Tag) extends Table[NotificationDigestStatus](tag, "notification_digest_status"){
val user = new LoginInfoColumns("user", this)
def lastChangelogId = column[Int]("last_changelog_id").?
def * = (user(), lastChangelogId) <> (NotificationDigestStatus.tupled, NotificationDigestStatus.unapply)
def idx = index("notification_digest_status_user_idx", user(), unique = true)
}