probo/models/group.go
2023-12-05 22:11:08 +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)
}