package system

// CreateAuthorityRequest 创建角色请求
type CreateAuthorityRequest struct {
	AuthorityId   uint   `json:"authorityId" binding:"required"`
	AuthorityName string `json:"authorityName" binding:"required"`
	ParentId      *uint  `json:"parentId"`
	DefaultRouter string `json:"defaultRouter"`
}

// UpdateAuthorityRequest 更新角色请求
type UpdateAuthorityRequest struct {
	AuthorityId   uint   `json:"authorityId" binding:"required"`
	AuthorityName string `json:"authorityName"`
	ParentId      *uint  `json:"parentId"`
	DefaultRouter string `json:"defaultRouter"`
}

// DeleteAuthorityRequest 删除角色请求
type DeleteAuthorityRequest struct {
	AuthorityId uint `json:"authorityId" binding:"required"`
}

// CopyAuthorityRequest 复制角色请求
type CopyAuthorityRequest struct {
	OldAuthorityId uint          `json:"oldAuthorityId" binding:"required"`
	Authority      AuthorityInfo `json:"authority" binding:"required"`
}

// SetDataAuthorityRequest 设置数据权限请求
type SetDataAuthorityRequest struct {
	AuthorityId     uint            `json:"authorityId" binding:"required"`
	DataAuthorityId []AuthorityInfo `json:"dataAuthorityId"`
}

// GetAuthorityListRequest 获取角色列表请求
type GetAuthorityListRequest struct {
	Page     int `json:"page" form:"page"`
	PageSize int `json:"pageSize" form:"pageSize"`
}

// GetAuthorityListReply 获取角色列表响应
type GetAuthorityListReply struct {
	List     []AuthorityInfo `json:"list"`
	Total    int64           `json:"total"`
	Page     int             `json:"page"`
	PageSize int             `json:"pageSize"`
}

// AuthorityResponse 角色响应
type AuthorityResponse struct {
	Authority AuthorityInfo `json:"authority"`
}

// AuthorityCopyResponse 复制角色响应
type AuthorityCopyResponse struct {
	Authority      AuthorityInfo `json:"authority"`
	OldAuthorityId uint          `json:"oldAuthorityId"`
}
