package com.ruoyi.web.work.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author lsw
 * @date 2024-06-07
 */
@Data
@Accessors(chain = true)
public class PositionDto {

    private Long id;

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

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

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

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

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

    @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 tags;

    @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;

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

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

}
