package com.yaoai.api.dto.billing;

import com.yaoai.domain.entity.TenantBalance;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class BalanceDTO {

    private Long tenantId;
    private BigDecimal balance;
    private BigDecimal totalRecharged;
    private BigDecimal totalSpent;

    public static BalanceDTO from(TenantBalance b) {
        BalanceDTO dto = new BalanceDTO();
        dto.setTenantId(b.getTenantId());
        dto.setBalance(b.getBalance());
        dto.setTotalRecharged(b.getTotalRecharged());
        dto.setTotalSpent(b.getTotalSpent());
        return dto;
    }
}
