package com.m2pool.lease.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * <p>
 * 店铺钱包配置返对象
 * </p>
 *
 * @author yyb
 * @since 2025-07-23
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "店铺钱包配置返对象",value = "ShopChainAndCoinDto")
public class ShopChainAndCoinDto {
    private Long  shopId;
    private String chain;
    private String coin;


    /**
     * 用于stream distinct()去重
     * @param o
     * @return
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ShopChainAndCoinDto that = (ShopChainAndCoinDto) o;
        return shopId.equals(that.shopId) && coin.equals(that.coin) && chain.equals(that.chain);
    }

    @Override
    public int hashCode() {
        int result = shopId.hashCode();
        result = 31 * result + coin.hashCode();
        result = 31 * result + chain.hashCode();
        return result;
    }
}
