package com.ruoyi.biemo.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.biemo.elasticsearch.annotation.EsId;
import com.ruoyi.biemo.elasticsearch.annotation.FieldInfo;
import com.ruoyi.biemo.mongodb.bean.CreateTime;
import com.ruoyi.biemo.mongodb.bean.IgnoreColumn;
import com.ruoyi.biemo.mongodb.bean.UpdateTime;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;

import java.io.Serializable;


@Document(indexName = "category")
@org.springframework.data.mongodb.core.mapping.Document("category")
@Data
public class Category extends BiemoEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 本体主键
     */
    @EsId
    private String id;
    /**
     * 分类名称
     */
    @FieldInfo(type = "keyword",participle = 0)
    private String name;

    /**
     * 显示颜色
     */
    @FieldInfo(type = "keyword",participle = 0)
    private String color;

    /**
     * 图标名称
     */
    @FieldInfo(type = "keyword",participle = 0)
    private String icon;

    @FieldInfo(type = "keyword",participle = 0)
    private Integer isSync;

    /** 父菜单名称 */
    @FieldInfo(type = "keyword",participle = 0)
    private String parentName;

    /** 父菜单ID */
    @FieldInfo(type = "keyword",participle = 0)
    private String parentId;

    /** 显示顺序 */
    @FieldInfo(type = "keyword",participle = 0)
    private Integer orderNum;

//    /** 子类 */
//    @Transient
//    private List<?> children = new ArrayList<>();

}
