package cn.cecep.talroad.domain;

import cn.cecep.talroad.common.core.annotation.Excel;
import cn.cecep.talroad.common.core.web.domain.BaseEntity;
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 com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 企业风险评估对象 b_enterprise_risk_assessment_last
 *
 * @author szhpt
 * @date 2023-03-29*/
@ApiModel(value = "企业风险评估")
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("b_enterprise_risk_assessment_last")
public class BEnterpriseRiskAssessmentLast extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "风险评估主键")
    /** 风险评估主键 */
    @TableId(value = "risk_id",type = IdType.AUTO)
    private Long riskId;

    @ApiModelProperty(value = "企业id")
    /** 企业id */
    @Excel(name = "企业id")
    private String factoryId;

    @ApiModelProperty(value = "业务ID")
    /**  业务ID */
    private String businessId;

    @ApiModelProperty(value = "当前存在问题")
    /** 当前存在问题 */
    @Excel(name = "当前存在问题")
    private String problemExist;

    @ApiModelProperty(value = "数量")
    /** 数量 */
    @Excel(name = "数量")
    private Integer problemNumber;

    @ApiModelProperty(value = "扣分")
    /** 扣分 */
    @Excel(name = "扣分")
    private Integer score;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "是否多次扣分,0-不多次扣分，1-多次扣分")
    private Integer isRepeatedGrade;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("riskId", getRiskId())
            .append("factoryId", getFactoryId())
            .append("problemExist", getProblemExist())
            .append("problemNumber", getProblemNumber())
            .append("score", getScore())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("isRepeatedGrade", getIsRepeatedGrade())
            .append("businessId", getBusinessId())
            .toString();
    }
}
