import {BaseQuery, BaseRequest, BaseResponse} from "@/types/base";

export enum MenuTypeEnum {
    DIRECTORY = 1,  // 目录
    MENU = 2,      // 菜单
    BUTTON = 3     // 按钮
}

export interface MenuQuery extends BaseQuery {
    name?: string;
    type?: MenuTypeEnum;
}

export interface MenuRequest extends BaseRequest {
    name: string;
    type: MenuTypeEnum;
    parentId?: number;
    path?: string;
    component?: string;
    permission?: string;
    icon?: string;
    sort: number;
    hidden: boolean;
}

export interface MenuResponse extends BaseResponse {
    name: string;
    type: MenuTypeEnum;
    parentId: number;
    path?: string;
    component?: string;
    permission?: string;
    icon?: string;
    sort: number;
    hidden: boolean;
    children?: MenuResponse[];
}