package com.zcxk.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@ApiModel(value="功能权限")
@Data
public class Permission {

    @ApiModelProperty(value="id",position = 1)
    private Integer id;

    @ApiModelProperty(value="父类id,最上层值为0",position = 2)
    private Integer parentId;
    @JsonIgnore
    @ApiModelProperty(value="数据权限类型")
    private Integer permissionType;

    @ApiModelProperty(value="产品分类id",position = 3)
    private Integer productCategoryId;

    @ApiModelProperty(value="名称",position = 4)
    private String name;

    @ApiModelProperty(value="别名",position = 5)
    private String alias;

    @ApiModelProperty(value="权限code",position = 6)
    private String permission;

    @ApiModelProperty(value="非选中图标",position = 7)
    private String icon;

    @ApiModelProperty(value="选中图标",position = 8)
    private String overIcon;

    @ApiModelProperty(value="路径",position = 9)
    private String path;

    @ApiModelProperty(value="排序",position = 10)
    private Integer sort;

    @ApiModelProperty(value="是否是菜单",position = 11)
    private Boolean isMenu;

    @ApiModelProperty(value="角色id",position = 12)
    private Integer roleId;
    @ApiModelProperty(value="角色状态",position = 13)
    private Integer roleState;

    @JsonIgnore
    @ApiModelProperty(value="状态",hidden = true)
    private Boolean status;

    @JsonIgnore
    @ApiModelProperty(value="创建时间",hidden = true)
    private LocalDateTime createDate;

    @JsonIgnore
    @ApiModelProperty(value="创建人",hidden = true)
    private String createBy;

    @JsonIgnore
    @ApiModelProperty(value="更新时间",hidden = true)
    private LocalDateTime updateDate;

    @JsonIgnore
    @ApiModelProperty(value="更新人",hidden = true)
    private String updateBy;

    @ApiModelProperty(value = "父节点id集合", position = 100)
    private List<Integer> collections;

    @ApiModelProperty(value = "子集",position = 101)
    private List<Permission> children;

    @ApiModelProperty(value = "权限",position = 102)
    private List<Permission> permissionList;
}