package com.dsk.common.core.domain.model;

import com.github.pagehelper.PageInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * 企业详情供应商信息列表
 * @author hypnos
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class EnterpriseSupplierPageBody extends PageInfo {

    //企业Id
    @NotNull(message = "企业id不能为空")
    private Integer companyId;
    
    //是否企业首页用，首页用到缓存
    private Boolean isIndex = true;
    
    //查询关键词（供应商名）
    private String key;
    
    //排序字段
    private String orderColumn;

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Boolean getIndex() {
        return isIndex;
    }

    public void setIndex(Boolean index) {
        isIndex = index;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getOrderColumn() {
        return orderColumn;
    }

    public void setOrderColumn(String orderColumn) {
        this.orderColumn = orderColumn;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("com.dsk.common.core.domain.model.enterpriseSupplierPageBody{");
        sb.append("companyId=").append(companyId);
        sb.append(", isIndex=").append(isIndex);
        sb.append(", key='").append(key).append('\'');
        sb.append(", orderColumn='").append(orderColumn).append('\'');
        sb.append(", index=").append(getIndex());
        sb.append(", pageNum=").append(getPageNum());
        sb.append(", pageSize=").append(getPageSize());
        sb.append('}');
        return sb.toString();
    }
}
