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

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

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

/**
 * 行业对象 industry
 * @author LishunDong
 * @date 2024-11-12
 */
@Data
@ApiModel("行业")
@TableName(value = "industry")
public class Industry extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 行业id */
    @TableId(value = "industry_id",type = IdType.AUTO)
    @ApiModelProperty("行业id")
    private Long industryId;

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


    /** 行业名称 */
    @Excel(name = "行业名称")
    @ApiModelProperty("行业名称")
    private String industryName;

    /** 显示顺序 */
    @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<Industry> children = new ArrayList<Industry>();
}
