package com.xinyilu.system.domain.testScoreBatchinfo;

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

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

    /**
     * 批次编号
     */
    @ApiModelProperty(value = "批次编号")
    @Excel(name = "批次编号")
    private String batchCode;

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

    /**
     * 学段字典表id
     */
    private Long periodDictId;

    /**
     * 所属学段
     */
    private String period;

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


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("batchCode", getBatchCode())
                .append("batchName", getBatchName())
                .append("remark", getRemark())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
