package com.xinyilu.system.domain.checkReportFailInfo;

import com.xinyilu.common.annotation.Excel;
import com.xinyilu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Objects;

/**
 * 个人报告和幼儿园报告审核失败信息记录对象 check_report_fail_info
 *
 * @author xinyilu
 * @date 2023-07-31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "个人报告和幼儿园报告审核失败信息记录对象", description = "check_report_fail_info")
public class CheckReportFailInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 幼儿园表id
     */
    @ApiModelProperty(value = "幼儿园表id")
    @Excel(name = "幼儿园表id")
    private Long kindergartenId;

    /**
     * 班级id
     */
    @ApiModelProperty(value = "班级id")
    @Excel(name = "班级id")
    private Long classId;

    /**
     * 学生id
     */
    @ApiModelProperty(value = "学生id")
    @Excel(name = "学生id")
    private Long studentId;

    /**
     * 学生姓名
     */
    @ApiModelProperty(value = "学生姓名")
    @Excel(name = "学生姓名")
    private String studentName;

    /**
     * 批次编号
     */
    @ApiModelProperty(value = "批次编号")
    @Excel(name = "批次编号")
    private String batchCode;

    /**
     * 批次名称
     */
    @ApiModelProperty(value = "批次名称")
    @Excel(name = "批次名称")
    private String batchName;

    /**
     * 审核报告类型，PERSONAL：个人，KINDERGARTEN：幼儿园
     */
    @ApiModelProperty(value = "审核报告类型，PERSONAL：个人，KINDERGARTEN：幼儿园")
    @Excel(name = "审核报告类型，PERSONAL：个人，KINDERGARTEN：幼儿园")
    private String checkReportType;

    /**
     * 是否删除，0：否，1：是
     */
    private Integer delFlag;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("kindergartenId", getKindergartenId())
                .append("classId", getClassId())
                .append("studentId", getStudentId())
                .append("studentName", getStudentName())
                .append("batchCode", getBatchCode())
                .append("batchName", getBatchName())
                .append("checkReportType", getCheckReportType())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        CheckReportFailInfo that = (CheckReportFailInfo) o;
        return batchCode.equals(that.batchCode) && Objects.equals(studentId, that.studentId) && Objects.equals(kindergartenId, that.kindergartenId);
    }

    @Override
    public int hashCode() {
        return Objects.hash( batchCode, studentId, kindergartenId);
    }

}
