package com.bonus.common.biz.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Digits;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 下拉树-实体类
 * @Author 阮世耀
 * @Create 2023/12/13 15:45
 * @Version 1.0
 */
@Data
public class TypeTreeNode {

    private long typeId;

    private long parentId;
    private int companyId;

    @Digits(integer = Integer.MAX_VALUE, fraction = 3)
    private BigDecimal num;

    private String manageType;

    private String unitName;

    private String unitValue;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String level;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String typeName;

    private String materialName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TypeTreeNode> children = new ArrayList<>();

    @ApiModelProperty(value = "在用数量")
    private BigDecimal useNum;

    @ApiModelProperty(value = "协议id")
    private Long agreementId;

    @ApiModelProperty(value = "领料方式 0材料领料 1工器具领料 2数据同步")
    private Integer leaseStyle;

    @ApiModelProperty("机具类型（1机具，2安全工器具）")
    private int jiJuType;

    @ApiModelProperty(value = "是否检验（0不检验，1检验）")
    private String isCheck;
}
