package com.red.circle.console.app.dto.cmd.admin;

import com.red.circle.framework.core.dto.CommonCommand;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 菜单.
 *
 * @author pengliang on 2023/5/12
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class MenuCmd extends CommonCommand {

  private static final long serialVersionUID = 1L;

  /**
   * 菜单id.
   */
  @NotNull(groups = MenuCmd.Update.class, message = "id不可为空")
  private Integer id;

  /**
   * 父菜单ID，一级菜单为0.
   */
  @NotNull(groups = MenuCmd.Create.class, message = "父菜单不能为空")
  private Integer parentId;

  /**
   * 菜单名称.
   */
  @NotBlank(groups = MenuCmd.Create.class, message = "菜单名称不能为空")
  private String menuName;

  /**
   * 路径.
   */
  private String path;

  /**
   * 路由.
   */
  private String router;

  /**
   * 类型:1:目录,2:菜单,3:按钮.
   */
  @NotNull(groups = MenuCmd.Create.class, message = "类型不能为空")
  private Integer menuType;

  /**
   * 菜单图标.
   */
  private String icon;

  /**
   * 别名.
   */
  private String alias;

  /**
   * 权重序号.
   */
  private Integer sort;

  /**
   * 状态:0：禁用 1：正常.
   */
  @NotNull(groups = {MenuCmd.Create.class}, message = "状态不能为空")
  private Integer status;

  /**
   * 关联资源ID.
   */
  private List<String> resourceIds;

  public interface Create {

  }

  public interface Update {

  }


}
