package com.bonus.material.lease.domain;

import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;

/**
 * 领料任务详细对象 lease_apply_details
 * 
 * @author xsheng
 * @date 2024-10-16
 */
@Data
@ToString
public class LeaseApplyDetails extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

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

    /** 物资类型 */
    @ApiModelProperty(value = "物资类型名称")
    private String maTypeName;

    /** 规格型号id */
    @ApiModelProperty(value = "规格型号id")
    private Long typeId;

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

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

    /** 库存数量 */
    @ApiModelProperty(value = "库存数量")
    private String storageNum;

    /** 预领料数 */
    @Excel(name = "预领料数")
    @ApiModelProperty(value = "预领料数")
    private Long preNum;

    /** 审批数量 */
    @Excel(name = "审批数量")
    @ApiModelProperty(value = "审批数量")
    private Long auditNum;

    /** 已领数量 */
    @Excel(name = "已领数量")
    @ApiModelProperty(value = "已领数量")
    private Long alNum;

    /**
     * 此数量是剩余需要出库的数量（preNum - alNum）
     */
    @ApiModelProperty(value = "剩余最大出库数量")
    private Integer outNum;

    /**
     * 装备管理方式(0编号 1计数)
     */
    @ApiModelProperty(name = "装备管理方式")
    @Excel(name = "装备管理方式", readConverterExp = "0=编号,1=计数")
    private int manageType;

    /** 状态（0待审批，1进行中，2已出库） */
    @Excel(name = "状态", readConverterExp = "0=待审批,1=进行中,2=已出库")
    private String status;

    /** 数据所属组织 */
    @Excel(name = "数据所属组织")
    @ApiModelProperty(value = "数据所属组织")
    private Long companyId;

    public LeaseApplyDetails(Long id, Long parentId, Long typeId, Long preNum, Long auditNum, Long alNum, String status, Long companyId) {
        this.id = id;
        this.parentId = parentId;
        this.typeId = typeId;
        this.preNum = preNum;
        this.auditNum = auditNum;
        this.alNum = alNum;
        this.status = status;
        this.companyId = companyId;
    }

    public LeaseApplyDetails() {}

    public LeaseApplyDetails(Long parentId) {
        this.parentId = parentId;
    }
}
