package com.fjhx.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import com.fjhx.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * <p>
 * 退货单
 * </p>
 *
 * @author ${author}
 * @since 2022-08-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BackGoods extends BaseEntity {


    /**
     * 退货单编号
     */
    private String code;

    /**
     * 供应商ID
     */
    private Long supplierId;

    /**
     * 物品id
     */
    private Long goodsId;

    /**
     * 申购单id
     */
    private Long applyPurchaseId;

    /**
     * 退货数量
     */
    private BigDecimal backQuantity;

    /**
     * 退货单价
     */
    private BigDecimal unitPrice;

    /**
     * 退货金额
     */
    private BigDecimal backPrice;

    /**
     * 实际回款金额
     */
    private BigDecimal collectionPrice;

    /**
     * 退货原因
     */
    private String remark;

    /**
     * 退货状态  1审批中 2未通过 3已通过/待退款 4部分退款 5已退款
     */
    private Integer status;

    /**
     * 乐观锁
     */
    @TableField(fill = FieldFill.INSERT)
    @Version
    private Integer version;

    /**
     * 逻辑删除 0未删除 1已删除
     */
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;

}
