package cn.iocoder.yudao.module.system.dal.dataobject.biz;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseNoDeleteDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.util.List;

/**
 * 物资类别 DO
 */
@TableName("material_category")
@KeySequence("material_category_seq")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MaterialCategoryDO extends BaseNoDeleteDO {

    @TableId
    private Long id;

    /** 类别编号 */
    private String categoryNumber;

    /** 类别名称 */
    private String categoryName;

    /** 上级id */
    private Long superior;

    /** 机构/租户id */
    private Long tenantId;

    /**
     * 子节点（非表字段，树形结构使用）
     */
    @TableField(exist = false)
    private List<MaterialCategoryDO> childrenList;
}

