package com.gxwebsoft.common.system.param;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 菜单查询参数
 *
 * @author WebSoft
 * @since 2021-08-29 19:36:10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "菜单查询参数")
public class MenuParam extends BaseParam {
    private static final long serialVersionUID = 1L;

    @Schema(description = "菜单id")
    @QueryField(type = QueryType.EQ)
    private Integer menuId;

    @Schema(description = "上级id, 0是顶级")
    @QueryField(type = QueryType.EQ)
    private Integer parentId;

    @Schema(description = "菜单名称")
    private String title;

    @Schema(description = "菜单路由关键字")
    private String path;

    @Schema(description = "菜单组件地址")
    private String component;

    @Schema(description = "模块ID")
    private String modules;

    @Schema(description = "菜单类型, 0菜单, 1按钮")
    @QueryField(type = QueryType.EQ)
    private Integer menuType;

    @Schema(description = "打开方式, 0当前页, 1新窗口")
    @TableField(exist = false)
    private Integer openType;

    @Schema(description = "权限标识")
    private String authority;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "关联应用")
    private Integer appId;

    @Schema(description = "是否隐藏, 0否, 1是(仅注册路由不显示左侧菜单)")
    @QueryField(type = QueryType.EQ)
    private Integer hide;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户ID")
    @QueryField(type = QueryType.EQ)
    private Integer tenantId;

    @Schema(description = "企业ID")
    @QueryField(type = QueryType.EQ)
    private Integer companyId;

    @Schema(description = "租户名称")
    @TableField(exist = false)
    private String tenantName;

}
