aboutsummaryrefslogtreecommitdiff
path: root/db/user.go
diff options
context:
space:
mode:
authorjloup <jloup@jloup.work>2018-05-13 15:47:59 +0100
committerjloup <jloup@jloup.work>2018-05-13 15:47:59 +0100
commitcf5bb85cede5b05b58ed2b40460d0b913e8b2cf6 (patch)
tree0a5de670cf7f03ab8d582e28c006b643b0c6e22d /db/user.go
parent391835378931665f449c2e99dc070292d193409e (diff)
downloadFront-cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6.tar.gz
Front-cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6.tar.zst
Front-cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6.zip
User roles.v0.0.13
Diffstat (limited to 'db/user.go')
-rw-r--r--db/user.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/db/user.go b/db/user.go
index 64ca6a6..24ce491 100644
--- a/db/user.go
+++ b/db/user.go
@@ -11,10 +11,16 @@ const (
11 AwaitingConfirmation 11 AwaitingConfirmation
12) 12)
13 13
14type UserRole string
15
16const RoleUser UserRole = "user"
17const RoleAdmin UserRole = "admin"
18
14type User struct { 19type User struct {
15 Id int64 20 Id int64
16 Email string `sql:",unique,notnull"` 21 Role UserRole
17 PasswordHash string `sql:",notnull"` 22 Email string
23 PasswordHash string
18 OtpSecret string 24 OtpSecret string
19 IsOtpSetup bool 25 IsOtpSetup bool
20 Status UserStatus 26 Status UserStatus