package cn.datax.service.system.api.dto;

import cn.datax.common.validate.ValidateGroupForSave;
import cn.datax.common.validate.ValidateGroupForUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel(value = "资源Model")
@Data
public class MenuDto implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键ID")
    @NotBlank(message = "主键ID不能为空", groups = {ValidateGroupForUpdate.class})
    private String id;

    @ApiModelProperty(value = "父资源ID")
    @NotBlank(message = "父资源ID不能为空", groups = {ValidateGroupForSave.class, ValidateGroupForUpdate.class})
    private String parentId;

    @ApiModelProperty(value = "资源名称")
    @NotBlank(message = "资源名称不能为空", groups = {ValidateGroupForSave.class, ValidateGroupForUpdate.class})
    private String menuName;

    @ApiModelProperty(value = "对应路由path")
    private String menuPath;

    @ApiModelProperty(value = "对应路由组件component")
    private String menuComponent;

    @ApiModelProperty(value = "权限标识")
    private String menuPerms;

    @ApiModelProperty(value = "图标")
    private String menuIcon;

    @ApiModelProperty(value = "类型")
    @NotNull(message = "类型不能为空", groups = {ValidateGroupForSave.class, ValidateGroupForUpdate.class})
    private Integer menuType;

    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序不能为空", groups = {ValidateGroupForSave.class, ValidateGroupForUpdate.class})
    private Integer menuSort;
}
