package com.zcxk.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * uims_menu
 * @author: WYY
 * @date 2020-10-26 16:15
 */
@Data
@TableName("uims_menu")
public class MenuEntity {

    private static final long serialVersionUID = 1L;

    /** 主键 */ 
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    /** 租户菜单ID */
    @TableField(exist =  false)
    @ApiModelProperty(value = "租户菜单ID")
    private Long tenantMenuId;

    /** 应用ID */
    @ApiModelProperty(value = "应用ID")
    private String appId;

    /** 应用方菜单ID */
    @ApiModelProperty(value = "应用方菜单ID")
    private Long thirdMenuId;

    /** 上级菜单ID */
    @ApiModelProperty(value = "上级菜单ID")
    private Long parentMenuId;

    /** 名称 */
    @ApiModelProperty(value = "名称")
    private String name;

    /** 图标 */
    @ApiModelProperty(value = "图标")
    private String menuImage;

    /** 权限标识 */
    @ApiModelProperty(value = "权限标识")
    private String permissionFlag;

    /** 链接路径 */
    @ApiModelProperty(value = "链接路径")
    private String linkPath;

    /** 序列 */
    @ApiModelProperty(value = "序列")
    private Long seq;

    /** 显示状态 */
    @ApiModelProperty(value = "显示状态")
    private Integer showState;

    /** 是否租户可见 */
    @ApiModelProperty(value = "是否租户可见")
    private Integer isTenant;

    /** 是否管理员可见 */
    @ApiModelProperty(value = "是否管理员可见")
    private Integer isAdmin;

    /** 创建者 */
    @ApiModelProperty(value = "创建者")
    private String createBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @NotNull(message = "参数值不能为空")
    @ApiModelProperty(value = "创建时间")
    private Date dateCreate;

    /** 更新者 */
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    /** dateUpdate */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @NotNull(message = "参数值不能为空")
    @ApiModelProperty(value = "修改时间")
    private Date dateUpdate;

    /** status */
    @ApiModelProperty(value = "启用状态")
    @TableLogic
    private Integer status;

    /** 备注 */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 租户标识
     */
    @ApiModelProperty(value = "租户标识")
    @JsonIgnore
    @TableField(exist = false)
    private String tenantId;

    @ApiModelProperty(value = "子类", position = 100)
    @TableField(exist = false)
    private List<MenuEntity> children;

}
