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) GetID() string { return g.ID } func (g *Group) SetID(id string) { g.ID = id } 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) }