package com.eactive.httpmockserver.api.dto;

import com.eactive.httpmockserver.api.entity.MockRoute;
import com.eactive.httpmockserver.common.search.BaseSearch;
import com.eactive.httpmockserver.common.search.ColumnSearchModel;
import com.eactive.httpmockserver.common.search.SearchCondition;
import com.eactive.httpmockserver.common.search.SearchModel;

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

public class MockRouteSearch implements BaseSearch<MockRoute> {

    private String name;

    @Override
    public List<SearchModel> buildSearchCondition() {
        List<SearchModel> models = new ArrayList<>();
        models.add(new ColumnSearchModel("name", SearchCondition.LIKE, name));
        return models;
    }

    public String getName() {
        return name;
    }

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

}
