This commit is contained in:
lbenedar
2026-04-02 18:37:30 +03:00
commit d5577f10d7
26 changed files with 1946 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
package models
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/models/modules"
type User struct {
Name string `json:"name,omitempty"`
Role int `json:"role,omitempty"`
Id string `json:"_id,omitempty"`
avatar struct{} `json:"-"`
Character string `json:"character,omitempty"`
Color string `json:"color,omitempty"`
Pronouns string `json:"pronouns,omitempty"`
Hotbar map[string]string `json:"hotbar,omitempty"`
permissions struct{} `json:"-"`
Flags UserFlags `json:"flags,omitempty"`
Stats UserStats `json:"_stats,omitempty"`
}
type UserFlags struct {
World map[string]bool `json:"world,omitempty"`
Pf2e modules.Pf2eModule `json:"pf2e,omitempty"`
DiceStats modules.DiceStats `json:"diceStats,omitempty"`
}
type UserStats struct {
compendiumSource struct{} `json:"-"`
duplicateSource struct{} `json:"-"`
exportSource struct{} `json:"-"`
CoreVersion string `json:"coreVersion,omitempty"`
SystemId string `json:"systemId,omitempty"`
SystemVersion string `json:"systemVersion,omitempty"`
CreatedTime int64 `json:"createdTime,omitempty"`
ModifiedTime int64 `json:"modifiedTime,omitempty"`
LastModifiedBy string `json:"lastModifiedBy,omitempty"`
}
type Users []User
func (users Users) GetById(id int) *User {
return &users[id]
}
func (state *FoundryState) GetUsers() *Users {
return &state.Users
}