package com.dgtly.system.domain;

import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;


/**
 * 经销商id，type对象
 *
 * @author njs
 * @date 2022-08-30
 */
@Data
public class CustomerModelVO implements Serializable {

    private String customerId;
    private String customerType;
    private Integer count;
   /* public CustomerModelVO(String obInfo) {
        String[] values=obInfo.split("-");
        this.customerId=values[0];
        this.customerType=values[1];
    }

    @Override
    @JsonValue
    public String toString(){
        return this.customerId + "-" + this.customerType;
    }

    @Override
    public int hashCode() {
        int hashCode = (customerId + "-" + customerType).hashCode();
        return hashCode;
    }

    @Override
    public boolean equals(final Object obj) {
        if (obj == null) {
            return false;
        }
        final CustomerModelVO entityDto = (CustomerModelVO) obj;
        if (this == entityDto) {
            return true;
        } else {
            if (customerId==null && customerType==null) {
                if (customerId == entityDto.getCustomerId() && customerType == entityDto.getCustomerType()) {
                    return true;
                }
            }
            if (customerId==null && customerType!=null){
                if (customerId== entityDto.getCustomerId() && customerType.equals(entityDto.getCustomerType())){
                    return true;
                }
            }
            if (customerId!=null && customerType==null){
                if (customerId.equals(entityDto.getCustomerId()) && customerType == entityDto.getCustomerType()){
                    return true;
                }
            }
            if (customerId!=null&&customerType!=null){
                if (customerId.equals(entityDto.getCustomerId())&&customerType.equals(entityDto.getCustomerType())){
                    return true;
                }
            }
            return false;
        }
    }*/
}



