package com.hs.admin.model.reqmodel;

import com.hs.admin.model.SysMenu;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

public class MenuReq {
    public static class GetMenuReq {
        @ApiModelProperty(value = "菜单名称")
        private String menuName;

        public String getMenuName() {
            return menuName;
        }

        public void setMenuName(String menuName) {
            this.menuName = menuName;
        }

        @Override
        public String toString() {
            return "GetMenuReq{" +
                    "menuName='" + menuName + '\'' +
                    '}';
        }
    }

    public static class InfoMenuReq {
        @ApiModelProperty(value = "菜单ID", required = true)
        @NotNull(message = "菜单ID 参数必传")
        private Integer menuId;

        public Integer getMenuId() {
            return menuId;
        }

        public void setMenuId(Integer menuId) {
            this.menuId = menuId;
        }

        @Override
        public String toString() {
            return "InfoMenuReq{" +
                    "menuId=" + menuId +
                    '}';
        }
    }

    public static class AddMenuReq {
        @ApiModelProperty(value = "菜单名称", required = true)
        @NotBlank(message = "菜单名称 参数必传")
        private String menuName;

        @ApiModelProperty(value = "菜单路径", required = true)
        private String menuUrl;

        @ApiModelProperty(value = "菜单图片", required = true)
        private String menuImage;

        @ApiModelProperty(value = "父级关系", required = true)
        @NotNull(message = "父级关系 参数必传")
        private Long parentId;

        @ApiModelProperty(value = "页面编码", required = true)
        private String pageCode;

        public String getMenuName() {
            return menuName;
        }

        public void setMenuName(String menuName) {
            this.menuName = menuName;
        }

        public String getMenuUrl() {
            return menuUrl;
        }

        public void setMenuUrl(String menuUrl) {
            this.menuUrl = menuUrl;
        }

        public String getMenuImage() {
            return menuImage;
        }

        public void setMenuImage(String menuImage) {
            this.menuImage = menuImage;
        }

        public Long getParentId() {
            return parentId;
        }

        public void setParentId(Long parentId) {
            this.parentId = parentId;
        }

        public String getPageCode() {
            return pageCode;
        }

        public void setPageCode(String pageCode) {
            this.pageCode = pageCode;
        }

        @Override
        public String toString() {
            return "AddMenuReq{" +
                    "menuName='" + menuName + '\'' +
                    ", menuUrl='" + menuUrl + '\'' +
                    ", menuImage='" + menuImage + '\'' +
                    ", parentId=" + parentId +
                    ", pageCode='" + pageCode + '\'' +
                    '}';
        }
    }

    public static class DeleteMenuReq {
        @ApiModelProperty(value = "菜单ID", required = true)
        @NotNull(message = "菜单ID 参数必传")
        private Integer menuId;

        public Integer getMenuId() {
            return menuId;
        }

        public void setMenuId(Integer menuId) {
            this.menuId = menuId;
        }

        @Override
        public String toString() {
            return "InfoMenuReq{" +
                    "menuId=" + menuId +
                    '}';
        }
    }

    public static class UpdateMenuReq {
        @ApiModelProperty(value = "菜单ID", required = true)
        @NotNull(message = "菜单ID 参数必传")
        private Integer menuId;

        @ApiModelProperty(value = "菜单名称", required = true)
        @NotBlank(message = "菜单名称 参数必传")
        private String menuName;

        @ApiModelProperty(value = "菜单路径", required = true)
        private String menuUrl;

        @ApiModelProperty(value = "菜单图片", required = true)
        private String menuImage;

        @ApiModelProperty(value = "父级关系", required = true)
        @NotNull(message = "父级关系 参数必传")
        private Long parentId;

        @ApiModelProperty(value = "页面编码", required = true)
        private String pageCode;

        public Integer getMenuId() {
            return menuId;
        }

        public void setMenuId(Integer menuId) {
            this.menuId = menuId;
        }

