Browse Source

system: 系统角色

Yi 1 year ago
parent
commit
91f33ba119

+ 2 - 2
backend/common/pagination.proto → backend/operation/pagination.proto

@@ -1,8 +1,8 @@
 syntax = "proto3";
 
-package backend.common;
+package backend.operation;
 
-option go_package = ".;commonPb";
+option go_package = ".;operationPb";
 
 
 message PaginationModel {

+ 13 - 3
backend/operation/system.proto

@@ -4,16 +4,24 @@ package backend.operation;
 option go_package = ".;operationPb";
 
 import "backend/operation/enum.proto";
+import "backend/operation/pagination.proto";
 // 用户权限
 message AddRoleRequest {
   int64 id = 1;
-  string name = 2;      // 角色名称
-  string remarks = 3;   // 角色备注
-  IsShow is_show = 4;   // 是否启用
+  string name = 2;        // 角色名称
+  string remarks = 3;     // 角色备注
+  IsShow.Kind is_show = 4;     // 是否启用
+  repeated int64 pasture_id = 5;    // 牧场id
+  repeated int64 menu_id = 6;       // 菜单id
+  repeated int64 mobile_id = 7;     // 移动端id
+  string create_user = 8;          // 创建用户
+  int64 created_at = 9;             // 创建时间
+  string crated_at_format = 10;     // 创建时间格式化
 }
 
 message SearchRoleRequest {
   string name = 3;       // 角色名称
+  PaginationModel pagination = 2;  // 分页
 }
 
 message SearchRoleResponse {
@@ -56,6 +64,7 @@ message AddSystemUser {
   string employee_name = 6;        // 员工姓名
   string create_user = 7;          // 创建人
   int64 created_at = 8;            // 创建时间
+  string crated_at_format = 9;      // 创建时间格式化
 }
 
 // 查询用户
@@ -65,6 +74,7 @@ message SearchUserRequest {
   IsShow.Kind is_show = 3;        // 是否启用
   int64 created_start_time = 4;   // 开始时间
   int64 created_end_time = 5;     // 结束时间
+  PaginationModel pagination = 6; // 分页
 }
 
 message SearchUserResponse {

+ 90 - 0
http/handler/system/role.go

@@ -1,13 +1,103 @@
 package system
 
 import (
+	"kpt-tmr-group/http/middleware"
+	"kpt-tmr-group/pkg/apierr"
 	"kpt-tmr-group/pkg/apiok"
+	"kpt-tmr-group/pkg/valid"
+	operationPb "kpt-tmr-group/proto/go/backend/operation"
 	"net/http"
+	"strconv"
 
 	"github.com/gin-gonic/gin"
 )
 
+// AddSystemRole 添加角色
 func AddSystemRole(c *gin.Context) {
+	var req operationPb.AddRoleRequest
+	if err := c.BindJSON(&req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := valid.ValidateStruct(&req,
+		valid.Field(&req.Name, valid.Required),
+		valid.Field(&req.PastureId, valid.Required),
+		valid.Field(&req.MenuId, valid.Required),
+		valid.Field(&req.CreateUser, valid.Required),
+	); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := middleware.Dependency(c).StoreEventHub.OpsService.CreateSystemRole(c, &req); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
+}
+
+// EditSystemRole 编辑角色
+func EditSystemRole(c *gin.Context) {
+	var req operationPb.AddRoleRequest
+	if err := c.BindJSON(&req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := valid.ValidateStruct(&req,
+		valid.Field(&req.Name, valid.Required),
+		valid.Field(&req.PastureId, valid.Required),
+		valid.Field(&req.MenuId, valid.Required),
+		valid.Field(&req.CreateUser, valid.Required),
+	); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := middleware.Dependency(c).StoreEventHub.OpsService.EditSystemRole(c, &req); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
+}
+
+// DeleteSystemRole 删除角色
+func DeleteSystemRole(c *gin.Context) {
+	roleIdStr := c.Param("role_id")
+	roleId, _ := strconv.Atoi(roleIdStr)
+
+	if err := valid.Validate(roleId, valid.Required, valid.Min(1)); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+
+	if err := middleware.BackendOperation(c).OpsService.DeleteSystemRole(c, int64(roleId)); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
 
 	c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
 }
+
+// SearchSystemRoleList 角色列表
+func SearchSystemRoleList(c *gin.Context) {
+	var req operationPb.SearchRoleRequest
+	if err := c.BindJSON(&req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	req.Pagination = &operationPb.PaginationModel{
+		Page:       int32(c.GetInt(middleware.Page)),
+		PageSize:   int32(c.GetInt(middleware.PageSize)),
+		PageOffset: int32(c.GetInt(middleware.PageOffset)),
+	}
+
+	res, err := middleware.Dependency(c).StoreEventHub.OpsService.SearchSystemRoleList(c, &req)
+	if err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, apiok.CommonResponse(res))
+}

+ 2 - 3
http/handler/system/user.go

@@ -5,7 +5,6 @@ import (
 	"kpt-tmr-group/pkg/apierr"
 	"kpt-tmr-group/pkg/apiok"
 	"kpt-tmr-group/pkg/valid"
-	commonPb "kpt-tmr-group/proto/go/backend/common"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
 	"net/http"
 	"strconv"
@@ -95,13 +94,13 @@ func SearchSystemUserList(c *gin.Context) {
 		return
 	}
 
-	pagination := &commonPb.PaginationModel{
+	req.Pagination = &operationPb.PaginationModel{
 		Page:       int32(c.GetInt(middleware.Page)),
 		PageSize:   int32(c.GetInt(middleware.PageSize)),
 		PageOffset: int32(c.GetInt(middleware.PageOffset)),
 	}
 
-	res, err := middleware.Dependency(c).StoreEventHub.OpsService.SearchSystemUserList(c, &req, pagination)
+	res, err := middleware.Dependency(c).StoreEventHub.OpsService.SearchSystemUserList(c, &req)
 	if err != nil {
 		apierr.ClassifiedAbort(c, err)
 		return

+ 3 - 0
http/route/app_api.go

@@ -31,6 +31,9 @@ func AppAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 		lingoRoute.DELETE("/user/:user_id", system.DeleteUser)
 
 		lingoRoute.POST("/role/add", system.AddSystemRole)
+		lingoRoute.POST("/role/edit", system.EditSystemRole)
+		lingoRoute.DELETE("/role/:role_id", system.DeleteSystemRole)
+		lingoRoute.POST("/role/list", system.SearchSystemRoleList)
 
 		// 牧场管理
 		lingoRoute.POST("/pasture/add", pasture.AddSystemPasture)

+ 91 - 12
model/system_role.go

@@ -1,30 +1,109 @@
 package model
 
 import (
+	"fmt"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
+	"strings"
+	"time"
 )
 
 type SystemRole struct {
-	Id          int64                   `json:"id,omitempty"`
-	Name        string                  `json:"name,omitempty"`
-	Remarks     string                  `json:"remarks,omitempty"`
-	IsShow      operationPb.IsShow_Kind `json:"is_show,omitempty"`
-	PastureId   int64                   `json:"pasture_id"`
-	PastureName string                  `json:"pasture_name"`
-	CreateUser  string                  `json:"create_user,omitempty"`
-	CreatedAt   int64                   `json:"created_at,omitempty"`
-	UpdatedAt   int64                   `json:"updated_at,omitempty"`
+	Id         int64                   `json:"id,omitempty"`
+	Name       string                  `json:"name,omitempty"`
+	Remarks    string                  `json:"remarks,omitempty"`
+	MenuId     string                  `json:"menu_id"`
+	MobileId   string                  `json:"mobile_id"`
+	PastureId  string                  `json:"pasture_id"`
+	IsShow     operationPb.IsShow_Kind `json:"is_show,omitempty"`
+	CreateUser string                  `json:"create_user,omitempty"`
+	CreatedAt  int64                   `json:"created_at,omitempty"`
+	UpdatedAt  int64                   `json:"updated_at,omitempty"`
 }
 
 func (s *SystemRole) TableName() string {
 	return "system_role"
 }
 
+const LayoutTime = "2006-01-02 15:04:05"
+
 func NewSystemRole(req *operationPb.AddRoleRequest) *SystemRole {
 	systemRole := &SystemRole{
-		Name:    req.Name,
-		Remarks: req.Remarks,
-		IsShow:  operationPb.IsShow_OK,
+		Name:       req.Name,
+		Remarks:    req.Remarks,
+		IsShow:     operationPb.IsShow_OK,
+		CreateUser: req.CreateUser,
 	}
+
+	systemRole.RolePermissionsFormat(req)
 	return systemRole
 }
+
+func (r *SystemRole) RolePermissionsFormat(req *operationPb.AddRoleRequest) {
+	pastureId := ""
+	for _, v := range req.PastureId {
+		pastureId += fmt.Sprintf("%d,", v)
+	}
+
+	menuId := ""
+	for _, v := range req.MenuId {
+		menuId += fmt.Sprintf("%d,", v)
+	}
+	mobileId := ""
+	for _, v := range req.MobileId {
+		mobileId += fmt.Sprintf("%d", v)
+	}
+
+	if pastureId != "" {
+		r.PastureId = strings.TrimRight(pastureId, ",")
+	}
+
+	if mobileId != "" {
+		r.MobileId = strings.TrimRight(mobileId, ",")
+	}
+
+	if menuId != "" {
+		r.MenuId = strings.TrimRight(menuId, ",")
+	}
+}
+
+type SystemRoleSlice []*SystemRole
+
+func (s SystemRoleSlice) ToPB() []*operationPb.AddRoleRequest {
+	res := make([]*operationPb.AddRoleRequest, len(s))
+	for i, v := range s {
+		res[i] = &operationPb.AddRoleRequest{
+			Id:             v.Id,
+			Name:           v.Name,
+			Remarks:        v.Remarks,
+			CreateUser:     v.CreateUser,
+			IsShow:         v.IsShow,
+			CreatedAt:      v.CreatedAt,
+			CratedAtFormat: time.Unix(v.CreatedAt, 0).Format(LayoutTime),
+		}
+	}
+	return res
+}
+
+func (s *SystemRole) ToPb() *operationPb.AddRoleRequest {
+	return &operationPb.AddRoleRequest{
+		Id:         s.Id,
+		Name:       s.Name,
+		CreateUser: s.CreateUser,
+		IsShow:     s.IsShow,
+		CreatedAt:  s.CreatedAt,
+	}
+}
+
+type SystemRoleResponse struct {
+	Page  int32                         `json:"page"`
+	Total int32                         `json:"total"`
+	List  []*operationPb.AddRoleRequest `json:"list"`
+}
+
+func (s *SystemRoleResponse) ToPB() *operationPb.SearchRoleResponse {
+	return &operationPb.SearchRoleResponse{
+		Page:  s.Page,
+		Total: s.Total,
+		List:  s.List,
+	}
+}

+ 9 - 7
model/system_user.go

@@ -2,6 +2,7 @@ package model
 
 import (
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
+	"time"
 )
 
 type SystemUser struct {
@@ -45,13 +46,14 @@ func (s SystemUserSlice) ToPB() []*operationPb.AddSystemUser {
 	res := make([]*operationPb.AddSystemUser, len(s))
 	for i, v := range s {
 		res[i] = &operationPb.AddSystemUser{
-			Id:           v.Id,
-			Name:         v.Name,
-			Phone:        v.Phone,
-			EmployeeName: v.EmployeeName,
-			CreateUser:   v.CreateUser,
-			IsShow:       v.IsShow,
-			CreatedAt:    v.CreatedAt,
+			Id:             v.Id,
+			Name:           v.Name,
+			Phone:          v.Phone,
+			EmployeeName:   v.EmployeeName,
+			CreateUser:     v.CreateUser,
+			IsShow:         v.IsShow,
+			CreatedAt:      v.CreatedAt,
+			CratedAtFormat: time.Unix(v.CreatedAt, 0).Format(LayoutTime),
 		}
 	}
 	return res

+ 9 - 4
module/backend/interface.go

@@ -5,7 +5,6 @@ import (
 	"kpt-tmr-group/config"
 	"kpt-tmr-group/model"
 	"kpt-tmr-group/pkg/di"
-	commonPb "kpt-tmr-group/proto/go/backend/common"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
 	"kpt-tmr-group/store/kptstore"
 
@@ -39,7 +38,6 @@ type KptService interface {
 }
 
 type Operation interface {
-	CreateSystemRole(ctx context.Context, req *operationPb.AddRoleRequest) error
 
 	// CreatePasture 牧场管理相关
 	CreatePasture(ctx context.Context, req *operationPb.AddPastureRequest) error
@@ -47,12 +45,19 @@ type Operation interface {
 }
 
 type SystemOperation interface {
+
+	// Auth 系统用户相关
 	Auth(ctx context.Context, auth *operationPb.UserAuth) (*operationPb.SystemToken, error)
 	GetUserInfo(ctx context.Context, token string) (*operationPb.UserAuth, error)
-
 	CreateSystemUser(ctx context.Context, req *operationPb.AddSystemUser) error
-	SearchSystemUserList(ctx context.Context, req *operationPb.SearchUserRequest, pagination *commonPb.PaginationModel) (*model.SystemUserResponse, error)
+	SearchSystemUserList(ctx context.Context, req *operationPb.SearchUserRequest) (*model.SystemUserResponse, error)
 	EditSystemUser(ctx context.Context, req *operationPb.AddSystemUser) error
 	DeleteSystemUser(ctx context.Context, userId int64) error
 	IsShowSystemUser(ctx context.Context, req *operationPb.EditIsShowSystemUserRequest) error
+
+	// CreateSystemRole 系统角色相关
+	CreateSystemRole(ctx context.Context, req *operationPb.AddRoleRequest) error
+	EditSystemRole(ctx context.Context, req *operationPb.AddRoleRequest) error
+	DeleteSystemRole(ctx context.Context, roleId int64) error
+	SearchSystemRoleList(ctx context.Context, req *operationPb.SearchRoleRequest) (*model.SystemRoleResponse, error)
 }

+ 67 - 7
module/backend/system_service.go

@@ -9,7 +9,6 @@ import (
 	"kpt-tmr-group/pkg/jwt"
 	"kpt-tmr-group/pkg/tool"
 	"kpt-tmr-group/pkg/xerr"
-	commonPb "kpt-tmr-group/proto/go/backend/common"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
 	"strconv"
 	"strings"
@@ -95,7 +94,7 @@ func (s *StoreEntry) CreateSystemUser(ctx context.Context, req *operationPb.AddS
 }
 
 // SearchSystemUserList 查询系统用户
-func (s *StoreEntry) SearchSystemUserList(ctx context.Context, req *operationPb.SearchUserRequest, pagination *commonPb.PaginationModel) (*model.SystemUserResponse, error) {
+func (s *StoreEntry) SearchSystemUserList(ctx context.Context, req *operationPb.SearchUserRequest) (*model.SystemUserResponse, error) {
 	systemUser := make([]*model.SystemUser, 0)
 	var count int64 = 0
 
@@ -111,13 +110,13 @@ func (s *StoreEntry) SearchSystemUserList(ctx context.Context, req *operationPb.
 		pref.Where("is_show = ?", req.IsShow)
 	}
 
-	if err := pref.Order("id desc").Count(&count).Limit(int(pagination.PageSize)).Offset(int(pagination.PageOffset)).
+	if err := pref.Order("id desc").Count(&count).Limit(int(req.Pagination.PageSize)).Offset(int(req.Pagination.PageOffset)).
 		Find(&systemUser).Debug().Error; err != nil {
 		return nil, xerr.WithStack(err)
 	}
 
 	return &model.SystemUserResponse{
-		Page:  pagination.Page,
+		Page:  req.Pagination.Page,
 		Total: int32(count),
 		List:  model.SystemUserSlice(systemUser).ToPB(),
 	}, nil
@@ -195,14 +194,75 @@ func (s *StoreEntry) IsShowSystemUser(ctx context.Context, req *operationPb.Edit
 // CreateSystemRole 添加角色
 func (s *StoreEntry) CreateSystemRole(ctx context.Context, req *operationPb.AddRoleRequest) error {
 	role := model.NewSystemRole(req)
-	if err := s.DB.Create(role).Error; err != nil {
+	if err := s.DB.Create(role).Debug().Error; err != nil {
 		return xerr.WithStack(err)
 	}
 	return nil
 }
 
-// SearchSystemRoleList 查询角色列表
-func (s *StoreEntry) SearchSystemRoleList(ctx context.Context, req []*operationPb.AddRoleRequest) error {
+// EditSystemRole 编辑角色
+func (s *StoreEntry) EditSystemRole(ctx context.Context, req *operationPb.AddRoleRequest) error {
+	role := &model.SystemRole{Id: req.Id}
+	if err := s.DB.First(role).Error; err != nil {
+		if errors.Is(err, gorm.ErrRecordNotFound) {
+			return xerr.Custom("该数据不存在")
+		}
+		return xerr.WithStack(err)
+	}
+
+	updateSystemUser := &model.SystemRole{
+		Id:         req.Id,
+		Name:       req.Name,
+		Remarks:    req.Remarks,
+		CreateUser: req.CreateUser,
+	}
+	updateSystemUser.RolePermissionsFormat(req)
+
+	if err := s.DB.Omit("is_show").
+		Where("id = ?", role.Id).
+		Updates(updateSystemUser).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+
+	return nil
+}
+
+// DeleteSystemRole 删除系统角色
+func (s *StoreEntry) DeleteSystemRole(ctx context.Context, roleId int64) error {
+	systemRole := &model.SystemRole{
+		Id: roleId,
+	}
+	if err := s.DB.First(systemRole).Error; err != nil {
+		if errors.Is(err, gorm.ErrRecordNotFound) {
+			return xerr.Custom("该数据不存在")
+		}
+		return xerr.WithStack(err)
+	}
 
+	if err := s.DB.Model(systemRole).Update("is_show", operationPb.IsShow_NO).Error; err != nil {
+		return xerr.WithStack(err)
+	}
 	return nil
 }
+
+// SearchSystemRoleList 查询系统角色
+func (s *StoreEntry) SearchSystemRoleList(ctx context.Context, req *operationPb.SearchRoleRequest) (*model.SystemRoleResponse, error) {
+	systemRole := make([]*model.SystemRole, 0)
+	var count int64 = 0
+
+	pref := s.DB.Model(new(model.SystemRole)).Where("is_show = ?", operationPb.IsShow_OK)
+	if req.Name != "" {
+		pref.Where("name like ?", fmt.Sprintf("%s%s%s", "%", req.Name, "%"))
+	}
+
+	if err := pref.Order("id desc").Count(&count).Limit(int(req.Pagination.PageSize)).Offset(int(req.Pagination.PageOffset)).
+		Find(&systemRole).Debug().Error; err != nil {
+		return nil, xerr.WithStack(err)
+	}
+
+	return &model.SystemRoleResponse{
+		Page:  req.Pagination.Page,
+		Total: int32(count),
+		List:  model.SystemRoleSlice(systemRole).ToPB(),
+	}, nil
+}

+ 0 - 163
proto/go/backend/common/pagination.pb.go

@@ -1,163 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// 	protoc-gen-go v1.28.1
-// 	protoc        v3.21.9
-// source: backend/common/pagination.proto
-
-package commonPb
-
-import (
-	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
-)
-
-const (
-	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type PaginationModel struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Page       int32 `protobuf:"varint,1,opt,name=Page,proto3" json:"Page,omitempty"`
-	PageSize   int32 `protobuf:"varint,2,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
-	PageOffset int32 `protobuf:"varint,3,opt,name=PageOffset,proto3" json:"PageOffset,omitempty"`
-}
-
-func (x *PaginationModel) Reset() {
-	*x = PaginationModel{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_backend_common_pagination_proto_msgTypes[0]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *PaginationModel) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*PaginationModel) ProtoMessage() {}
-
-func (x *PaginationModel) ProtoReflect() protoreflect.Message {
-	mi := &file_backend_common_pagination_proto_msgTypes[0]
-	if protoimpl.UnsafeEnabled && x != nil {
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		if ms.LoadMessageInfo() == nil {
-			ms.StoreMessageInfo(mi)
-		}
-		return ms
-	}
-	return mi.MessageOf(x)
-}
-
-// Deprecated: Use PaginationModel.ProtoReflect.Descriptor instead.
-func (*PaginationModel) Descriptor() ([]byte, []int) {
-	return file_backend_common_pagination_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *PaginationModel) GetPage() int32 {
-	if x != nil {
-		return x.Page
-	}
-	return 0
-}
-
-func (x *PaginationModel) GetPageSize() int32 {
-	if x != nil {
-		return x.PageSize
-	}
-	return 0
-}
-
-func (x *PaginationModel) GetPageOffset() int32 {
-	if x != nil {
-		return x.PageOffset
-	}
-	return 0
-}
-
-var File_backend_common_pagination_proto protoreflect.FileDescriptor
-
-var file_backend_common_pagination_proto_rawDesc = []byte{
-	0x0a, 0x1f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
-	0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x12, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x22, 0x61, 0x0a, 0x0f, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
-	0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x05, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65,
-	0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65,
-	0x53, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x65, 0x4f, 0x66, 0x66, 0x73,
-	0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x65, 0x4f, 0x66,
-	0x66, 0x73, 0x65, 0x74, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
-	0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
-	file_backend_common_pagination_proto_rawDescOnce sync.Once
-	file_backend_common_pagination_proto_rawDescData = file_backend_common_pagination_proto_rawDesc
-)
-
-func file_backend_common_pagination_proto_rawDescGZIP() []byte {
-	file_backend_common_pagination_proto_rawDescOnce.Do(func() {
-		file_backend_common_pagination_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_common_pagination_proto_rawDescData)
-	})
-	return file_backend_common_pagination_proto_rawDescData
-}
-
-var file_backend_common_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_backend_common_pagination_proto_goTypes = []interface{}{
-	(*PaginationModel)(nil), // 0: backend.common.PaginationModel
-}
-var file_backend_common_pagination_proto_depIdxs = []int32{
-	0, // [0:0] is the sub-list for method output_type
-	0, // [0:0] is the sub-list for method input_type
-	0, // [0:0] is the sub-list for extension type_name
-	0, // [0:0] is the sub-list for extension extendee
-	0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_backend_common_pagination_proto_init() }
-func file_backend_common_pagination_proto_init() {
-	if File_backend_common_pagination_proto != nil {
-		return
-	}
-	if !protoimpl.UnsafeEnabled {
-		file_backend_common_pagination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*PaginationModel); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-	}
-	type x struct{}
-	out := protoimpl.TypeBuilder{
-		File: protoimpl.DescBuilder{
-			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
-			RawDescriptor: file_backend_common_pagination_proto_rawDesc,
-			NumEnums:      0,
-			NumMessages:   1,
-			NumExtensions: 0,
-			NumServices:   0,
-		},
-		GoTypes:           file_backend_common_pagination_proto_goTypes,
-		DependencyIndexes: file_backend_common_pagination_proto_depIdxs,
-		MessageInfos:      file_backend_common_pagination_proto_msgTypes,
-	}.Build()
-	File_backend_common_pagination_proto = out.File
-	file_backend_common_pagination_proto_rawDesc = nil
-	file_backend_common_pagination_proto_goTypes = nil
-	file_backend_common_pagination_proto_depIdxs = nil
-}

+ 164 - 0
proto/go/backend/operation/pagination.pb.go

@@ -0,0 +1,164 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.21.9
+// source: backend/operation/pagination.proto
+
+package operationPb
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PaginationModel struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Page       int32 `protobuf:"varint,1,opt,name=Page,proto3" json:"Page,omitempty"`
+	PageSize   int32 `protobuf:"varint,2,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
+	PageOffset int32 `protobuf:"varint,3,opt,name=PageOffset,proto3" json:"PageOffset,omitempty"`
+}
+
+func (x *PaginationModel) Reset() {
+	*x = PaginationModel{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_pagination_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PaginationModel) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PaginationModel) ProtoMessage() {}
+
+func (x *PaginationModel) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_pagination_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use PaginationModel.ProtoReflect.Descriptor instead.
+func (*PaginationModel) Descriptor() ([]byte, []int) {
+	return file_backend_operation_pagination_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PaginationModel) GetPage() int32 {
+	if x != nil {
+		return x.Page
+	}
+	return 0
+}
+
+func (x *PaginationModel) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+func (x *PaginationModel) GetPageOffset() int32 {
+	if x != nil {
+		return x.PageOffset
+	}
+	return 0
+}
+
+var File_backend_operation_pagination_proto protoreflect.FileDescriptor
+
+var file_backend_operation_pagination_proto_rawDesc = []byte{
+	0x0a, 0x22, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70,
+	0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x0f, 0x50, 0x61, 0x67, 0x69, 0x6e,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61,
+	0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x1a,
+	0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
+	0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61,
+	0x67, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
+	0x50, 0x61, 0x67, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b,
+	0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x33,
+}
+
+var (
+	file_backend_operation_pagination_proto_rawDescOnce sync.Once
+	file_backend_operation_pagination_proto_rawDescData = file_backend_operation_pagination_proto_rawDesc
+)
+
+func file_backend_operation_pagination_proto_rawDescGZIP() []byte {
+	file_backend_operation_pagination_proto_rawDescOnce.Do(func() {
+		file_backend_operation_pagination_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_operation_pagination_proto_rawDescData)
+	})
+	return file_backend_operation_pagination_proto_rawDescData
+}
+
+var file_backend_operation_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_backend_operation_pagination_proto_goTypes = []interface{}{
+	(*PaginationModel)(nil), // 0: backend.operation.PaginationModel
+}
+var file_backend_operation_pagination_proto_depIdxs = []int32{
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_backend_operation_pagination_proto_init() }
+func file_backend_operation_pagination_proto_init() {
+	if File_backend_operation_pagination_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_backend_operation_pagination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PaginationModel); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_backend_operation_pagination_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   1,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_backend_operation_pagination_proto_goTypes,
+		DependencyIndexes: file_backend_operation_pagination_proto_depIdxs,
+		MessageInfos:      file_backend_operation_pagination_proto_msgTypes,
+	}.Build()
+	File_backend_operation_pagination_proto = out.File
+	file_backend_operation_pagination_proto_rawDesc = nil
+	file_backend_operation_pagination_proto_goTypes = nil
+	file_backend_operation_pagination_proto_depIdxs = nil
+}

+ 213 - 113
proto/go/backend/operation/system.pb.go

@@ -26,10 +26,16 @@ type AddRoleRequest struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id      int64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	Name    string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                   // 角色名称
-	Remarks string  `protobuf:"bytes,3,opt,name=remarks,proto3" json:"remarks,omitempty"`             // 角色备注
-	IsShow  *IsShow `protobuf:"bytes,4,opt,name=is_show,json=isShow,proto3" json:"is_show,omitempty"` // 是否启用
+	Id             int64       `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	Name           string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                                       // 角色名称
+	Remarks        string      `protobuf:"bytes,3,opt,name=remarks,proto3" json:"remarks,omitempty"`                                                 // 角色备注
+	IsShow         IsShow_Kind `protobuf:"varint,4,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // 是否启用
+	PastureId      []int64     `protobuf:"varint,5,rep,packed,name=pasture_id,json=pastureId,proto3" json:"pasture_id,omitempty"`                    // 牧场id
+	MenuId         []int64     `protobuf:"varint,6,rep,packed,name=menu_id,json=menuId,proto3" json:"menu_id,omitempty"`                             // 菜单id
+	MobileId       []int64     `protobuf:"varint,7,rep,packed,name=mobile_id,json=mobileId,proto3" json:"mobile_id,omitempty"`                       // 移动端id
+	CreateUser     string      `protobuf:"bytes,8,opt,name=create_user,json=createUser,proto3" json:"create_user,omitempty"`                         // 创建用户
+	CreatedAt      int64       `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`                           // 创建时间
+	CratedAtFormat string      `protobuf:"bytes,10,opt,name=crated_at_format,json=cratedAtFormat,proto3" json:"crated_at_format,omitempty"`          // 创建时间格式化
 }
 
 func (x *AddRoleRequest) Reset() {
@@ -85,19 +91,62 @@ func (x *AddRoleRequest) GetRemarks() string {
 	return ""
 }
 
-func (x *AddRoleRequest) GetIsShow() *IsShow {
+func (x *AddRoleRequest) GetIsShow() IsShow_Kind {
 	if x != nil {
 		return x.IsShow
 	}
+	return IsShow_INVALID
+}
+
+func (x *AddRoleRequest) GetPastureId() []int64 {
+	if x != nil {
+		return x.PastureId
+	}
+	return nil
+}
+
+func (x *AddRoleRequest) GetMenuId() []int64 {
+	if x != nil {
+		return x.MenuId
+	}
+	return nil
+}
+
+func (x *AddRoleRequest) GetMobileId() []int64 {
+	if x != nil {
+		return x.MobileId
+	}
 	return nil
 }
 
+func (x *AddRoleRequest) GetCreateUser() string {
+	if x != nil {
+		return x.CreateUser
+	}
+	return ""
+}
+
+func (x *AddRoleRequest) GetCreatedAt() int64 {
+	if x != nil {
+		return x.CreatedAt
+	}
+	return 0
+}
+
+func (x *AddRoleRequest) GetCratedAtFormat() string {
+	if x != nil {
+		return x.CratedAtFormat
+	}
+	return ""
+}
+
 type SearchRoleRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 角色名称
+	Name       string           `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`             // 角色名称
+	Pagination *PaginationModel `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // 分页
 }
 
 func (x *SearchRoleRequest) Reset() {
@@ -139,6 +188,13 @@ func (x *SearchRoleRequest) GetName() string {
 	return ""
 }
 
+func (x *SearchRoleRequest) GetPagination() *PaginationModel {
+	if x != nil {
+		return x.Pagination
+	}
+	return nil
+}
+
 type SearchRoleResponse struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -445,14 +501,15 @@ type AddSystemUser struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id           int64       `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                                          // 用户id
-	Name         string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                                       // 用户名称
-	Phone        string      `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`                                                     // 用户手机号
-	Roles        []*UserRole `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"`                                                     // 角色
-	IsShow       IsShow_Kind `protobuf:"varint,5,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // 是否开启
-	EmployeeName string      `protobuf:"bytes,6,opt,name=employee_name,json=employeeName,proto3" json:"employee_name,omitempty"`                   // 员工姓名
-	CreateUser   string      `protobuf:"bytes,7,opt,name=create_user,json=createUser,proto3" json:"create_user,omitempty"`                         // 创建人
-	CreatedAt    int64       `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`                           // 创建时间
+	Id             int64       `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                                          // 用户id
+	Name           string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                                       // 用户名称
+	Phone          string      `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`                                                     // 用户手机号
+	Roles          []*UserRole `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"`                                                     // 角色
+	IsShow         IsShow_Kind `protobuf:"varint,5,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // 是否开启
+	EmployeeName   string      `protobuf:"bytes,6,opt,name=employee_name,json=employeeName,proto3" json:"employee_name,omitempty"`                   // 员工姓名
+	CreateUser     string      `protobuf:"bytes,7,opt,name=create_user,json=createUser,proto3" json:"create_user,omitempty"`                         // 创建人
+	CreatedAt      int64       `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`                           // 创建时间
+	CratedAtFormat string      `protobuf:"bytes,9,opt,name=crated_at_format,json=cratedAtFormat,proto3" json:"crated_at_format,omitempty"`           // 创建时间格式化
 }
 
 func (x *AddSystemUser) Reset() {
@@ -543,17 +600,25 @@ func (x *AddSystemUser) GetCreatedAt() int64 {
 	return 0
 }
 
+func (x *AddSystemUser) GetCratedAtFormat() string {
+	if x != nil {
+		return x.CratedAtFormat
+	}
+	return ""
+}
+
 // 查询用户
 type SearchUserRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Name             string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                                                       // 用户名称
-	EmployeeName     string      `protobuf:"bytes,2,opt,name=employee_name,json=employeeName,proto3" json:"employee_name,omitempty"`                   // 员工姓名
-	IsShow           IsShow_Kind `protobuf:"varint,3,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // 是否启用
-	CreatedStartTime int64       `protobuf:"varint,4,opt,name=created_start_time,json=createdStartTime,proto3" json:"created_start_time,omitempty"`    // 开始时间
-	CreatedEndTime   int64       `protobuf:"varint,5,opt,name=created_end_time,json=createdEndTime,proto3" json:"created_end_time,omitempty"`          // 结束时间
+	Name             string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                                                       // 用户名称
+	EmployeeName     string           `protobuf:"bytes,2,opt,name=employee_name,json=employeeName,proto3" json:"employee_name,omitempty"`                   // 员工姓名
+	IsShow           IsShow_Kind      `protobuf:"varint,3,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // 是否启用
+	CreatedStartTime int64            `protobuf:"varint,4,opt,name=created_start_time,json=createdStartTime,proto3" json:"created_start_time,omitempty"`    // 开始时间
+	CreatedEndTime   int64            `protobuf:"varint,5,opt,name=created_end_time,json=createdEndTime,proto3" json:"created_end_time,omitempty"`          // 结束时间
+	Pagination       *PaginationModel `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination,omitempty"`                                           // 分页
 }
 
 func (x *SearchUserRequest) Reset() {
@@ -623,6 +688,13 @@ func (x *SearchUserRequest) GetCreatedEndTime() int64 {
 	return 0
 }
 
+func (x *SearchUserRequest) GetPagination() *PaginationModel {
+	if x != nil {
+		return x.Pagination
+	}
+	return nil
+}
+
 type SearchUserResponse struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -749,93 +821,118 @@ var file_backend_operation_system_proto_rawDesc = []byte{
 	0x12, 0x11, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
 	0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x6f, 0x70, 0x65,
 	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x22, 0x82, 0x01, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71,
+	0x6f, 0x1a, 0x22, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x02, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c,
+	0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07,
+	0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72,
+	0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f,
+	0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e,
+	0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68,
+	0x6f, 0x77, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x12,
+	0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20,
+	0x03, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x12, 0x17,
+	0x0a, 0x07, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52,
+	0x06, 0x6d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x6f, 0x62, 0x69, 0x6c,
+	0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x6f, 0x62, 0x69,
+	0x6c, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x75,
+	0x73, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
+	0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
+	0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
+	0x65, 0x64, 0x41, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61,
+	0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
+	0x63, 0x72, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x6b,
+	0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x61,
+	0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+	0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52,
+	0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x12, 0x53,
+	0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
+	0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x04, 0x6c,
+	0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x61, 0x63, 0x6b,
+	0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64,
+	0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69,
+	0x73, 0x74, 0x22, 0x34, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6e, 0x75, 0x52, 0x65, 0x71,
 	0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
 	0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x61,
-	0x72, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x61, 0x72,
-	0x6b, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x04, 0x20,
-	0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70,
-	0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x06,
-	0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x22, 0x27, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
-	0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
-	0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
-	0x75, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73,
-	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74,
-	0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12,
-	0x35, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e,
-	0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
-	0x6e, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6e,
-	0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a, 0x0b,
-	0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74,
-	0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65,
-	0x6e, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1b,
-	0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
-	0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
-	0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
+	0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x79, 0x73, 0x74,
+	0x65, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb1, 0x01,
+	0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73,
+	0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75,
+	0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
+	0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
+	0x6f, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x72, 0x6f, 0x6c,
+	0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65,
+	0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65,
+	0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d,
+	0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x4e, 0x61, 0x6d,
+	0x65, 0x22, 0x2e, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a,
+	0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
+	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+	0x65, 0x22, 0xc4, 0x02, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55,
+	0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
 	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x31, 0x0a,
 	0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62,
 	0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
 	0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73,
-	0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
-	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65,
-	0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c,
-	0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
-	0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9a, 0x02, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x53, 0x79, 0x73,
-	0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70,
-	0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e,
-	0x65, 0x12, 0x31, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
-	0x32, 0x1b, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61,
-	0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72,
-	0x6f, 0x6c, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18,
-	0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e,
-	0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77,
-	0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x23, 0x0a,
-	0x0d, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x4e, 0x61,
-	0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65,
-	0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,
-	0x73, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61,
-	0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
-	0x41, 0x74, 0x22, 0xdd, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65,
-	0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d,
-	0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x4e, 0x61, 0x6d,
-	0x65, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65,
-	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x2e, 0x4b, 0x69,
-	0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x72,
-	0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65,
-	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53,
-	0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61,
-	0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x54, 0x69,
-	0x6d, 0x65, 0x22, 0x74, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72,
-	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05,
-	0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74,
-	0x61, 0x6c, 0x12, 0x34, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
-	0x32, 0x20, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61,
-	0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73,
-	0x65, 0x72, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x1b, 0x45, 0x64, 0x69, 0x74,
-	0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
-	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28,
 	0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72,
 	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x2e, 0x4b, 0x69, 0x6e,
-	0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f,
-	0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x33,
+	0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70,
+	0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f,
+	0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12,
+	0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x28,
+	0x0a, 0x10, 0x63, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d,
+	0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x61, 0x74, 0x65, 0x64,
+	0x41, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa1, 0x02, 0x0a, 0x11, 0x53, 0x65, 0x61,
+	0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
+	0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+	0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e,
+	0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f,
+	0x79, 0x65, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68,
+	0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65,
+	0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53,
+	0x68, 0x6f, 0x77, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77,
+	0x12, 0x2c, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72,
+	0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x72,
+	0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28,
+	0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69,
+	0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x64, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69,
+	0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62,
+	0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+	0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
+	0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x0a, 0x12,
+	0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+	0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+	0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x34, 0x0a, 0x04,
+	0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x63,
+	0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41,
+	0x64, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x6c, 0x69,
+	0x73, 0x74, 0x22, 0x6f, 0x0a, 0x1b, 0x45, 0x64, 0x69, 0x74, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77,
+	0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73,
+	0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61,
+	0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+	0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53,
+	0x68, 0x6f, 0x77, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+	0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -863,23 +960,25 @@ var file_backend_operation_system_proto_goTypes = []interface{}{
 	(*SearchUserRequest)(nil),           // 8: backend.operation.SearchUserRequest
 	(*SearchUserResponse)(nil),          // 9: backend.operation.SearchUserResponse
 	(*EditIsShowSystemUserRequest)(nil), // 10: backend.operation.EditIsShowSystemUserRequest
-	(*IsShow)(nil),                      // 11: backend.operation.IsShow
-	(IsShow_Kind)(0),                    // 12: backend.operation.IsShow.Kind
+	(IsShow_Kind)(0),                    // 11: backend.operation.IsShow.Kind
+	(*PaginationModel)(nil),             // 12: backend.operation.PaginationModel
 }
 var file_backend_operation_system_proto_depIdxs = []int32{
-	11, // 0: backend.operation.AddRoleRequest.is_show:type_name -> backend.operation.IsShow
-	0,  // 1: backend.operation.SearchRoleResponse.list:type_name -> backend.operation.AddRoleRequest
-	6,  // 2: backend.operation.UserAuth.roles:type_name -> backend.operation.UserRole
-	6,  // 3: backend.operation.AddSystemUser.roles:type_name -> backend.operation.UserRole
-	12, // 4: backend.operation.AddSystemUser.is_show:type_name -> backend.operation.IsShow.Kind
-	12, // 5: backend.operation.SearchUserRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	7,  // 6: backend.operation.SearchUserResponse.list:type_name -> backend.operation.AddSystemUser
-	12, // 7: backend.operation.EditIsShowSystemUserRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	8,  // [8:8] is the sub-list for method output_type
-	8,  // [8:8] is the sub-list for method input_type
-	8,  // [8:8] is the sub-list for extension type_name
-	8,  // [8:8] is the sub-list for extension extendee
-	0,  // [0:8] is the sub-list for field type_name
+	11, // 0: backend.operation.AddRoleRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	12, // 1: backend.operation.SearchRoleRequest.pagination:type_name -> backend.operation.PaginationModel
+	0,  // 2: backend.operation.SearchRoleResponse.list:type_name -> backend.operation.AddRoleRequest
+	6,  // 3: backend.operation.UserAuth.roles:type_name -> backend.operation.UserRole
+	6,  // 4: backend.operation.AddSystemUser.roles:type_name -> backend.operation.UserRole
+	11, // 5: backend.operation.AddSystemUser.is_show:type_name -> backend.operation.IsShow.Kind
+	11, // 6: backend.operation.SearchUserRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	12, // 7: backend.operation.SearchUserRequest.pagination:type_name -> backend.operation.PaginationModel
+	7,  // 8: backend.operation.SearchUserResponse.list:type_name -> backend.operation.AddSystemUser
+	11, // 9: backend.operation.EditIsShowSystemUserRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	10, // [10:10] is the sub-list for method output_type
+	10, // [10:10] is the sub-list for method input_type
+	10, // [10:10] is the sub-list for extension type_name
+	10, // [10:10] is the sub-list for extension extendee
+	0,  // [0:10] is the sub-list for field type_name
 }
 
 func init() { file_backend_operation_system_proto_init() }
@@ -888,6 +987,7 @@ func file_backend_operation_system_proto_init() {
 		return
 	}
 	file_backend_operation_enum_proto_init()
+	file_backend_operation_pagination_proto_init()
 	if !protoimpl.UnsafeEnabled {
 		file_backend_operation_system_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*AddRoleRequest); i {