package com.muchinfo.mtp3pojos.entity;

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.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 账户出入金申请表
 * </p>
 *
 * @author XKF
 * @since 2024-07-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("BANK_ACCOUNTOUTINAPPLY")
@ApiModel(value="BankAccountoutinapply对象", description="账户出入金申请表")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BankAccountoutinapply extends Model<BankAccountoutinapply> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "资金账号")
    @TableId(value = "ACCOUNTCODE")
    private String accountcode;

    @ApiModelProperty(value = "托管银行编号")
    @TableField("CUSBANKID")
    private String cusbankid;

    @ApiModelProperty(value = "交易日(yyyyMMdd)")
    @TableField("TRADEDATE")
    private String tradedate;

    @ApiModelProperty(value = "银行服务流水号")
    @TableField("EXCHTICKET")
    private String exchticket;

    @ApiModelProperty(value = "交易服务流水号")
    @TableField("EXTOPERATEID")
    private BigDecimal extoperateid;

    @ApiModelProperty(value = "银行流水")
    @TableField("BANKTICKET")
    private String bankticket;

    @ApiModelProperty(value = "申请状态 - 1:待审核 2:待复审 3:初审拒绝 4:交易冻结中 5:交易解冻中 6:交易解冻扣款中 7:交易入金中 8:交易冻结/解冻/扣款中(银行发起出金时用) 9:银行出金中 10:银行入金中 11:成功 12:失败 13:银行审核中  14:账户服务入金失败； 15:账户服务解冻失败； 16:账户服务解冻扣款失败； 17:账户服务出金失败 18:复审通过 19:复审拒绝 20:提交审核，账户冻结中 21:审核拒绝，账户解冻中；22: 待审核，账户服务解冻回滚中； 23：待复审，账户服务解冻回滚中； 24： 审核通过，账户冻结金额检查中；25： 复审通过，账户冻结金额检查中；")
    @TableField("APPLYSTATUS")
    private Integer applystatus;

    @ApiModelProperty(value = "申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金")
    @TableField("EXECUTETYPE")
    private Integer executetype;

    @ApiModelProperty(value = "金额")
    @TableField("AMOUNT")
    private BigDecimal amount;

    @ApiModelProperty(value = "币种")
    @TableField("CURRENCY")
    private String currency;

    @ApiModelProperty(value = "手续费")
    @TableField("CHARGE")
    private BigDecimal charge;

    @ApiModelProperty(value = "资金密码")
    @TableField("ACCOUNTPWD")
    private String accountpwd;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATETIME")
    private Date updatetime;

    @ApiModelProperty(value = "银行编号")
    @TableField("BANKID")
    private String bankid;

    @ApiModelProperty(value = "银行支行号")
    @TableField("BRANCHBANKID")
    private String branchbankid;

    @ApiModelProperty(value = "银行支行名称")
    @TableField("BRANCHBANKNAME")
    private String branchbankname;

    @ApiModelProperty(value = "银行卡号")
    @TableField("BANKACCOUNTNO")
    private String bankaccountno;

    @ApiModelProperty(value = "银行账户名")
    @TableField("BANKACCOUNTNAME")
    private String bankaccountname;

    @ApiModelProperty(value = "扩展信息")
    @TableField("EXTENDINFO")
    private String extendinfo;

    @ApiModelProperty(value = "审核人")
    @TableField("AUDITID")
    private BigDecimal auditid;

    @ApiModelProperty(value = "审核时间")
    @TableField("AUDITTIME")
    private Date audittime;

    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "调转网址")
    @TableField("NETADDR")
    private String netaddr;

    @ApiModelProperty(value = "最新账户服务流水号")
    @TableField("ACCOUNTTICKET")
    private String accountticket;

    @ApiModelProperty(value = "对账差错标志 - 1:为单边账;其它为正常出入金")
    @TableField("CHECKERRORFLAG")
    private Integer checkerrorflag;

    @ApiModelProperty(value = "备注(失败原因)")
    @TableField("REMARK2")
    private String remark2;

    @ApiModelProperty(value = "复审人")
    @TableField("REAUDITID")
    private BigDecimal reauditid;

    @ApiModelProperty(value = "复审时间")
    @TableField("REAUDITTIME")
    private Date reaudittime;

    @ApiModelProperty(value = "复审备注")
    @TableField("REAUDITREMARK")
    private String reauditremark;

    @ApiModelProperty(value = "申请备注")
    @TableField("APPLYREMARK")
    private String applyremark;

    @ApiModelProperty(value = "三方关联ID")
    @TableField("RELATEDORDERID")
    private String relatedorderid;

    @ApiModelProperty(value = "出金(劣后本金) - 外部子账户")
    @TableField("CAPAMOUNTOUT")
    private BigDecimal capamountout;

    @ApiModelProperty(value = "劣后金额(自有)")
    @TableField("INFAMOUNT")
    private BigDecimal infamount;

    @ApiModelProperty(value = "优先金额(授信)")
    @TableField("PRIAMOUNT")
    private BigDecimal priamount;

    @ApiModelProperty(value = "银行申请流水")
    @TableField("BANK_APPLY_TICKET")
    private String bankApplyTicket;

    @ApiModelProperty(value = "凭证地址")
    @TableField("CERTIFICATEPHOTOURL")
    private String certificatephotourl;

    @ApiModelProperty(value = "原始出入金金额")
    @TableField("SOUCREAMOUNT")
    private BigDecimal soucreamount;

    @ApiModelProperty(value = "原始出入金币种")
    @TableField("SOUCRECURRENCYID")
    private BigDecimal soucrecurrencyid;


    @Override
    public Serializable pkVal() {
        return this.accountcode;
    }

}
