stillbox/pkg/users/user.go
2025-01-15 23:11:42 -05:00

30 lines
337 B
Go

package users
import (
"encoding/json"
)
type UserID int
func (u *UserID) Int32Ptr() *int32 {
if u == nil {
return nil
}
i := int32(*u)
return &i
}
func (u UserID) Int() int {
return int(u)
}
type User struct {
ID UserID
Username string
Password string
Email string
IsAdmin bool
Prefs json.RawMessage
}