package org.dromara.materials.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.materials.domain.BusMaterialsInventory;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;


/**
 * 材料出/入库视图对象 bus_materials_inventory
 *
 * @author lcj
 * @date 2025-03-06
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BusMaterialsInventory.class)
public class BusMaterialsInventoryVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ExcelProperty(value = "主键id")
    private Long id;

    /**
     * 材料id
     */
    @ExcelProperty(value = "材料id")
    private Long materialsId;

    /**
     * 材料信息
     */
    @ExcelProperty(value = "材料信息")
    private BusMaterialsVo materialsVo;

    /**
     * 项目id
     */
    @ExcelProperty(value = "项目id")
    private Long projectId;

    /**
     * 出入库状态
     */
    @ExcelProperty(value = "出入库状态")
    private String outPut;

    /**
     * 出/入库的数量
     */
    @ExcelProperty(value = "出/入库的数量")
    private Long number;

    /**
     * 出/入库操作时间
     */
    @ExcelProperty(value = "出/入库操作时间")
    private Date outPutTime;

    /**
     * 剩余库存数量（记录最后一次操作留下的库存数）
     */
    @ExcelProperty(value = "剩余库存数量", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "记录最后一次操作留下的库存数")
    private Long residue;

    /**
     * 操作人（入库人、领料人）
     */
    @ExcelProperty(value = "操作人", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "入库人、领料人")
    private String operator;

    /**
     * 材料出入证明
     */
    @ExcelProperty(value = "材料出入证明")
    private String path;

    /**
     * 处理方式
     */
    @ExcelProperty(value = "处理方式")
    private String disposition;

    /**
     * 交接单位（班组）
     */
    @ExcelProperty(value = "交接单位", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "班=组")
    private String recipient;

    /**
     * 领用人
     */
    @ExcelProperty(value = "领用人")
    private String shipper;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

}
