/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.modular.base.inventoryUse.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
import vip.xiaonuo.dev.modular.file.entity.DevFile;
import vip.xiaonuo.modular.base.baseConfig.entity.BaseConfig;
import vip.xiaonuo.modular.base.department.entity.Department;
import vip.xiaonuo.modular.base.peoplelist.entity.PeopleList;
import vip.xiaonuo.sys.modular.user.entity.SysUser;

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

/**
 * 物资领用实体
 *
 * @author newspaper
 * @date  2023/12/11 10:43
 **/
@Getter
@Setter
@TableName(value = "inventory_use", autoResultMap = true)
public class InventoryUse extends CommonEntity implements TransPojo {

    /** ID */
    @TableId
    @ApiModelProperty(value = "ID", position = 1)
    private String id;

    /** 物资编号 */
    @ApiModelProperty(value = "物资编号", position = 2)
    private String itemCode;

    /** 物资名称 */
    @ApiModelProperty(value = "物资名称", position = 3)
    private String itemName;

    /** 物资类别 */
    @ApiModelProperty(value = "物资类别", position = 4)
    @Trans(type = TransType.SIMPLE, target = BaseConfig.class, fields = "configName", alias = "type", ref = "itemTypeName")
    private String itemType;

    /** 品牌 */
    @ApiModelProperty(value = "品牌", position = 5)
    private String brand;

    /** 型号规格 */
    @ApiModelProperty(value = "型号规格", position = 6)
    private String specification;

    /** 单位 */
    @ApiModelProperty(value = "单位", position = 7)
    private String unit;

    /** 仓库ID */
    @ApiModelProperty(value = "仓库ID", position = 8)
    @Trans(type = TransType.SIMPLE, target = BaseConfig.class, fields = "configName", alias = "warehouse", ref = "warehouseName")
    private String warehouseId;

    /** 领用时间 */
    @ApiModelProperty(value = "领用时间", position = 9)
    private Date useTime;

    /** 领用数量 */
    @ApiModelProperty(value = "领用数量", position = 10)
    private BigDecimal useQuantity;

    /** 领用部门ID */
    @ApiModelProperty(value = "领用部门ID", position = 11)
    @Trans(type = TransType.SIMPLE, target = Department.class, fields = "departmentName", alias = "department", ref = "departmentName")
    private String useDepartmentId;

    /** 领用人ID */
    @ApiModelProperty(value = "领用人ID", position = 12)
    @Trans(type = TransType.SIMPLE, target = PeopleList.class, fields = "userName", alias = "user", ref = "userName")
    private String userId;

    /** 预计归还时间 */
    @ApiModelProperty(value = "预计归还时间", position = 13)
    private Date expectReturnTime;

    /** 归还时间 */
    @ApiModelProperty(value = "归还时间", position = 13)
    private Date returnTime;

    /** 归还图片地址 */
    @ApiModelProperty(value = "归还图片地址", position = 14)
    private String returnImgUrl;

    /** 备注 */
    @ApiModelProperty(value = "备注", position = 15)
    private String remarks;

    /** 组织ID */
    @ApiModelProperty(value = "组织ID", position = 16)
    private String orgId;

    /** 物资类别名称 */
    @ApiModelProperty(value = "物资类别名称", position = 17)
    @TableField(exist = false)
    private String itemTypeName;

    /** 仓库名称 */
    @ApiModelProperty(value = "仓库名称", position = 18)
    @TableField(exist = false)
    private String warehouseName;

    /** 部门名称 */
    @ApiModelProperty(value = "部门名称", position = 19)
    @TableField(exist = false)
    private String departmentName;

    /** 领用人名称 */
    @ApiModelProperty(value = "领用人名称", position = 20)
    @TableField(exist = false)
    private String userName;
}
