package com.xinyilu.system.domain.testBodyScoreInfo;

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;

/**
 * @author ljh
 * @version 1.0
 * Create by 2022/8/9 13:47
 * 身体素质测试
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "个人成绩录入管理对象", description = "test_item_score")
public class TestBodyScoreInfo extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -5593372862483815535L;
    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = {Update.class})
    private Long id;

    /**
     * 班级表id
     */
    @ApiModelProperty(value = "班级表id")
    @Excel(name = "班级表id")
    @NotNull(message = "班级表id不能位空", groups = {Insert.class, Update.class})
    private Long classId;

    /**
     * 学生表id
     */
    @ApiModelProperty(value = "学生表id")
    @Excel(name = "学生表id")
    @NotNull(message = "学生表id不能位空", groups = {Insert.class, Update.class})
    private Long studentId;

    /**
     * 测试项目表id
     */
    @ApiModelProperty(value = "测试项目表id")
    @Excel(name = "测试项目表id")
    @NotNull(message = "区域表id不能位空", groups = {Insert.class, Update.class})
    private Long testItemId;

    /**
     * 用户表id
     */
    @ApiModelProperty(value = "用户表id")
    @Excel(name = "用户表id")
    @NotNull(message = "用户表id不能为空", groups = {Insert.class, Update.class})
    private Long userId;

    /**
     * 组织表id
     */
    @ApiModelProperty(value = "组织表id")
    @Excel(name = "组织表id")
    @NotNull(message = "所属组织不能为空", groups = {Insert.class, Update.class})
    private Long organizeId;

    /**
     * 成绩描述类型字典表id
     */
    @ApiModelProperty(value = "成绩描述类型字典表id")
    @Excel(name = "成绩描述类型字典表id")
    @NotNull(message = "区域表id不能位空", groups = {Insert.class, Update.class})
    private Long scoreDictId;

    /**
     * 测试成绩文本
     */
    @ApiModelProperty(value = "测试成绩文本")
    @Excel(name = "测试成绩文本")
    @NotBlank(message = "批次名称不能为空", groups = {Insert.class, Update.class})
    private String scoreDictValue;

    /**
     * 测试批次编号
     */
    @ApiModelProperty(value = "测试批次编号")
    @Excel(name = "测试批次编号")
    @NotBlank(message = "批次名称不能为空", groups = {Insert.class, Update.class})
    private String batchCode;


    /**
     * 测试成绩数值
     */
    @ApiModelProperty(value = "测试成绩数值")
    @Excel(name = "测试成绩数值")
    @Size(min = 0, message = "测试成绩数值不能为负值")
    private BigDecimal itemScore;

    /**
     * 综合评价
     */
    @ApiModelProperty(value = "综合评价")
    @Excel(name = "综合评价")
    @NotBlank(message = "批次名称不能为空", groups = {Insert.class, Update.class})
    private String syntheticalAssess;

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


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("classId", getClassId())
                .append("studentId", getStudentId())
                .append("testItemId", getTestItemId())
                .append("scoreDictId", getScoreDictId())
                .append("scoreDictValue", getScoreDictValue())
                .append("batchCode", getBatchCode())
                .append("itemScore", getItemScore())
                .append("syntheticalAssess", getSyntheticalAssess())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }

}