        public String getMenuName() {
            return menuName;
        }

        public void setMenuName(String menuName) {
            this.menuName = menuName;
        }

        public String getMenuUrl() {
            return menuUrl;
        }

        public void setMenuUrl(String menuUrl) {
            this.menuUrl = menuUrl;
        }

        public String getMenuImage() {
            return menuImage;
        }

        public void setMenuImage(String menuImage) {
            this.menuImage = menuImage;
        }

        public Long getParentId() {
            return parentId;
        }

        public void setParentId(Long parentId) {
            this.parentId = parentId;
        }

        public String getPageCode() {
            return pageCode;
        }

        public void setPageCode(String pageCode) {
            this.pageCode = pageCode;
        }

        @Override
        public String toString() {
            return "UpdateMenuReq{" +
                    "menuId=" + menuId +
                    ", menuName='" + menuName + '\'' +
                    ", menuUrl='" + menuUrl + '\'' +
                    ", menuImage='" + menuImage + '\'' +
                    ", parentId=" + parentId +
                    ", pageCode='" + pageCode + '\'' +
                    '}';
        }
    }

    /**
     * 保存用户菜单入参
     */
    public static class SaveUserMenuReq {
        @ApiModelProperty(value = "用户ID", required = true)
        @NotNull(message = "用户ID 参数必传")
        private Long userId;

        @ApiModelProperty(value = "菜单ID集合", required = true)
        @NotNull(message = "菜单ID集合 参数必传")
        private List<Long> menus;

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public List<Long> getMenus() {
            return menus;
        }

        public void setMenus(List<Long> menus) {
            this.menus = menus;
        }

        @Override
        public String toString() {
            return "SelectUserMenuReq{" +
                    "userId=" + userId +
                    ", menus=" + menus +
                    '}';
        }
    }

    /**
     * 查询用户菜单入参
     */
    public static class GetUserMenuReq {
        @ApiModelProperty(value = "用户ID", required = true)
        @NotNull(message = "用户ID 参数必传")
        private Integer userId;

        public Integer getUserId() {
            return userId;
        }

        public void setUserId(Integer userId) {
            this.userId = userId;
        }

        @Override
        public String toString() {
            return "GetUserMenuReq{" +
                    "userId=" + userId +
                    '}';
        }
    }

    /**
     * 保存角色菜单入参
     */
    public static class SaveRoleMenuReq {
        @ApiModelProperty(value = "角色ID", required = true)
        @NotNull(message = "角色ID 参数必传")
        private Long roleId;

        @ApiModelProperty(value = "菜单ID集合", required = true)
        @NotNull(message = "菜单ID集合 参数必传")
        private List<Long> menus;

        public Long getRoleId() {
            return roleId;
        }

        public void setRoleId(Long roleId) {
            this.roleId = roleId;
        }

        public List<Long> getMenus() {
            return menus;
        }

        public void setMenus(List<Long> menus) {
            this.menus = menus;
        }
    }

    /**
     * 查询角色菜单入参
     */
    public static class GetRoleMenuReq {
        @ApiModelProperty(value = "角色ID", required = true)
        @NotNull(message = "角色ID 参数必传")
        private Integer roleId;

        public Integer getRoleId() {
            return roleId;
        }

        public void setRoleId(Integer roleId) {
            this.roleId = roleId;
        }
    }

    /**
     * 修改菜单排序入参
     */
    public static class UpdateSortReq {
        @ApiModelProperty(value = "菜单列表", required = true)
        @NotNull(message = "菜单列表 参数必传")
        private List<SysMenu> menus;

        public List<SysMenu> getMenus() {
            return menus;
        }

        public void setMenus(List<SysMenu> menus) {
            this.menus = menus;
        }

        @Override
        public String toString() {
            return "UpdateSortReq{" +
                    "menus=" + menus +
                    '}';
        }
    }
}
