package com.sundot.airport.ledger.domain;

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

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.sundot.airport.common.annotation.Excel;
import com.sundot.airport.common.core.domain.BaseEntity;

/**
 * 评分指标（二/三/四级）score_indicator
 */
@TableName("score_indicator")
public class ScoreIndicator extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    @Excel(name = "维度ID")
    private Long dimensionId;

    /** 父级指标ID，0=直属维度下（二级指标） */
    private Long parentId;

    @Excel(name = "层级(2/3/4)")
    private Integer level;

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

    /** 类型：1=加分 2=扣分 3=纯记录 */
    @Excel(name = "类型", readConverterExp = "1=加分,2=扣分,3=纯记录")
    private String type;

    @Excel(name = "分值")
    private BigDecimal scoreValue;

    @Excel(name = "叠加规则")
    private String cascadeRule;

    @Excel(name = "排序")
    private Integer sortOrder;

    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 子节点，不存入DB，用于树形渲染 */
    @TableField(exist = false)
    private List<ScoreIndicator> children;

    /** 维度名称，查询用（不存DB） */
    @TableField(exist = false)
    private String dimensionName;

    @Excel(name = "层级维度", readConverterExp = "1=部门,2=队室,3=通道,4=员工", combo = "部门,队室,通道,员工")
    private String org;

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public Long getDimensionId() { return dimensionId; }
    public void setDimensionId(Long dimensionId) { this.dimensionId = dimensionId; }

    public Long getParentId() { return parentId; }
    public void setParentId(Long parentId) { this.parentId = parentId; }

    public Integer getLevel() { return level; }
    public void setLevel(Integer level) { this.level = level; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getType() { return type; }
    public void setType(String type) { this.type = type; }

    public BigDecimal getScoreValue() { return scoreValue; }
    public void setScoreValue(BigDecimal scoreValue) { this.scoreValue = scoreValue; }

    public String getCascadeRule() { return cascadeRule; }
    public void setCascadeRule(String cascadeRule) { this.cascadeRule = cascadeRule; }

    public Integer getSortOrder() { return sortOrder; }
    public void setSortOrder(Integer sortOrder) { this.sortOrder = sortOrder; }

    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }

    public List<ScoreIndicator> getChildren() { return children; }
    public void setChildren(List<ScoreIndicator> children) { this.children = children; }

    public String getDimensionName() { return dimensionName; }
    public void setDimensionName(String dimensionName) { this.dimensionName = dimensionName; }

    public String getOrg() { return org; }
    public void setOrg(String org) { this.org = org; }
}
