package thyyxxk.webserver.entity.settings;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

@Data
@TableName(value = "t_intergration_menu")
public class IntergrationMenu implements Serializable {

    private static final long serialVersionUID = 8746238221084815528L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO, value = "id")
    private Integer id;

    /**
     * type
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * path
     */
    @TableField(value = "path")
    private String path;

    /**
     * icon
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * name
     */
    @TableField(value = "name")
    private String name;

    /**
     * parentId
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * metaTitle
     */
    @TableField(value = "meta_title")
    private String metaTitle;

    /**
     * metaHideTabs
     */
    @TableField(value = "meta_hide_tabs")
    private Boolean metaHideTabs;

    /**
     * metaPassRule
     */
    @TableField(value = "meta_pass_rule")
    private Boolean metaPassRule;

    /**
     * metaPassRule
     */
    @TableField(value = "meta_show_menu")
    private Boolean metaShowMenu;

    /**
     * sort
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * component
     */
    @TableField(value = "component")
    private String component;

    /**
     * redirect
     */
    @TableField(value = "redirect")
    private String redirect;

    /**
     * pathParams
     */
    @TableField(value = "path_params")
    private String pathParams;


    /**
     * 需要使用卡片main
     */
    @TableField(value = "main_card")
    private Boolean mainCard;

    /**
     * 页面超出滚动
     */
    @TableField(value = "main_overflow_auto")
    private Boolean mainOverflowAuto;

    @TableField(value = "meta_link")
    private Boolean metaLink;

    @TableField(value = "fullscreen")
    private Boolean fullscreen;

    /**
     * 前端专用完整路径
     */
    @TableField(exist = false)
    private String completePath;

    @TableField(exist = false)
    private List<Integer> cascaders = new ArrayList<>();

    @TableField(exist = false)
    private List<IntergrationMenu> children;


    public Boolean getMetaNeedToken() {
        return Boolean.TRUE;
    }

}
