package top.imwork.commons.core.pojo;

import java.io.Serializable;
import java.util.Objects;

/**
 * Copyright (C), 2015-2025
 * FileName: BaseMenu
 * Author<作者姓名>:   silos
 * CreateTime<创建时间>:   2025/11/1 10:46
 * UpdateTime<修改时间>:   2025/11/1 10:46
 * Description〈功能简述〉: 菜单节点类
 * History<历史描述>:
 * Since<版本号>: 1.0.0
 */
public class BaseMenu implements Serializable {
    private Long id;
    private Long pId;
    private String title;
    private String icon;
    private String href;

    @Override
    public String toString() {
        return "BaseMenu{" +
                "id=" + id +
                ", pId=" + pId +
                ", title='" + title + '\'' +
                ", icon='" + icon + '\'' +
                ", href='" + href + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof BaseMenu baseMenu)) return false;
        return Objects.equals(id, baseMenu.id) && Objects.equals(pId, baseMenu.pId) && Objects.equals(title, baseMenu.title) && Objects.equals(icon, baseMenu.icon) && Objects.equals(href, baseMenu.href);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, pId, title, icon, href);
    }

    public Long getId() {
        return id;
    }

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

    public Long getpId() {
        return pId;
    }

    public void setpId(Long pId) {
        this.pId = pId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }
}