receipt_indexer/backend/internal/storage/users.go
Ethan Wellenreiter 10de7d3749 Moving and adjusting interfaces and related structs
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2025-05-05 22:05:50 -04:00

30 lines
680 B
Go

package storage
import (
"errors"
)
var (
ErrUserNotFound = errors.New("user not found")
ErrExistingUser = errors.New("user already exists")
ErrPasswordIncorrect = errors.New("password incorrect")
)
type User struct {
ID int64 `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Password string `json:"-"`
CreatedAt string `json:"created_at"`
IsActive bool `json:"is_active"`
Role Role `json:"role"`
PersonalGroup int64 `json:"user_group"`
Groups []int64 `json:"groups"`
}
// type Password struct {
// text *string
// hash []byte
// encoded *string
// }