member.gno

0.54 Kb ยท 27 lines
 1package groups
 2
 3import (
 4	"std"
 5	"strconv"
 6	"time"
 7)
 8
 9type MemberID uint64
10
11type Member struct {
12	id        MemberID
13	address   std.Address
14	weight    int
15	metadata  string
16	createdAt time.Time
17}
18
19func (mid MemberID) String() string {
20	return strconv.Itoa(int(mid))
21}
22
23func (member *Member) getMemberStr() string {
24	memberDataStr := ""
25	memberDataStr += "\t\t\t[" + memberIDKey(member.id) + ", " + member.address.String() + ", " + strconv.Itoa(member.weight) + ", " + member.metadata + ", " + member.createdAt.String() + "],\n\n"
26	return memberDataStr
27}