package com.bonus.material.ma.domain;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.bonus.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;

/**
 * 物资类型对象 ma_type
 * @author syruan
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ToString
public class Type extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 类型ID */
    @Excel(name = "类型ID")
    @ApiModelProperty(value = "类型ID")
    private Long typeId;

    /** 类型名称 */
    @Excel(name = "规格型号")
    @ApiModelProperty(value = "类型名称")
    private String typeName;

    /** 库管员昵称 */
    @ApiModelProperty(value = "库管员昵称")
    private String keeperNickName;

    /** 维修员昵称 */
    @ApiModelProperty(value = "维修员昵称")
    private String repairNickName;

    /** 仓库名称 */
    @ApiModelProperty(value = "物资仓库名称")
    private String houseName;

    /** 仓库Id */
    @ApiModelProperty(value = "物资仓库Id")
    private Long houseId;

    /** 上级ID */
    @Excel(name = "上级ID")
    @ApiModelProperty(value = "上级ID")
    private Long parentId;

    /** 实时库存 */
    @Excel(name = "实时库存")
    @ApiModelProperty(value = "实时库存")
    private Long storageNum;

    /** 是否扣费 */
    @ApiModelProperty(value = "是否扣费,0:扣费, 1:不扣费")
    private Byte isCharging = 1;

    /** 检验周期 */
    @ApiModelProperty(value = "检验周期，单位：月")
    private Integer testCycle = 0;

    /** 类型编号 */
    @Excel(name = "类型编号")
    @ApiModelProperty(value = "类型编号")
    private String typeCode;

    /** 规格编号 */
    @Excel(name = "规格编号")
    @ApiModelProperty(value = "规格编号")
    private String modelCode;

    /** 计量单位ID */
    @Excel(name = "计量单位ID")
    @ApiModelProperty(value = "计量单位ID")
    private Long unitId;

    /** 计量单位名称 */
    @ApiModelProperty(value = "计量单位名称")
    private String unitName;

    /** 管理方式(0编号 1计数) */
    @Excel(name = "管理方式(0编号 1计数)")
    @ApiModelProperty(value = "管理方式(0编号 1计数)")
    private String manageType;

    /** 内部租赁单价 */
    @Excel(name = "内部租赁单价")
    @ApiModelProperty(value = "内部租赁单价")
    private BigDecimal leasePrice;

    /** 租赁费用生效时间 */
    @ApiModelProperty(value = "租赁费用生效时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租赁费用生效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effTime;

    /** 外部租赁单价 */
    @Excel(name = "外部租赁单价")
    @ApiModelProperty(value = "外部租赁单价")
    private BigDecimal rentPrice;

    /** 采购价原值 */
    @Excel(name = "采购价原值")
    @ApiModelProperty(value = "采购价原值")
    private BigDecimal buyPrice;

    /** 丢失赔偿比率 */
    @Excel(name = "丢失赔偿比率")
    @ApiModelProperty(value = "丢失赔偿比率")
    private BigDecimal payRatio;

    /** 丢失赔偿价 */
    @ApiModelProperty(value = "丢失赔偿价")
    private BigDecimal payPrice;

    @ApiModelProperty(value = "???价")
    private BigDecimal finalPrice;

    /** 税率 */
    @ApiModelProperty(value = "税率")
    private BigDecimal taxRatio;

    /** 层级 */
    @Excel(name = "层级")
    @ApiModelProperty(value = "层级")
    private String level;

    /** 额定载荷 */
    @Excel(name = "额定载荷")
    @ApiModelProperty(value = "额定载荷")
    private String ratedLoad;

    /** 试验载荷 */
    @Excel(name = "试验载荷")
    @ApiModelProperty(value = "试验载荷")
    private String testLoad;

    /** 持荷时间 */
    @ApiModelProperty(value = "持荷时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "持荷时间", width = 30, dateFormat = "yyyy-MM-dd")
    private String holdingTime;

    /** 库存预警数量 */
    @Excel(name = "库存预警数量")
    @ApiModelProperty(value = "库存预警数量")
    private Long warnNum;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 是否计划管理（0代表否 1代表是） */
    @Excel(name = "是否计划管理", readConverterExp = "0=代表否,1=代表是")
    private String isPlan;

    /** 是否安措费机具（0代表否1代表是） */
    @Excel(name = "是否安措费机具", readConverterExp = "0=代表否1代表是")
    private String isAncuo;

    /** 厂家规格型号 */
    @Excel(name = "厂家规格型号")
    @ApiModelProperty(value = "厂家规格型号")
    private String facModel;

    /** 推送智慧工程定义的门类分类机具编码 */
    @Excel(name = "推送智慧工程定义的门类分类机具编码")
    @ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码")
    private String intelligentCode;

    private String keyword;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Type> children = new ArrayList<>();

}
