package com.securitycontrol.entity.system.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

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


/**
 * @author：cwchen
 * @date：2024-02-26-17:58
 * @version：1.0
 * @description：菜单-vo
 */
@Data
public class MenuVo {

    @ApiModelProperty(value = "菜单ID")
    private Integer menuId;

    @ApiModelProperty(value = "菜单名称")
    @NotBlank(message = "菜单名称不能为空")
    @Length(max = 50,message = "菜单名称字符长度不能超过50个字符")
    private String menuName;

    @ApiModelProperty(value = "菜单路径")
    @Length(max = 100,message = "菜单路径字符长度不能超过100个字符")
    private String menuUrl;

    @ApiModelProperty(value = "菜单类型")
    private Integer menuType;

    @ApiModelProperty(value = "权限")
    @Length(max = 50,message = "权限字符长度不能超过50个字符")
    private String menuAuth;

    @ApiModelProperty(value = "父ID")
    private Integer parentId;

    @ApiModelProperty(value = "菜单排序")
    @NotNull(message = "请输入菜单排序")
    @Range(message = "菜单排序为 {min} 到 {max} 之间", min = 1, max = 1000)
    private Integer menuSort;

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

    @ApiModelProperty(value = "创建时间")
    private String createTime;

    @ApiModelProperty(value = "flag")
    private boolean flag;

    @ApiModelProperty(value = "类型")
    private int type;

    @ApiModelProperty(value = "子节点")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<MenuVo> children;
}
