package com.xinyilu.system.domain.testLevel;

import com.xinyilu.common.annotation.Excel;
import com.xinyilu.common.core.domain.BaseEntity;
import com.xinyilu.common.custominterface.Insert;
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.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 测试项目级别对象 test_item_level
 *
 * @author jihan
 * @date 2022-08-03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "测试项目级别对象", description = "test_item_level")
public class TestItemLevel extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -4592881159673113990L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 测试项目表id
     */
    @ApiModelProperty(value = "测试项目表id")
    private Long itemId;

    /**
     * 测试项目分类表id
     */
    @ApiModelProperty(value = "测试项目分类表id")
    private Long itemCategoryId;

    /**
     * 级别名称
     */
    @ApiModelProperty(value = "级别名称")
    private String levelName;

    /**
     * 级别最小分
     */
    @ApiModelProperty(value = "级别成绩最低分")
    @Size(message = "级别成绩最低得分最小值为0")
    private BigDecimal levelMinScore;

    /**
     * 级别最高得分
     */
    @ApiModelProperty(value = "级别成绩最高得分")
    @Size(message = "级别成绩最高得分最小值为0")
    private BigDecimal levelMaxScore;

    /**
     * 成绩是否合格
     */
    @ApiModelProperty(value = "成绩是否达标")
    @Excel(name = "成绩是否达标")
    private Integer standardFlag;

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


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("itemId", getItemId())
                .append("levelName", getLevelName())
                .append("levelMinScore", getLevelMinScore())
                .append("levelMaxScore", getLevelMaxScore())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("standardFlag", getStandardFlag())
                .toString();
    }
}
