package com.chushang.system.entity.po;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.chushang.common.mybatis.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serial;

/**
 * 岗位表 sys_post
 *
 * @author ruoyi
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_post")
public class SysPost extends BaseEntity
{
    @Serial
    private static final long serialVersionUID = 1L;

    /** 岗位序号 */
    @TableId(value = "post_id", type = IdType.AUTO)
    @ExcelProperty(value = "岗位序号", index = 0)
    private Long postId;

    /** 岗位编码 */
    @ExcelProperty(value = "岗位编码", index = 1)
    private String postCode;

    /** 岗位名称 */
    @ExcelProperty(value = "岗位名称", index = 2)
    private String postName;

    /** 岗位排序 */
    @ExcelProperty(value = "岗位排序", index = 3)
    private Integer postSort;

    /** 状态（1正常 0停用） */
    @ExcelProperty(value = "状态", index = 4)
    private Boolean status;

    /**
     * 创建人
     */
    @TableField(
            value = "create_by",
            updateStrategy = FieldStrategy.NEVER
    )
    @ExcelProperty(value = "创建人", index = 4)
    protected String createBy;
    /**
     * 修改人
     */
    @TableField(
            value = "update_by",
            insertStrategy = FieldStrategy.NEVER
    )
    @ExcelProperty(value = "修改人", index = 5)
    protected String updateBy;

    /** 用户是否存在此岗位标识 默认不存在 */
    @TableField(exist = false)
    private boolean flag = false;
    /**
     * 不同 部门 岗位隔离
     */
    @ExcelProperty(value = "状态", index = 6)
    private Long deptId;
}
