package com.ruoyi.web.work.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.web.work.domain.base.BaseData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.*;
import java.util.Date;

/**
 * @author lsw
 * @date 2024-06-07
 */
@Data
@TableName(value = "tb_position")
@Accessors(chain = true)
public class Position extends BaseData {
    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = "关联账号")
    private Long userId;

    @NotNull(message = "职位类型为空")
    @Min(value = 0, message = "类型 只能是 全职 或者 兼职")
    @Max(value = 1, message = "类型 只能是 全职 或者 兼职")
    @ApiModelProperty(value = "类型： 0全职 1兼职")
    private Integer type;

    @NotBlank(message = "职位名称不能为空")
    @Size(max = 10, message = "职位名称长度不能超过10个字符")
    @ApiModelProperty(value = "职位名称")
    private String title;

    @ApiModelProperty(value = "图片封面")
    private String pic;

    @NotBlank(message = "职位描述不能为空")
    @ApiModelProperty(value = "职位描述")
    private String contents;

    @NotNull(message = "职位分类不能为空")
    @ApiModelProperty(value = "职位分类id")
    private Long positionId;

    @NotBlank(message = "职位分类名称不能为空")
    @ApiModelProperty(value = "职位分类名称")
    private String positionName;

    @NotBlank(message = "经验要求不能为空")
    @ApiModelProperty(value = "经验要求")
    private String experience;

    @NotBlank(message = "薪资范围不能为空")
    @ApiModelProperty(value = "薪资范围")
    private String salary;

    @ApiModelProperty(value = "最小薪资")
    private Integer min;

    @ApiModelProperty(value = "最大薪资")
    private Integer max;

    @ApiModelProperty(value = "城市名称")
    private String cityName;

    @ApiModelProperty(value = "地区ancestors")
    private String ancestors;

    @ApiModelProperty(value = "地区名称")
    private String regionName;

    @ApiModelProperty(value = "地点名")
    private String location;

    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "楼层/单元室/门牌号")
    private String mph;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "维度")
    private String latitude;

    @ApiModelProperty(value = "职位状态:0=开启,1=关闭")
    private Integer state;

    @ApiModelProperty(value = "职位审核:0=待审核,1=审核通过，2审核不通过")
    private Integer audit;

    @ApiModelProperty(value = "是否推荐:0=否,1=是")
    private Integer recommend;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date startDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private Date endDate;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "审核备注")
    private String msg;

    /*******************查询条件*******************/
    @TableField(exist = false)
    private String enterpriseName;
}
