package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.PcSolidHazardousType;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 固危废贮存信息--危险废物名录类型对象 pc_solid_hazardous_type
 *
 * @author szhpt
 * @date 2023-03-21*/
@ApiModel(value = "固危废贮存信息--危险废物名录类型")
@EqualsAndHashCode(callSuper = false)
@Data
public class PcSolidHazardousTypeQuery extends PageQuery
{

    @ApiModelProperty(value = "ID")
    private String id;
    @ApiModelProperty(value = "废物类别")
    private String type;
    @ApiModelProperty(value = "类别名称")
    private String name;
    @ApiModelProperty(value = "行业来源")
    private String source;
    @ApiModelProperty(value = "废物代码")
    private String code;
    @ApiModelProperty(value = "物描述")
    private String describe;
    @ApiModelProperty(value = "危险特性")
    private String characteristics;
    @ApiModelProperty(value = "状态 N 停用 Y启用")
    private String state;
    @ApiModelProperty(value = "创建时间")
    private String entityCreatedate;
    @ApiModelProperty(value = "修改时间")
    private String entityModifydate;
    @ApiModelProperty(value = "创建人")
    private String entityCreateuser;
    @ApiModelProperty(value = "修改人")
    private String entityModifyuser;
    @ApiModelProperty(value = "版本号")
    private String version;
    @ApiModelProperty(value = "$column.columnComment")
    private String valid;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<PcSolidHazardousType> createLambdaQueryWrapper(PcSolidHazardousTypeQuery query) {
        QueryWrapper<PcSolidHazardousType> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getType()), "type", query.getType());
        wrapper.eq(ObjectUtil.isNotNull(query.getName()), "name", query.getName());
        wrapper.eq(ObjectUtil.isNotNull(query.getSource()), "source", query.getSource());
        wrapper.eq(ObjectUtil.isNotNull(query.getCode()), "code", query.getCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getDescribe()), "describe", query.getDescribe());
        wrapper.eq(ObjectUtil.isNotNull(query.getCharacteristics()), "characteristics", query.getCharacteristics());
        wrapper.eq(ObjectUtil.isNotNull(query.getState()), "state", query.getState());
        wrapper.eq(ObjectUtil.isNotNull(query.getEntityCreatedate()), "entity_createdate", query.getEntityCreatedate());
        wrapper.eq(ObjectUtil.isNotNull(query.getEntityModifydate()), "entity_modifydate", query.getEntityModifydate());
        wrapper.eq(ObjectUtil.isNotNull(query.getEntityCreateuser()), "entity_createuser", query.getEntityCreateuser());
        wrapper.eq(ObjectUtil.isNotNull(query.getEntityModifyuser()), "entity_modifyuser", query.getEntityModifyuser());
        wrapper.eq(ObjectUtil.isNotNull(query.getVersion()), "version", query.getVersion());
        wrapper.eq(ObjectUtil.isNotNull(query.getValid()), "valid", query.getValid());
        return wrapper;
        }
}
