blob: e8ae3cce96dd13d3ae3d07d949f7e47e9b3251b4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package models
import (
"encoding/gob"
)
func init() {
gob.Register(User{})
}
type User struct {
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
const (
RoleUser UserRole = iota
RoleModerator
RoleAdmin
)
|