Cloudreve/service/admin/list.go

23 lines
688 B
Go
Raw Normal View History

package admin
import (
model "github.com/HFO4/cloudreve/models"
"github.com/HFO4/cloudreve/pkg/serializer"
)
2020-02-24 02:52:13 -05:00
// AdminListService 仪表盘列条目服务
type AdminListService struct {
Page int `json:"page" binding:"min=1,required"`
PageSize int `json:"page_size" binding:"min=1,required"`
OrderBy string `json:"order_by"`
Conditions map[string]string `form:"conditions"`
Searches map[string]string `form:"searches"`
}
// GroupList 获取用户组列表
func (service *NoParamService) GroupList() serializer.Response {
var res []model.Group
model.DB.Model(&model.Group{}).Find(&res)
return serializer.Response{Data: res}
}