package com.zm.order.tool.server.dto;

import com.alibaba.fastjson.JSON;

import java.util.Objects;

/**
 * @author 陈标
 * @Description
 * @Date 2020/7/24 0024 14:42
 */
public class ChooseDTO {

    /**
     * 下拉框对应说明
     */
    private String key;

    /**
     * 下拉框对应值
     */
    private String value;


    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ChooseDTO chooseDTO = (ChooseDTO) o;
        return Objects.equals(key, chooseDTO.key) &&
                Objects.equals(value, chooseDTO.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(key, value);
    }
}
