package com.example.demo.model;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 权限实体。
 */
@Schema(description = "权限实体")
public class Permission {

    @Schema(description = "权限ID")
    private Long id;

    @Schema(description = "权限名称")
    private String permissionName;

    @Schema(description = "权限标识")
    private String permissionCode;

    @Schema(description = "类型：menu-菜单，button-按钮")
    private String type;

    @Schema(description = "父ID")
    private Long parentId;

    public Permission() {
    }

    public Permission(Long id, String permissionName, String permissionCode, String type, Long parentId) {
        this.id = id;
        this.permissionName = permissionName;
        this.permissionCode = permissionCode;
        this.type = type;
        this.parentId = parentId;
    }

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getPermissionName() { return permissionName; }
    public void setPermissionName(String permissionName) { this.permissionName = permissionName; }
    public String getPermissionCode() { return permissionCode; }
    public void setPermissionCode(String permissionCode) { this.permissionCode = permissionCode; }
    public String getType() { return type; }
    public void setType(String type) { this.type = type; }
    public Long getParentId() { return parentId; }
    public void setParentId(Long parentId) { this.parentId = parentId; }
}
