package model import pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow" type ConfigNeckRingIsBind struct { Id int32 `json:"id"` PastureId int64 `json:"pastureId"` Kind pasturePb.NeckRingIsBind_Kind `json:"kind"` Zh string `json:"zh"` En string `json:"en"` Remarks string `json:"remarks"` IsShow pasturePb.IsShow_Kind `json:"is_show"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` } func (c *ConfigNeckRingIsBind) TableName() string { return "config_neck_ring_isbind" } type ConfigNeckRingIsBindSlice []*ConfigNeckRingIsBind func (c ConfigNeckRingIsBindSlice) ToPB(lang string) []*pasturePb.ConfigOptionsList { res := make([]*pasturePb.ConfigOptionsList, 0) for _, v := range c { label := v.Zh if lang == "en" { label = v.En } res = append(res, &pasturePb.ConfigOptionsList{ Value: int32(v.Kind), Label: label, Disabled: true, }) } return res }