probo/lib/models/group.go
2023-12-21 17:38:05 +01:00

27 lines
428 B
Go

package models
import (
"github.com/gocarina/gocsv"
)
type Group struct {
Meta
Name string
Participants []*Participant
}
func (g *Group) String() string {
return g.Name
}
func (g *Group) GetHash() string {
return ""
}
func (g *Group) Marshal() ([]byte, error) {
return gocsv.MarshalBytes(g.Participants)
}
func (g *Group) Unmarshal(data []byte) error {
return gocsv.UnmarshalBytes(data, &g.Participants)
}