package com.ssm.manage.entity;

import java.io.Serializable;
import javax.persistence.*;

@Table(name = "sys_power")
public class SysPower implements Serializable {
    /**
     * 权限编码
     */
    @Id
    @Column(name = "power_id")
    private String powerId;

    /**
     * 权限名称
     */
    @Column(name = "power_name")
    private String powerName;

    private static final long serialVersionUID = 1L;

    /**
     * 获取权限编码
     *
     * @return power_id - 权限编码
     */
    public String getPowerId() {
        return powerId;
    }

    /**
     * 设置权限编码
     *
     * @param powerId 权限编码
     */
    public void setPowerId(String powerId) {
        this.powerId = powerId;
    }

    /**
     * 获取权限名称
     *
     * @return power_name - 权限名称
     */
    public String getPowerName() {
        return powerName;
    }

    /**
     * 设置权限名称
     *
     * @param powerName 权限名称
     */
    public void setPowerName(String powerName) {
        this.powerName = powerName;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysPower other = (SysPower) that;
        return (this.getPowerId() == null ? other.getPowerId() == null : this.getPowerId().equals(other.getPowerId()))
            && (this.getPowerName() == null ? other.getPowerName() == null : this.getPowerName().equals(other.getPowerName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPowerId() == null) ? 0 : getPowerId().hashCode());
        result = prime * result + ((getPowerName() == null) ? 0 : getPowerName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", powerId=").append(powerId);
        sb.append(", powerName=").append(powerName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}