package com.jy.business.payment.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.flow.model.enums.FlowStatusEnum;
import com.jy.framework.model.annotation.LogTag;
import com.jy.framework.model.base.BaseIdPo;
import com.jy.framework.model.enums.LogTagExtendedType;
import lombok.Getter;
import lombok.Setter;

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

/**
 * <p>
 * 请款
 * </p>
 *
 * @author
 * @since 2024-10-18
 */
@Getter
@Setter
@TableName("payment_requests")
public class PaymentRequests extends BaseIdPo {

    /**
     * 归属公司id
     */
    private Long corporationId;

    /**
     * 店铺id
     */
    private Long corporationShopId;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 请款类型
     */
    @LogTag(alias = "请款类型", extendedType = LogTagExtendedType.DICT, dictCode = "payment_requests_type")
    private Integer type;

    /**
     * 用款时间
     */
    @LogTag(alias = "用款时间", extendedType = LogTagExtendedType.DATE)
    private Date useTime;

    /**
     * 用款说明
     */
    @LogTag(alias = "用款说明")
    private String useRemark;

    /**
     * 附件列表
     */
    @LogTag(alias = "附件列表")
    private String atts;

    /**
     * 付款总金额
     */
    @LogTag(alias = "付款总金额")
    private BigDecimal totalAmount;

    /**
     * 单据数量
     */
    @LogTag(alias = "单据数量")
    private Integer documentQuantity;

    /**
     * 付款方式
     */
    @LogTag(alias = "付款方式", extendedType = LogTagExtendedType.DICT, dictCode = "pay_type")
    private Integer payType;

    /**
     * 资金账户id
     */
    private Long capitalAccountId;

    /**
     * 户名
     */
    @LogTag(alias = "户名")
    private String accountName;

    /**
     * 银行账号
     */
    @LogTag(alias = "银行账号")
    private String account;

    /**
     * 开户银行
     */
    @LogTag(alias = "开户银行")
    private String depositBank;

    /**
     * 联行号/ SWIFT Code
     */
    @LogTag(alias = "联行号 / SWIFT Code")
    private String correspondentNumber;

    /**
     * 审批状态
     */
    @LogTag(alias = "审批状态", extendedType = LogTagExtendedType.CONVERT, readConverterExp = "0=待提交,1=审批中,2=审批通过,4=驳回,6=撤销,7=取回")
    private Integer approvalStatus;

    /**
     * 放款状态
     */
    @LogTag(alias = "放款状态", extendedType = LogTagExtendedType.CONVERT, readConverterExp = "0=未打款,1=部分打款,2=已打款")
    private Integer paymentStatus;

    /**
     * 已打款金额
     */
    @LogTag(alias = "已打款金额")
    private BigDecimal remitAmount;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除标记
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private String delFlag;

}
