|
@@ -645,6 +645,14 @@ func (s *StoreEntry) CowTypeMap() map[pasturePb.CowType_Kind]string {
|
|
return res
|
|
return res
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func (s *StoreEntry) CowStatusMap() map[pasturePb.CowStatus_Kind]string {
|
|
|
|
+ res := make(map[pasturePb.CowStatus_Kind]string)
|
|
|
|
+ for _, v := range s.CowStatusEnumList() {
|
|
|
|
+ res[pasturePb.CowStatus_Kind(v.Value)] = v.Label
|
|
|
|
+ }
|
|
|
|
+ return res
|
|
|
|
+}
|
|
|
|
+
|
|
func (s *StoreEntry) BarnTypeOptions(ctx context.Context) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
func (s *StoreEntry) BarnTypeOptions(ctx context.Context) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
Code: http.StatusOK,
|
|
Code: http.StatusOK,
|
|
@@ -652,6 +660,7 @@ func (s *StoreEntry) BarnTypeOptions(ctx context.Context) (*pasturePb.ConfigOpti
|
|
Data: s.BarnTypeEnumList(),
|
|
Data: s.BarnTypeEnumList(),
|
|
}, nil
|
|
}, nil
|
|
}
|
|
}
|
|
|
|
+
|
|
func (s *StoreEntry) BarnListOptions(ctx context.Context, penType int) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
func (s *StoreEntry) BarnListOptions(ctx context.Context, penType int) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
penList := make([]*model.Pen, 0)
|
|
penList := make([]*model.Pen, 0)
|
|
pref := s.DB.Table(new(model.Pen).TableName()).
|
|
pref := s.DB.Table(new(model.Pen).TableName()).
|