snow/person/parties.go
2024-02-11 00:58:23 +00:00

24 lines
303 B
Go

package person
import (
"github.com/ectrc/snow/aid"
"github.com/google/uuid"
)
type Party struct{
ID string
Members []*Person
}
var (
Parties = aid.GenericSyncMap[Party]{}
)
func NewParty() *Party {
party := &Party{
ID: uuid.New().String(),
}
Parties.Set(party.ID, party)
return party
}