package com.zhongshu.card.server.core.domain.wallet;

import com.zhongshu.card.client.type.RechargeType;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import com.zhongshu.card.server.core.domain.org.UserAccount;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;

/**
 * 个人钱包充值记录
 *
 * @author TRX
 * @date 2024/6/28
 */
@Data
@Builder
@Document
@AllArgsConstructor
@NoArgsConstructor
public class WalletRecharge extends SuperMain {

    @Schema(description = "关联钱包信息")
    @DBRef(lazy = true)
    private Wallet wallet;

    @Schema(description = "关联用户")
    @DBRef(lazy = true)
    private UserAccount userAccount;

    @Schema(description = "用户userId")
    private String userId;

    @Schema(description = "用户名称")
    private String userName;

    @Schema(description = "用户电话号码")
    private String phone;

    @Schema(description = "支付订单号")
    private String paymentNo;

    @Schema(description = "充值类型：")
    private RechargeType rechargeType;

    @Schema(description = "年份，如：2024")
    private String year;

    @Schema(description = "月份，如06")
    private String month;

    @Schema(description = "可阅读的时间")
    private String timeStr;

    @Schema(description = "充值金额")
    private BigDecimal amount;

    @Schema(description = "充值前的金额")
    private BigDecimal preAmount;

    @Schema(description = "充值后的金额")
    private BigDecimal afterAmount;

    @Schema(description = "关联的退款订单数据ID")
    private String aboutDataId;

}
