gorum/models/user.go

26 lines
411 B
Go

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
)