package jnpf.model.personnels.vo.goods;

import jnpf.model.personnels.po.FtbPersonnelsGoods;
import lombok.Data;

@Data
public class FtbPersonnelsGoodsPageVO {

    /**
     * 物品Id
     */
    private String id;

    /**
     * 物品名称
     */
    private String goodsName;

    /**
     * 物品编号
     */
    private String goodsCode;

    /**
     * 是否需要归还（0-否，1-是）
     */
    private Integer needReturn;

    /**
     * 物品数量，数字型，正整数，范围1～10000
     */
    private Long quantity;

    /**
     *剩余数量
     */
    private Long returnedQuantity;

    /**
     * 备注
     */
    private String remark;

    public static FtbPersonnelsGoodsPageVO convert(FtbPersonnelsGoods ftbPersonnelsGoods) {
        if (ftbPersonnelsGoods == null) {
            return null;
        }
        FtbPersonnelsGoodsPageVO ftbPersonnelsGoodsPageVO = new FtbPersonnelsGoodsPageVO();
        ftbPersonnelsGoodsPageVO.setGoodsName(ftbPersonnelsGoods.getGoodsName());
        ftbPersonnelsGoodsPageVO.setGoodsCode(ftbPersonnelsGoods.getGoodsCode());
        ftbPersonnelsGoodsPageVO.setNeedReturn(ftbPersonnelsGoods.getNeedReturn());
        ftbPersonnelsGoodsPageVO.setQuantity(ftbPersonnelsGoods.getQuantity());
        ftbPersonnelsGoodsPageVO.setReturnedQuantity(ftbPersonnelsGoods.getReturnedQuantity());
        ftbPersonnelsGoodsPageVO.setRemark(ftbPersonnelsGoods.getRemark());
        ftbPersonnelsGoodsPageVO.setId(ftbPersonnelsGoods.getId());
        return ftbPersonnelsGoodsPageVO;
    }
}
