package com.wms.entity.app.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.wms.entity.table.WmsLog;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 日志查询
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class WmsLogQuery extends PageQuery {
    /**
     * 日志查询参数
     */
    @JsonProperty("queryParam")
    private String queryParam;

    /**
     * 将日志查询条件转化为LogPO
     * @return logPO
     */
    public WmsLog toLogPO() {
        WmsLog logPO = new WmsLog();
        logPO.setLogTitle(this.queryParam);
        logPO.setLogMethod(this.queryParam);
        logPO.setLogRequest(this.queryParam);
        logPO.setLogResponse(this.queryParam);
        logPO.setLogIp(this.queryParam);
        logPO.setLogUser(this.queryParam);
        return logPO;
    }
}
