29 lines
634 B
Go
29 lines
634 B
Go
package proto
|
|
|
|
import (
|
|
streamerproto "service/api/proto/streamer/proto"
|
|
"service/dbstruct"
|
|
)
|
|
|
|
type MomentVO interface {
|
|
CopyMoment(moment *dbstruct.Moment)
|
|
CopyStreamerExt(streamerExt streamerproto.StreamerExtVO)
|
|
}
|
|
|
|
type OpMomentVO struct {
|
|
*dbstruct.Moment
|
|
StreamerExt *streamerproto.OpListExtVO `json:"streamer_ext"`
|
|
}
|
|
|
|
func (vo *OpMomentVO) CopyMoment(moment *dbstruct.Moment) {
|
|
vo.Moment = moment
|
|
}
|
|
|
|
func (vo *OpMomentVO) CopyStreamerExt(streamerExt streamerproto.StreamerExtVO) {
|
|
if streamerExt != nil {
|
|
if opStreamerExt, ok := streamerExt.(*streamerproto.OpListExtVO); ok {
|
|
vo.StreamerExt = opStreamerExt
|
|
}
|
|
}
|
|
}
|