Update flag columns to BOOLEAN.

This commit is contained in:
takezoe
2013-06-21 13:24:58 +09:00
parent 44e53e05fd
commit 65eb89475a
16 changed files with 58 additions and 76 deletions

View File

@@ -16,11 +16,11 @@ trait AccountService {
def updateAccount(account: Account): Unit =
Query(Accounts)
.filter { a => a.userName is account.userName.bind }
.map { a => a.password ~ a.mailAddress ~ a.userType ~ a.url.? ~ a.registeredDate ~ a.updatedDate ~ a.lastLoginDate.? }
.map { a => a.password ~ a.mailAddress ~ a.isAdmin ~ a.url.? ~ a.registeredDate ~ a.updatedDate ~ a.lastLoginDate.? }
.update (
account.password,
account.mailAddress,
account.userType,
account.isAdmin,
account.url,
account.registeredDate,
account.updatedDate,
@@ -31,10 +31,3 @@ trait AccountService {
.update(new java.sql.Date(System.currentTimeMillis))
}
object AccountService {
val Normal = 0
val Administrator = 1
}