package com.sifang.modules.supply.order.resp;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @author hongzq
 */
public class TraderWarehouse {

    private String id;

    private String name;

    private List<TraderWarehouse> warehouseList = new ArrayList<>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

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

    public List<TraderWarehouse> getWarehouseList() {
        return warehouseList;
    }

    public void setWarehouseList(List<TraderWarehouse> warehouseList) {
        this.warehouseList = warehouseList;
    }

    public void addWarehouse(TraderWarehouse warehouse){
        this.warehouseList.add(warehouse);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TraderWarehouse that = (TraderWarehouse) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
