diff options
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/models/user.go b/models/user.go index 73358fe..e8ae3cc 100644 --- a/models/user.go +++ b/models/user.go @@ -2,8 +2,6 @@ package models import ( "encoding/gob" - - "github.com/uptrace/bun" ) func init() { @@ -11,14 +9,11 @@ func init() { } type User struct { - bun.BaseModel `bun:"table:users,alias:u"` - - ID int `bun:"id,pk,autoincrement"` - Email string - Password string - Username string - Photo *string - Role UserRole + Email string `json:"email,omitempty"` + Password string `json:"password,omitempty"` + Username string `json:"username,omitempty"` + Photo *string `json:"photo,omitempty"` + Role UserRole `json:"role,omitempty"` } type UserRole int |