package pwc.taxtech.atms.dto.customer;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.fasterxml.jackson.annotation.JsonProperty;

@JSONType(orders = {"id", "code", "name", "enterPriseAccountID"})
public class CustomerDto {

    @JSONField(name="id", ordinal =1)
    @JsonProperty("id")
    private String ID;
    
    private String code;
    
    private String name;
    
    private String enterPriseAccountID;

    public String getID() {
        return ID;
    }

    public void setID(String iD) {
        ID = iD;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEnterPriseAccountID() {
        return enterPriseAccountID;
    }

    public void setEnterPriseAccountID(String enterPriseAccountID) {
        this.enterPriseAccountID = enterPriseAccountID;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((ID == null) ? 0 : ID.hashCode());
        result = prime * result + ((code == null) ? 0 : code.hashCode());
        result = prime * result + ((enterPriseAccountID == null) ? 0 : enterPriseAccountID.hashCode());
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        CustomerDto other = (CustomerDto) obj;
        if (ID == null) {
            if (other.ID != null)
                return false;
        } else if (!ID.equals(other.ID))
            return false;
        if (code == null) {
            if (other.code != null)
                return false;
        } else if (!code.equals(other.code))
            return false;
        if (enterPriseAccountID == null) {
            if (other.enterPriseAccountID != null)
                return false;
        } else if (!enterPriseAccountID.equals(other.enterPriseAccountID))
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        return true;
    }
    
    
}