package com.fjhx.entity.purchase;

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

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 采购
 * </p>
 *
 * @author ${author}
 * @since 2022-12-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Purchase extends BaseEntity {

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

    /**
     * 采购单号
     */
    private String code;

    /**
     * 采购金额
     */
    private BigDecimal price;

    /**
     * 发货状态：10、审批中；20、驳回；30、未到货；40、部分到货；50、已到货；99、取消
     */
    private Integer status;

    /**
     * 流程实例ID
     */
    private Long flowId;

    /**
     * 当前节点审批人ID
     */
    private Long flowApproverId;

    /**
     * 当前节点审批人名称
     */
    private String flowApproverName;

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

    /**
     * 采购人名称
     */
    @TableField(exist = false)
    private String createName;

    /**
     * 物流单号
     */
    @TableField(exist = false)
    private String logisticsCode;

    /**
     * 按钮ID
     */
    @TableField(exist = false)
    private Long buttonId;

    /**
     * 办理说明
     */
    @TableField(exist = false)
    private String flowRemark;

    /**
     * 物品集合
     */
    @TableField(exist = false)
    private List<ApplyPurchase> goodsList;

    /**
     * 供应商名称
     */
    @TableField(exist = false)
    private String supplierName;

}
