package com.zhongshu.card.client.model.wallet;

import com.zhongshu.card.client.model.base.SuperModel;
import com.zhongshu.card.client.model.org.UserCountModel;
import com.zhongshu.card.client.type.RechargeType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author TRX
 * @date 2024/6/28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WalletRechargeModel extends SuperModel {
    @Schema(description = "关联钱包信息")
    private WalletModel wallet;

    @Schema(description = "用户信息")
    private UserCountModel userCount;

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

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

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

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

    private String rechargeTypeStr;

    public String getRechargeTypeStr() {
        if (wallet != null) {
            return rechargeType.getRemark();
        }
        return "";
    }

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

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

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

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

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

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

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