package com.xunhong.erp.turbo.api.rbac.dto.vo;

import com.alibaba.cola.dto.DTO;
import com.xunhong.erp.turbo.api.rbac.dto.enums.MenuTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author shenyifei
 */
@Data
@Schema(title = "菜单")
@EqualsAndHashCode(callSuper = true)
public class MenuVO extends DTO {

	/**
	 * 菜单id
	 */
	@Schema(title = "菜单id", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	private Long menuId;

	/**
	 * 菜单路径
	 */
	@Schema(title = "菜单路径", requiredMode = Schema.RequiredMode.REQUIRED)
	private String path;
	/**
	 * 菜单路径
	 */
	@Schema(title = "组件", requiredMode = Schema.RequiredMode.REQUIRED)
	private String component;

	/**
	 * 菜单名称
	 */
	@Schema(title = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED)
	private String name;

	/**
	 * 父菜单id
	 */
	@Schema(title = "父菜单id", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	private Long pid;

	/**
	 * 排序
	 */
	@Schema(title = "排序", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	private BigDecimal sort;

	/**
	 * 菜单类型
	 */
	@Schema(title = "菜单类型", requiredMode = Schema.RequiredMode.REQUIRED)
	private MenuTypeEnum type;

	/**
	 * 平台id
	 */
	@Schema(title = "平台id", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	private Long platformId;

	/**
	 * display
	 */
	@Schema(title = "是否隐藏", requiredMode = Schema.RequiredMode.REQUIRED)
	private Boolean hideInMenu;

	/**
	 * 子菜单
	 */
	@Schema(title = "子菜单")
	private List<MenuVO> routes;

	/**
	 * 权限id
	 */
	@Schema(title = "权限id", requiredMode = Schema.RequiredMode.REQUIRED)
	private Long permissionId;

	/**
	 * 菜单图标
	 */
	@Schema(title = "菜单图标")
	private String icon;

	/**
	 * 图标颜色
	 */
	@Schema(title = "图标颜色")
	private String iconColor;

	/**
	 * 背景颜色类名
	 */
	@Schema(title = "背景颜色类名")
	private String bgColorClass;

	/**
	 * 创建时间
	 */
	@Schema(title = "创建时间")
	private LocalDateTime createdAt;
}