package com.qmth.teachcloud.common.bean.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.enums.PrivilegeEnum;
import com.qmth.teachcloud.common.enums.RoleTypeEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @Description: 权限临时dto
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/3/27
 */
public class PrivilegeCacheDto implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "角色id")
    Long id;

    @ApiModelProperty(value = "角色名称")
    String name;

    @ApiModelProperty(value = "角色类别")
    RoleTypeEnum type;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "权限id")
    Long privilegeId;

    @ApiModelProperty(value = "权限名称")
    String privilegeName;

    @ApiModelProperty(value = "权限地址")
    String url;

    @ApiModelProperty(value = "权限类别")
    PrivilegeEnum privilegeType;

    @ApiModelProperty(value = "父id")
    @JsonSerialize(using = ToStringSerializer.class)
    Long parentId;

    @ApiModelProperty(value = "序号")
    Integer sequence;

    @ApiModelProperty(value = "是否启用，false：停用，true：启用")
    Boolean enable;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public RoleTypeEnum getType() {
        return type;
    }

    public void setType(RoleTypeEnum type) {
        this.type = type;
    }

    public Long getPrivilegeId() {
        return privilegeId;
    }

    public void setPrivilegeId(Long privilegeId) {
        this.privilegeId = privilegeId;
    }

    public String getPrivilegeName() {
        return privilegeName;
    }

    public void setPrivilegeName(String privilegeName) {
        this.privilegeName = privilegeName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public PrivilegeEnum getPrivilegeType() {
        return privilegeType;
    }

    public void setPrivilegeType(PrivilegeEnum privilegeType) {
        this.privilegeType = privilegeType;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }
}