package cn.wisenergy.model.app;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="WorkLevel", description="权限实体类")
public class WorkLevel implements Comparable<WorkLevel>{

    @ApiModelProperty(name = "id",value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(name = "name",value = "权限名")
    private String name;

    @ApiModelProperty(name = "rank",value = "权限等级->1:项目级 2:部门级 3:中心级")
    private Integer rank;

    @ApiModelProperty(name = "icon",value = "图标")
    private String icon;

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

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


    @Override
    public int compareTo(WorkLevel o) {
        return this.sort-o.sort;
    }
}
