package org.jeecg.modules.performance.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

@Data
@TableName("ctop_performance_quarter")
public class PerformanceQuarter {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 用户姓名
     */
    private String userName;
    /**
     * 公司ID
     */
    private String companyId;
    /**
     * 公司名称
     */
    private String companyName;
    /**
     * 公司名称
     */
    private String department;
    /**
     * 职位code
     */
    private String roleCode;
    /**
     * 职位名称
     */
    private String roleName;
    /**
     * 负责人
     */
    private String leader;
    /**
     * 用户id
     */
    private Integer year;
    /**
     * 季度
     */
    private String quarter;
    /**
     * 消耗
     */
    private BigDecimal cost;
    /**
     * 绩效
     */
    private BigDecimal performance;
    /**
     * 提成点
     */
    private BigDecimal point;
    /**
     * 额外提成
     */
    private BigDecimal additionalFees;
    /**
     * 原因
     */
    private String reason;
    /**
     * 媒体类型
     */
    private Integer mediaType;
    /**
     * createTime
     */
    private Date createTime;
    /**
     * updateTime
     */
    private Date updateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        PerformanceQuarter that = (PerformanceQuarter) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(userName, that.userName) &&
                Objects.equals(companyId, that.companyId) &&
                Objects.equals(companyName, that.companyName) &&
                Objects.equals(roleCode, that.roleCode) &&
                Objects.equals(roleName, that.roleName) &&
                Objects.equals(leader, that.leader) &&
                Objects.equals(year, that.year) &&
                Objects.equals(quarter, that.quarter) &&
                Objects.equals(cost, that.cost) &&
                Objects.equals(performance, that.performance) &&
                Objects.equals(point, that.point) &&
                Objects.equals(additionalFees, that.additionalFees) &&
                Objects.equals(reason, that.reason) &&
                Objects.equals(mediaType, that.mediaType) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userId, userName, companyId, companyName, roleCode, roleName, leader, year, quarter, cost, performance, point, additionalFees, reason, mediaType, createTime, updateTime);
    }

    @Override
    public String toString() {
        return "PerformanceQuarter{" +
                "id=" + id +
                ", userId='" + userId + '\'' +
                ", userName='" + userName + '\'' +
                ", companyId='" + companyId + '\'' +
                ", companyName='" + companyName + '\'' +
                ", roleCode='" + roleCode + '\'' +
                ", roleName='" + roleName + '\'' +
                ", leader='" + leader + '\'' +
                ", year=" + year +
                ", quarter='" + quarter + '\'' +
                ", cost=" + cost +
                ", performance=" + performance +
                ", point=" + point +
                ", additionalFees=" + additionalFees +
                ", reason='" + reason + '\'' +
                ", mediaType=" + mediaType +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
