2023-06-09 11:36:44 +00:00
|
|
|
package account
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.lumeweb.com/LumeWeb/portal/model"
|
2023-06-29 11:05:46 +00:00
|
|
|
"github.com/kataras/iris/v12/context"
|
2023-06-09 11:36:44 +00:00
|
|
|
"strconv"
|
|
|
|
)
|
|
|
|
|
|
|
|
type User struct {
|
2023-06-29 11:05:46 +00:00
|
|
|
context.User
|
2023-06-09 11:36:44 +00:00
|
|
|
account *model.Account
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u User) GetID() (string, error) {
|
|
|
|
return strconv.Itoa(int(u.account.ID)), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewUser(account *model.Account) *User {
|
|
|
|
return &User{account: account}
|
|
|
|
}
|