package com.ruoyi.bst.creditPay.domain;

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

import org.springframework.format.annotation.DateTimeFormat;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 挂账支付对象 bst_credit_pay
 *
 * @author ruoyi
 * @date 2025-05-28
 */
@Data
public class CreditPay extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "编号")
    @ApiModelProperty("编号")
    private String no;

    @Excel(name = "外部单号")
    @ApiModelProperty("外部单号")
    private String outTradeNo;

    @Excel(name = "挂账方ID")
    @ApiModelProperty("挂账方ID")
    private Long creditId;

    @Excel(name = "挂账用户ID")
    @ApiModelProperty("挂账用户ID")
    private Long creditUserId;

    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "总金额")
    @ApiModelProperty("总金额")
    private BigDecimal amount;

    @Excel(name = "退款金额")
    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @Excel(name = "回款金额")
    @ApiModelProperty("回款金额")
    private BigDecimal paymentAmount;

    @Excel(name = "业务ID")
    @ApiModelProperty("业务ID")
    private Long bstId;

    @Excel(name = "业务类型")
    @ApiModelProperty("业务类型")
    private String bstType;

    @Excel(name = "描述")
    @ApiModelProperty("描述")
    private String description;

    @Excel(name = "状态", readConverterExp = "1=待回款,2=已回款")
    @ApiModelProperty("状态")
    private String status;

    @Excel(name = "运营区ID")
    @ApiModelProperty("运营区ID") 
    private Long areaId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间")
    @ApiModelProperty("支付时间")
    private LocalDateTime payTime;

    @Excel(name = "运营区名称")
    @ApiModelProperty("运营区名称")
    private String areaName;

    @Excel(name = "挂账方名称")
    @ApiModelProperty("挂账方名称")
    private String creditName;

    @Excel(name = "挂账用户名称")
    @ApiModelProperty("挂账用户名称")
    private String creditUserName;
}
