package com.xinyilu.system.domain.testItemCityScoreinfo;

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

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

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

    /**
     * 平均成绩
     */
    @ApiModelProperty(value = "平均成绩")
    @Excel(name = "平均成绩")
    private BigDecimal itemAvgScore;

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

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

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


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("areaId", getAreaId())
                .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();
    }
}
