package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 岗位表 sys_post
 *
 * @author ruoyi
 */
@ApiModel(value = "岗位管理对象")
public class SysPost extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("岗位ID")
    @Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
    private Long postId;

    @ApiModelProperty("岗位编码")
    @Excel(name = "岗位编码")
    private String postCode;

    @ApiModelProperty("岗位名称")
    @Excel(name = "岗位名称")
    private String postName;

    @ApiModelProperty("岗位排序")
    @Excel(name = "岗位排序")
    private Integer postSort;


    @ApiModelProperty("岗位状态0正常1停用")
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    @ApiModelProperty("部门ID")
    private Long deptId;


    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("部门状态0正常1停用")
    @Excel(name = "部门状态（0正常 1停用）")
    private String deptStatus;

    /**
     * 级别：0-不设置；1-经理；
     */
    @ApiModelProperty("级别0员工1经理2领导")
    private Integer postLevel;

    /**
     * 是否关键岗位：1-是；2-否；
     */
    @ApiModelProperty("是否关键岗位1时2否")
    private Integer importantType;



    /** 用户是否存在此岗位标识 默认不存在 */
    private boolean flag = false;




//    @ApiModelProperty("检查时间")
//    @TableField(value = "check_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date checkTime;

//    @ApiModelProperty("检查人员姓名")
//    @TableField(value = "check_user_name")
    private String checkUserName;

    public Date getCheckTime() {
        return checkTime;
    }

    public void setCheckTime(Date checkTime) {
        this.checkTime = checkTime;
    }

    public String getCheckUserName() {
        return checkUserName;
    }

    public void setCheckUserName(String checkUserName) {
        this.checkUserName = checkUserName;
    }

    public Long getPostId()
    {
        return postId;
    }

    public void setPostId(Long postId)
    {
        this.postId = postId;
    }

//    @NotBlank(message = "岗位编码不能为空")
//    @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符")
    public String getPostCode()
    {
        return postCode;
    }

    public void setPostCode(String postCode)
    {
        this.postCode = postCode;
    }

    @NotBlank(message = "岗位名称不能为空")
    @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符")
    public String getPostName()
    {
        return postName;
    }

    public void setPostName(String postName)
    {
        this.postName = postName;
    }

    @NotNull(message = "显示顺序不能为空")
    public Integer getPostSort()
    {
        return postSort;
    }

    public void setPostSort(Integer postSort)
    {
        this.postSort = postSort;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public boolean isFlag()
    {
        return flag;
    }

    public void setFlag(boolean flag)
    {
        this.flag = flag;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptStatus() {
        return deptStatus;
    }

    public void setDeptStatus(String deptStatus) {
        this.deptStatus = deptStatus;
    }

    public Integer getPostLevel() {
        return postLevel;
    }

    public void setPostLevel(Integer postLevel) {
        this.postLevel = postLevel;
    }

    public Integer getImportantType() {
        return importantType;
    }

    public void setImportantType(Integer importantType) {
        this.importantType = importantType;
    }

    @Override
    public String toString() {
        return "SysPost{" +
                "postId=" + postId +
                ", postCode='" + postCode + '\'' +
                ", postName='" + postName + '\'' +
                ", postSort=" + postSort +
                ", status='" + status + '\'' +
                ", deptId=" + deptId +
                ", deptName=" + deptName +
                ", deptStatus='" + deptStatus + '\'' +
                ", postLevel=" + postLevel +
                ", importantType=" + importantType +
                ", flag=" + flag +
                ", checkTime=" + checkTime +
                ", checkUserName='" + checkUserName + '\'' +
                "} " + super.toString();
    }
}
