package domain

import "time"

const (
	UserRole      = Role("BIDDER")
	AdminRole     = Role("ADMINISRATOR")
	AnonymousRole = Role("ANONYMOUS")
	EmptyRole     = Role("")
)

type Role string

func (r Role) String() string {
	return string(r)
}

type Account struct {
	ID           int       `json:"id"`
	Created      time.Time `json:"created"`
	Verified     time.Time `json:"verified,omitempty"`
	Email        string    `json:"email"`
	PasswordHash string    `json:"password_hash,omitempty"`
	Role         Role      `json:"role"`
	Enabled      bool      `json:"enabled"`
}

type Session struct {
	ID        int
	AccountID int
	Created   time.Time
}
