package com.zhangmeng.model.dto.query;

import lombok.Data;

import java.io.Serializable;

/**
 * 单个查询参数
 */
@Data
public class QuerySingleParams implements Serializable {

    public enum Type{
        equal,
        not_equal,
        not_like,
        like;
    }

    private String key;

    private Object value;

    private Type type;

    private String orderBy;

    public QuerySingleParams(String key, Object value, Type type) {
        this.key = key;
        this.value = value;
        this.type = type;
    }

    public QuerySingleParams(String key, Object value, Type type, String orderBy) {
        this.key = key;
        this.value = value;
        this.type = type;
        this.orderBy = orderBy;
    }
}
