package com.clx.performance.model.loan;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author kavin
 * Date 2024-01-20
 * Time 17:05
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("owner_loan_record")
public class OwnerLoanRecord implements HasKey<Integer> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("owner_user_no")
    @ApiModelProperty("货主编码")
    private Long ownerUserNo;

    @TableField("owner_user_name")
    @ApiModelProperty("货主名称")
    private String ownerUserName;

    @TableField("mobile")
    @ApiModelProperty("联系电话")
    private String mobile;

    @TableField("running_water_open_no")
    @ApiModelProperty("交易流水号（第三方）")
    private String runningWaterOpenNo;

    @TableField("merchant_running_water_no")
    @ApiModelProperty("商户流水号")
    private String merchantRunningWaterNo;

    @TableField("loan_no")
    @ApiModelProperty("借款单号")
    private Long loanNo;

    @TableField("loan_type")
    @ApiModelProperty("借款类型 1:虚拟货币  2:资金")
    private Integer loanType;

    @TableField("loan_balance")
    @ApiModelProperty("借款金额")
    private BigDecimal loanBalance;

    @TableField("borrower")
    @ApiModelProperty("借款方")
    private String borrower;

    @ApiModelProperty("借款方账户")
    @TableField("borrower_account")
    private String borrowerAccount;

    @TableField("lending_party")
    @ApiModelProperty("借出方")
    private String lendingParty;

    @TableField("payment_account")
    @ApiModelProperty("付款账户")
    private String paymentAccount;

    @TableField("payee")
    @ApiModelProperty("收款方")
    private String payee;

    @TableField("payee_account")
    @ApiModelProperty("收款账户")
    private String payeeAccount;

    @TableField("status")
    @ApiModelProperty("10 待审批  20 审批通过   30 审批拒绝  40 付款中  50 付款成功 60 付款失败 ")
    private Integer status;

    @TableField("approve_time")
    @ApiModelProperty("审批时间")
    private LocalDateTime approveTime;

    @TableField("approve_by")
    @ApiModelProperty("审批人")
    private String approveBy;

    @TableField("reject_reason")
    @ApiModelProperty("拒绝原因")
    private String rejectReason;

    @TableField("loan_repayment_time")
    @ApiModelProperty("借款归还时间")
    private LocalDateTime loanRepaymentTime;

    @TableField("create_by")
    @ApiModelProperty("创建人")
    private String createBy;

    @TableField("create_time")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField("modified_time")
    @ApiModelProperty("修改时间")
    private LocalDateTime modifiedTime;

    @Override
    @KeyColumn("id")
    public Integer gainKey() {
    return this.id;
    }
}
