X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=db%2Fuser.go;h=24ce491e80ab9e4e3b7ee9135912aa4da1d9c853;hb=71e5314813f4b156809397a58304d43a47cf8357;hp=64ca6a611ee7609ae0607995c4820598372739f2;hpb=2da5b12c31074591eaf16929b760322b98f189e8;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FFront.git 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 ( AwaitingConfirmation ) +type UserRole string + +const RoleUser UserRole = "user" +const RoleAdmin UserRole = "admin" + type User struct { Id int64 - Email string `sql:",unique,notnull"` - PasswordHash string `sql:",notnull"` + Role UserRole + Email string + PasswordHash string OtpSecret string IsOtpSetup bool Status UserStatus