package cn.iocoder.yudao.module.bpm.dal.dataobject.oa;

import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*;

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

/**
 * 供应商采购付款 DO
 *
 * @author 艾楷
 */
@TableName(value = "bpm_oa_supplier_purchase_payment", autoResultMap = true)
@KeySequence("bpm_oa_supplier_purchase_payment_seq")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BpmOASupplierPurchasePaymentDO extends BaseDO {

    /**
     * 主键
     */
    @TableId
    private Long id;
    /**
     * 申请人的用户编号
     */
    private Long userId;
    /**
     * 供应商id
     */
    private Long supplierId;
    /**
     * 结算方式(字典值)
     */
    private Integer settlementMethod;
    /**
     * 供应商采购计划ids
     */
    private String supplierProcurementPlanIds;

    /**
     * 总支付金额
     */
    private BigDecimal totalMoney;
    /**
     * 备注
     */
    private String remark;
    /**
     * 附件信息
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<UploadUserFile> fileItems;
    /**
     * 结果
     */
    private Integer result;
    /**
     * 流程实例ID
     */
    private String processInstanceId;

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

    /**
     * 供应商采购计划列表
     */
    @TableField(exist = false)
    private List<BpmOASupplierProcurementPlanDO> supplierProcurementPlans;

}
