package com.xinyilu.system.domain.testItem;

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 java.io.Serializable;
import java.math.BigDecimal;

/**
 * 测试项目对象 test_items
 *
 * @author xinyilu
 * @date 2022-08-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "测试项目对象", description = "test_items")
public class TestItems extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 7379481526981893587L;
    /**
     * 主键id
     */
    @NotNull(message = "id不能为空", groups = {Update.class})
    private Long id;

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

    /**
     * 所属字典类型
     */
    @ApiModelProperty(value = "所属字典类型")
    @NotNull(message = "项目类型不能为空", groups = {Insert.class, Update.class})
    private Long resultDictType;

    /**
     * 项目名称
     */
    @ApiModelProperty(value = "项目名称")
    @NotBlank(message = "项目名称不能为空", groups = {Insert.class, Update.class})
    private String itemName;

    /**
     * 测试项目编号
     */
    @ApiModelProperty(value = "测试项目编号")
    @NotBlank(message = "项目编号不能为空", groups = {Insert.class, Update.class})
    private String itemCode;

    /**
     * 项目内容
     */
    @ApiModelProperty(value = "项目内容")
    @NotBlank(message = "项目内容不能为空", groups = {Insert.class, Update.class})
    private String itemContent;

    /**
     * 项目度量单位
     */
    @ApiModelProperty(value = "项目度量单位")
    @NotBlank(message = "度量单位不能为空", groups = {Insert.class, Update.class})
    private String measureUnit;

    /**
     * 大班标准最高得分
     */
    @ApiModelProperty(value = "大班标准最高得分")
    private BigDecimal largeStandardScore;

    /**
     * 中班标准最高得分
     */
    @ApiModelProperty(value = "中班标准最高得分")
    private BigDecimal middleStandardScore;

    /**
     * 小班标准最高得分
     */
    @ApiModelProperty(value = "小班标准最高得分")
    private BigDecimal smallStandardScore;

    /**
     * 统一标准最高得分
     */
    @ApiModelProperty(value = "统一标准最高得分")
    private BigDecimal unifiedStandardScore;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序不能为空", groups = {Insert.class, Update.class})
    private Integer sorting;

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


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("itemCategoryId", getItemCategoryId())
                .append("resultDictType", getResultDictType())
                .append("itemName", getItemName())
                .append("itemCode", getItemCode())
                .append("itemContent", getItemContent())
                .append("measureUnit", getMeasureUnit())
                .append("largeStandardScore", getLargeStandardScore())
                .append("middleStandardScore", getMiddleStandardScore())
                .append("smallStandardScore", getSmallStandardScore())
                .append("unifiedStandardScore", getUnifiedStandardScore())
                .append("sorting", getSorting())
                .append("remark", getRemark())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
