package com.xinyilu.system.domain.personalcheckreport;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinyilu.common.annotation.Excel;
import com.xinyilu.common.core.domain.BaseEntity;
import com.xinyilu.common.custominterface.Update;
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 javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 个人体质检测报告对象 personal_check_report
 *
 * @author xinyilu
 * @date 2022-09-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "个人体质检测报告对象", description = "personal_check_report")
public class PersonalCheckReport extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @NotNull(message = "id不能为空！", groups = {Update.class})
    private Long id;

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

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

    /**
     * 报告编号
     */
    @ApiModelProperty(value = "报告编号")
    @Excel(name = "报告编号")
    private String reportCode;

    /**
     * 报告名称
     */
    @ApiModelProperty(value = "报告名称")
    @Excel(name = "报告名称")
    private String reportName;

    /**
     * 综合评估
     */
    @ApiModelProperty(value = "综合评估")
    @Excel(name = "综合评估")
    private String syntheticalAssess;

    /**
     * 身体素质分析项说明
     */
    @ApiModelProperty(value = "身体素质分析项说明")
    @Excel(name = "身体素质分析项说明")
    private String physicalAnalysisExplain;

    /**
     * 不合格项分析说明
     */
    @ApiModelProperty(value = "不合格项分析说明")
    @Excel(name = "不合格项分析说明")
    private String unqualifyItemExplain;

    /**
     * 检测报告下载地址
     */
    @ApiModelProperty(value = "检测报告下载地址")
    @Excel(name = "检测报告下载地址")
    private String downloadAddress;

    /**
     * 处方建议
     */
    @ApiModelProperty(value = "处方建议")
    @Excel(name = "处方建议")
    private String prescriptionAdvice;

    /**
     * 运动处方库表id，多个用逗号隔开
     */
    @ApiModelProperty(value = "运动处方库表id，多个用逗号隔开")
    @Excel(name = "运动处方库表id，多个用逗号隔开")
    private String motionLibraryId;

    /**
     * 审核人
     */
    @ApiModelProperty(value = "审核人")
    @Excel(name = "审核人")
    private Long checkUserId;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkTime;

    /**
     * 0：未审核，1：已审核
     */
    @ApiModelProperty(value = "0：未审核，1：已审核")
    @Excel(name = "0：未审核，1：已审核")
    @NotNull(message = "审核状态不能为空", groups = {Update.class})
    private Integer checkStatus;

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


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("studentId", getStudentId())
                .append("batchCode", getBatchCode())
                .append("reportCode", getReportCode())
                .append("reportName", getReportName())
                .append("syntheticalAssess", getSyntheticalAssess())
                .append("physicalAnalysisExplain", getPhysicalAnalysisExplain())
                .append("unqualifyItemExplain", getUnqualifyItemExplain())
                .append("downloadAddress", getDownloadAddress())
                .append("prescriptionAdvice", getPrescriptionAdvice())
                .append("motionLibraryId", getMotionLibraryId())
                .append("checkUserId", getCheckUserId())
                .append("checkTime", getCheckTime())
                .append("checkStatus", getCheckStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
