system_pasture_menu.go 502 B

1234567891011121314151617181920212223
  1. package model
  2. type SystemPastureMenu struct {
  3. Id int64 `json:"id"`
  4. PastureId int64 `json:"pastureId"`
  5. MenuId int64 `json:"menuId"`
  6. CreatedAt int64 `json:"createdAt"`
  7. UpdatedAt int64 `json:"updatedAt"`
  8. }
  9. func (s *SystemPastureMenu) TableName() string {
  10. return "system_pasture_menu"
  11. }
  12. type SystemPastureMenuSlice []*SystemPastureMenu
  13. func (s SystemPastureMenuSlice) GetMenuIds() []int64 {
  14. res := make([]int64, 0)
  15. for _, v := range s {
  16. res = append(res, v.MenuId)
  17. }
  18. return res
  19. }