| 1234567891011121314151617181920212223242526272829303132333435 | 
							- package model
 
- import (
 
- 	pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
 
- )
 
- type ConfigCowStatus struct {
 
- 	Id        int64                 `json:"id"`
 
- 	Name      string                `json:"name"`
 
- 	Remarks   string                `json:"remarks"`
 
- 	IsShow    pasturePb.IsShow_Kind `json:"is_show"`
 
- 	CreatedAt int64                 `json:"created_at"`
 
- 	UpdatedAt int64                 `json:"updated_at"`
 
- }
 
- func (c *ConfigCowStatus) TableName() string {
 
- 	return "config_cow_status"
 
- }
 
- type ConfigCowStatusSlice []*ConfigCowStatus
 
- func (c ConfigCowStatusSlice) ToPB() []*pasturePb.SearchBaseConfigList {
 
- 	res := make([]*pasturePb.SearchBaseConfigList, len(c))
 
- 	for i, d := range c {
 
- 		res[i] = &pasturePb.SearchBaseConfigList{
 
- 			Id:        int32(d.Id),
 
- 			Name:      d.Name,
 
- 			Remarks:   d.Remarks,
 
- 			IsShow:    d.IsShow,
 
- 			CreatedAt: int32(d.CreatedAt),
 
- 			UpdatedAt: int32(d.UpdatedAt),
 
- 		}
 
- 	}
 
- 	return res
 
- }
 
 
  |