Add new user creation stuff.

This commit is contained in:
takezoe
2013-06-04 12:25:43 +09:00
parent 99e6abf833
commit dd7fef93fc
5 changed files with 126 additions and 3 deletions

View File

@@ -8,6 +8,11 @@ trait AccountService {
def getAccountByUserName(userName: String): Option[Account] =
Query(Accounts) filter(_.userName is userName.bind) firstOption
def getAllUsers(): List[Account] =
Query(Accounts) sortBy(_.userName) list
def createAccount(account: Account): Unit = Accounts.* insert account
}