package com.microservices.system.api.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.microservices.common.core.enums.SystemRole;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 角色表 sys_role
 *
 * @author microservices
 */
@Data
public class SimpleSysRole implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 角色ID
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @ApiModelProperty(value = "角色ID")
    private Long roleId;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称")
    private String roleName;

    /**
     * 角色标识
     */
    @ApiModelProperty(value = "角色标识")
    private String roleKey;

    public SimpleSysRole() {
    }

    public SimpleSysRole(SystemRole systemRole) {
        this.roleName = systemRole.getRoleName();
        this.roleKey = systemRole.getRoleKey();
    }
}
