package com.zhentao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 首页金刚区功能表
 * @TableName home_function_grid
 */
@TableName(value ="home_function_grid")
@Data
public class HomeFunctionGrid {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 功能名称
     */
    private String name;

    /**
     * 图标（emoji）
     */
    private String icon;

    /**
     * 跳转路径
     */
    private String path;

    /**
     * 背景颜色
     */
    private String bgColor;

    /**
     * 图标颜色
     */
    private String iconColor;

    /**
     * 渐变背景
     */
    private String gradient;

    /**
     * 是否需要登录：0-不需要 1-需要
     */
    private Integer needLogin;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 状态：0-禁用 1-启用
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HomeFunctionGrid other = (HomeFunctionGrid) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getIcon() == null ? other.getIcon() == null : this.getIcon().equals(other.getIcon()))
            && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
            && (this.getBgColor() == null ? other.getBgColor() == null : this.getBgColor().equals(other.getBgColor()))
            && (this.getIconColor() == null ? other.getIconColor() == null : this.getIconColor().equals(other.getIconColor()))
            && (this.getGradient() == null ? other.getGradient() == null : this.getGradient().equals(other.getGradient()))
            && (this.getNeedLogin() == null ? other.getNeedLogin() == null : this.getNeedLogin().equals(other.getNeedLogin()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
        result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
        result = prime * result + ((getBgColor() == null) ? 0 : getBgColor().hashCode());
        result = prime * result + ((getIconColor() == null) ? 0 : getIconColor().hashCode());
        result = prime * result + ((getGradient() == null) ? 0 : getGradient().hashCode());
        result = prime * result + ((getNeedLogin() == null) ? 0 : getNeedLogin().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", icon=").append(icon);
        sb.append(", path=").append(path);
        sb.append(", bgColor=").append(bgColor);
        sb.append(", iconColor=").append(iconColor);
        sb.append(", gradient=").append(gradient);
        sb.append(", needLogin=").append(needLogin);
        sb.append(", sort=").append(sort);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}