Start base of party 2
This commit is contained in:
parent
1d7c43b7b9
commit
5bd856e04f
24
person/parties.go
Normal file
24
person/parties.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
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
|
||||
}
|
Loading…
Reference in New Issue
Block a user