package repository import "joylink.club/rtsssimulation/repository/model/proto" type Relay struct { Identity code string model string } func newRelay(id string, code string, model string) *Relay { return &Relay{ Identity: identity{ id: id, deviceType: proto.DeviceType_DeviceType_Relay, }, code: code, model: model, } } func (r *Relay) Code() string { return r.code } func (r *Relay) Model() string { return r.model } type RelayGroup struct { code string relays []*Relay } func (r *RelayGroup) Code() string { return r.code } func (r *RelayGroup) Relays() []*Relay { return r.relays }