package com.xinyilu.system.domain.testItemCountryScoreinfo;

import java.io.Serializable;
import java.math.BigDecimal;

import com.xinyilu.common.custominterface.Insert;
import com.xinyilu.common.custominterface.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xinyilu.common.annotation.Excel;
import com.xinyilu.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 全国平均成绩对象 test_item_country_score
 *
 * @author xinyilu
 * @date 2022-08-03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "全国平均成绩对象", description = "test_item_country_score")
public class TestItemCountryScore extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -3064366727796575681L;
    /**
     * 主键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 itemId;

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

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    @Excel(name = "性别")
    @NotBlank(message = "性别不能为空", groups = {Insert.class, Update.class})
    private String sex;


    /**
     * 测试项目平均成绩描述
     */
    @ApiModelProperty(value = "测试项目平均成绩描述")
    @Excel(name = "测试项目平均成绩描述")
    private String itemAvgText;

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

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("itemId", getItemId())
                .append("itemAvgScore", getItemAvgScore())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("sex", getSex())
                .toString();
    }
}
