package com.jwipc.supplier.model.query;

import com.jwipc.db.DbUtil;
import com.jwipc.query.BasePageQuery;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class SupplierSelectQuery extends BasePageQuery implements Serializable {
    @Serial
    private static final long serialVersionUID = 5976648731323524023L;
    private String name;
    private String code;
    private String companyCode;
    private String purchaseOrgCode;
    private String state;
    private String category;
    private String categories;
    private String supplierType;
    private String userName;


    public String getNameLike() {
        return DbUtil.toLike(this.name);
    }

    public String getCodeLike() {
        return DbUtil.toLike(this.code);
    }

    public List<String> getStateList() {
        return DbUtil.toList(this.state);
    }

    public List<String> getCategoriesList() {
        return DbUtil.toList(this.categories);
    }
}
