| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | 
							- package model
 
- import pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
 
- type AppPastureList struct {
 
- 	Id                   int64                          `json:"id"`
 
- 	FarmId               string                         `json:"farmId"`
 
- 	Name                 string                         `json:"name"`
 
- 	ShortName            string                         `json:"shortName"`
 
- 	GroupId              int64                          `json:"groupId"`
 
- 	Province             string                         `json:"province"`
 
- 	City                 string                         `json:"city"`
 
- 	County               string                         `json:"county"`
 
- 	Address              string                         `json:"address"`
 
- 	LegalPersonName      string                         `json:"legalPersonName"`
 
- 	LegalPersonPhone     string                         `json:"legalPersonPhone"`
 
- 	FactoryDirectorName  string                         `json:"factoryDirectorName"`
 
- 	FactoryDirectorPhone string                         `json:"factoryDirectorPhone"`
 
- 	Category             pasturePb.PastureCategory_Kind `json:"category"`
 
- 	CurrentScale         string                         `json:"currentScale"`
 
- 	PlanScale            string                         `json:"planScale"`
 
- 	AppId                string                         `json:"appId"`
 
- 	Status               int32                          `json:"status"`
 
- 	FeedPastureId        int64                          `json:"feedPastureId"`
 
- 	FeedPastureUrl       string                         `json:"feedPastureUrl"`
 
- 	IsShow               pasturePb.IsShow_Kind          `json:"isShow"`
 
- 	ProductionModel      int32                          `json:"productionModel"`
 
- 	Remarks              string                         `json:"remarks"`
 
- 	CreatedName          string                         `json:"createdName"`
 
- 	CreatedAt            int64                          `json:"createdAt"`
 
- 	UpdatedAt            string                         `json:"updatedAt"`
 
- }
 
- func (a *AppPastureList) TableName() string {
 
- 	return "app_pasture_list"
 
- }
 
- type AppPastureListSlice []*AppPastureList
 
- func (a AppPastureListSlice) ToPB() []*pasturePb.UserPasture {
 
- 	res := make([]*pasturePb.UserPasture, len(a))
 
- 	for i, d := range a {
 
- 		res[i] = &pasturePb.UserPasture{
 
- 			FarmId: d.FarmId,
 
- 			Name:   d.Name,
 
- 		}
 
- 	}
 
- 	return res
 
- }
 
 
  |