Newer
Older
gitbucket_jkp / src / main / scala / service / AccountService.scala
@takezoe takezoe on 2 Jun 2013 395 bytes Fix the index page.
package service

import model._
import scala.slick.driver.H2Driver.simple._
import Database.threadLocalSession

trait AccountService {

  def getAccountByUserId(userId: Long): Option[Account] =
    Query(Accounts) filter(_.userId is userId.bind) firstOption


  def getAccountByUserName(userName: String): Option[Account] =
    Query(Accounts) filter(_.userName is userName.bind) firstOption

}