com.nebula.boxes.iface.model.view.HuntView Maven / Gradle / Ivy
The newest version!
package com.nebula.boxes.iface.model.view;
import com.nebula.boxes.iface.enums.IndustryEnum;
import com.spring.boxes.dollar.enums.*;
import com.spring.boxes.dollar.term.PairView;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
public interface HuntView {
// 排序方式
List SORT_TYPE = DitchTypeEnum.Opt.INSTANCE().valueList().stream()
.map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
// 融资阶段
List FIRM_INVEST = InvestTypeEnum.Opt.INSTANCE().valueList()
.stream().map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
// 企业规模
List FIRM_SCALE = UserScaleEnum.Opt.INSTANCE().valueList()
.stream().map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
// 学历要求
List WORK_EDU = EducationEnum.Opt.INSTANCE().valueList()
.stream().map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
// 职位类型
List WORK_TYPE = WorkTypeEnum.Opt.INSTANCE().valueList()
.stream().map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
// 薪资区间
List WORK_WAGE = WageTypeEnum.Opt.INSTANCE().valueList()
.stream().map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
// 薪资区间
List WORK_YEAR = WorkYearEnum.Opt.INSTANCE().valueList()
.stream().map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
// 行业分类
List INDUSTRY = IndustryEnum.Opt.INSTANCE().valueList()
.stream().map(x -> new PairView(x.getValue(), x.getLabel())).collect(Collectors.toList());
@Data
@AllArgsConstructor
@ApiModel(description = "职位筛选字典")
class HuntFacet implements Serializable {
@ApiModelProperty("排序类型")
private List sortType;
@ApiModelProperty("工作类型")
private List workType;
@ApiModelProperty("学历要求")
private List workEdu;
@ApiModelProperty("工作年限")
private List workYear;
@ApiModelProperty("薪资区间")
private List workWage;
@ApiModelProperty("所属行业")
private List industry;
@ApiModelProperty("企业规模")
private List firmScale;
@ApiModelProperty("企业融资阶段")
private List firmInvest;
private HuntFacet() {
}
public static HuntFacet getInstance() {
return Singleton.INSTANCE;
}
private static final class Singleton {
private static final HuntFacet INSTANCE = instance();
}
private static HuntFacet instance() {
HuntFacet view = new HuntFacet();
view.setSortType(HuntView.SORT_TYPE);
view.setFirmInvest(HuntView.FIRM_INVEST);
view.setFirmScale(HuntView.FIRM_SCALE);
view.setWorkEdu(HuntView.WORK_EDU);
view.setWorkType(HuntView.WORK_TYPE);
view.setWorkWage(HuntView.WORK_WAGE);
view.setWorkYear(HuntView.WORK_YEAR);
view.setIndustry(HuntView.INDUSTRY);
return view;
}
}
}