package com.cmvr.evaluation.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cmvr.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("evaluate_indicator")
@ApiModel("评价管理--指标库")
public class AeIndicatorEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("指标主键ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("父级指标ID，一级指标为0")
    private Long parentId;

    @ApiModelProperty("指标层级 1-一级 2-二级 3-三级")
    private Integer level;

    @ApiModelProperty("指标名称")
    private String name;

    @ApiModelProperty("比较数值1")
    private BigDecimal compareNum1;

    @ApiModelProperty("比较符号（=、>、<、>=、<=等）")
    private String symbol;

    @ApiModelProperty("比较数值2")
    private BigDecimal compareNum2;

    @ApiModelProperty("指标分数")
    private BigDecimal score;

    @ApiModelProperty("指标权重")
    private BigDecimal weight;

    @ApiModelProperty("同层级排序")
    private Integer sort;

    @ApiModelProperty("类型 0-语音 1-触控")
    private Integer type;

    @ApiModelProperty("子指标列表")
    @TableField(exist = false) // 关键：标注该字段不是数据库列，避免MP映射报错
    private List<AeIndicatorEntity> children;
}
