You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
410 B
Go
21 lines
410 B
Go
package model
|
|
|
|
import (
|
|
"joybuywork/internal/plugins/jsonm"
|
|
"joybuywork/internal/repository/mtype"
|
|
)
|
|
|
|
func (s *Reward) SetKvData(val []*mtype.RewardKV) {
|
|
s.KvData, _ = jsonm.MarshalToString(val)
|
|
}
|
|
|
|
func (s *Reward) GetKvData() (val []*mtype.RewardKV) {
|
|
_ = jsonm.StrUnmarshal(s.KvData, &val)
|
|
return
|
|
}
|
|
|
|
func (s *Reward) GetJustKvData() (val []*mtype.KV) {
|
|
_ = jsonm.StrUnmarshal(s.KvData, &val)
|
|
return
|
|
}
|