package com.app.dto.platform;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 响应菜单dto
 *
 */
@ApiModel("响应菜单dto")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseMenuDto {

    @ApiModelProperty("标识")
    private String id;

    @ApiModelProperty("父级")
    private String parentId;

    @ApiModelProperty("菜单类型")
    private String resourceType;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("是否外链菜单")
    private Boolean link;

    @ApiModelProperty("是否缓存")
    private Boolean cache;

    @ApiModelProperty("是否显示")
    private Boolean hidden;

    @ApiModelProperty("菜单标题")
    private String name;

    @ApiModelProperty("权限标识")
    private String permission;

    @ApiModelProperty("路由地址")
    private String path;

    @ApiModelProperty("组件名")
    private String componentName;

    @ApiModelProperty("组件路径")
    private String componentPath;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("备注")
    private Integer remarks;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateAt;

    @ApiModelProperty("是否有子节点")
    private Boolean hasChildren;

}
