package com.ruoyi.cms.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.cms.domain.vo.CompanyVo;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.AppUser;
import com.ruoyi.common.core.domain.entity.Company;
import com.ruoyi.common.core.domain.entity.File;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 岗位对象 job
 * @author lishundong
 * @date 2024-09-04
 */
@Data
@ApiModel("岗位")
@TableName(value = "job")
public class Job extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "job_id",type = IdType.AUTO)
    @ApiModelProperty("工作id")
    private Long jobId;

    @Excel(name = "职位名称")
    @ApiModelProperty("职位名称")
    private String jobTitle;

    @Excel(name = "最小薪资", readConverterExp = "元=")
    @ApiModelProperty("最小薪资（元）")
    private Long minSalary;

    @Excel(name = "最大薪资", readConverterExp = "元=")
    @ApiModelProperty("最大薪资（元）")
    private Long maxSalary;

    @Excel(name = "学历要求 对应字典education")
    @ApiModelProperty("学历要求 对应字典education")
    private String education;

    @Excel(name = "工作经验要求 对应字典experience")
    @ApiModelProperty("工作经验要求 对应字典experience")
    private String experience;

    @Excel(name = "用人单位名称")
    @ApiModelProperty("用人单位名称")
    private String companyName;

    @Excel(name = "岗位区划")
    @ApiModelProperty("岗位区划")
    private String jobLocation;

    @ApiModelProperty("工作地点区县字典代码")
    private String jobLocationAreaCode;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("发布时间")
    private String postingDate;

    @Excel(name = "招聘人数")
    @ApiModelProperty("招聘人数")
    private Long vacancies;

    @Excel(name = "纬度")
    @ApiModelProperty("纬度")
    private BigDecimal latitude;

    @Excel(name = "经度")
    @ApiModelProperty("经度")
    private BigDecimal longitude;

    @Excel(name = "浏览量")
    @ApiModelProperty("浏览量")
    @TableField("\"view\"")
    private Long view;

    @Excel(name = "公司id")
    @ApiModelProperty("公司id")
    private Long companyId;

    @ApiModelProperty("是否火")
    private Integer isHot;

    @ApiModelProperty("申请次数")
    @JsonIgnore
    private Integer applyNum;

    @TableField(exist = false)
    @ApiModelProperty("公司信息")
    private Company company;

    @TableField(exist = false)
    @ApiModelProperty("是否申请 0为否 1为是")
    private Integer isApply;

    @TableField(exist = false)
    @ApiModelProperty("是否收藏 0为否 1为是")
    private Integer isCollection;

    @ApiModelProperty("岗位描述")
    private String description;

    @ApiModelProperty("是否发布 0未发布 1发布")
    private Integer isPublish;

    @ApiModelProperty("数据来源")
    private String dataSource;

    @ApiModelProperty("岗位链接")
    private String jobUrl;

    @ApiModelProperty("jobRow对应id")
    private Long rowId;

    @TableField(exist = false)
    @ApiModelProperty("公司规模")
    private String scale;

    @TableField(exist = false)
    @ApiModelProperty("行业分类")
    private String industry;

    @ApiModelProperty("岗位分类")
    private String jobCategory;

    @TableField(exist = false)
    @ApiModelProperty("公司性质")
    private String companyNature;

    @TableField(exist = false)
    @ApiModelProperty("申请时间")
    private String applyTime;

    @ApiModelProperty("是否有视频介绍")
    private Integer isExplain;

    @ApiModelProperty("视频介绍URL")
    private String explainUrl;

    @ApiModelProperty("视频封面URL")
    private String cover;

    @TableField(exist = false)
    @ApiModelProperty("薪酬")
    private String compensation;

    @TableField(exist = false)
    @ApiModelProperty("信用代码")
    private String code;

    @ApiModelProperty("岗位类型 0疆内 1疆外")
    private String jobType;

    @ApiModelProperty("类型 0常规岗位 1就业见习岗位 2实习实训岗位 3社区实践岗位 4零工 对应字段字典position_type")
    private String type;

    @ApiModelProperty("工作地点")
    private String jobAddress;

    @ApiModelProperty("所属行政区划")
    private String regionCode;

    @ApiModelProperty("人员类型 1残疾人,2退伍军人")
    private String staffType;

    @TableField(exist = false)
    @ApiModelProperty("岗位联系人列表")
    private List<JobContact> jobContactList;

    @TableField(exist = false)
    @ApiModelProperty("附件列表")
    private List<File> filesList;

    @TableField(exist = false)
    @ApiModelProperty("公司信息")
    private CompanyVo companyVo;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("时间(足迹、投简历、收藏)")
    private String shareTime;

    @TableField(exist = false)
    @ApiModelProperty("申请人列表")
    private List<AppUser> applyUsers;

    @ApiModelProperty("是否通过 0通过,1不通过")
    private String pass;

    @ApiModelProperty("是否通过原因")
    private String passReason;

    @ApiModelProperty("状态 0上架，1下架")
    private String jobStatus;

    @ApiModelProperty("下架时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String downTime;
}
