package com.miaxis.wx.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.miaxis.common.core.domain.BaseBusinessEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 微信公众号菜单对象 wx_menu
 * @author wwl
 * @version 1.0
 * @date 2021/10/26 10:06
 */
@Data
@TableName("wx_menu")
@ApiModel(value = "WxMenu", description = "微信公众号菜单对象 wx_menu")
public class WxMenu extends BaseBusinessEntity {

    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value = "id")
    @ApiModelProperty(value = "主键")
    private Long id;

    @TableField("parent_id")
    @ApiModelProperty(value = "父节点")
    private Integer parentId;

    @TableField("type")
    @ApiModelProperty(value = "菜单的响应动作类型，view表示网页类型，click表示点击类型，miniprogram表示小程序类型")
    private String type;

    @TableField("menu_name")
    @ApiModelProperty(value = "菜单标题")
    private String menuName;

    @TableField("click_key")
    @ApiModelProperty(value = "click等点击类型必须,菜单KEY值，用于消息接口推送，不超过128字节")
    private String clickKey;

    @TableField("url")
    @ApiModelProperty(value = "view、miniprogram类型必须,网页 链接，用户点击菜单可打开链接，不超过1024字节。 type为miniprogram时，不支持小程序的老版本客户端将打开本url。")
    private String url;

    @TableField("media_id")
    @ApiModelProperty(value = "media_id类型和view_limited类型必须,调用新增永久素材接口返回的合法media_id")
    private String mediaId;

    @TableField("appid")
    @ApiModelProperty(value = "miniprogram类型必须，小程序的appid（仅认证公众号可配置）")
    private String appid;

    @TableField("page_path")
    @ApiModelProperty(value = "miniprogram类型必须，小程序的页面路径")
    private String pagePath;

    @TableField("article_id")
    @ApiModelProperty(value = "发布后获得的合法 article_id")
    private String articleId;

    @TableField("sort")
    @ApiModelProperty(value = "排序")
    private Integer sort;

}
