package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
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.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 岗位对象 job_title
 * @author Lishundong
 * @date 2024-11-12
 */
@Data
@ApiModel("岗位")
@TableName(value = "job_title")
public class JobTitle extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 岗位id */
    @TableId(value = "job_id",type = IdType.AUTO)
    @ApiModelProperty("岗位id")
    private Long jobId;

    /** 父id */
    @Excel(name = "父id")
    @ApiModelProperty("父id")
    private Long parentId;

    /** 岗位名称 */
    @Excel(name = "岗位名称")
    @ApiModelProperty("岗位名称")
    private String jobName;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @ApiModelProperty("显示顺序")
    private Long orderNum;

    /** 部门状态（0正常 1停用） */
    @Excel(name = "部门状态", readConverterExp = "0=正常,1=停用")
    @ApiModelProperty("部门状态（0正常 1停用）")
    private String status;
    @JsonIgnore
    @TableField(exist = false)
    private List<JobTitle> children = new ArrayList<JobTitle>();
}
