package com.ihaidou.entity.db.wechat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.annotations.UpdateTimestamp;
import javax.persistence.*;
import java.util.Date;
/**
* @Desc: 子菜单Url
* @Author HealerJean
* @Date 2018/6/1 下午5:45.
*/
@Entity
@Table(name="wechat_menu_url")
@Data
@Accessors(chain = true)
public class WeChatMenu {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "微信公众号 主键")
private Long wechatBusinessNoId ;
@ApiModelProperty(value = "菜单对应的eventkey")
private String eventkey ;
@ApiModelProperty(value = "view菜单对应的url或者是图片对应的url")
private String url;
@ApiModelProperty("菜单的名字")
private String name; //菜单名字
@ApiModelProperty(value = "包含图片和media以及返回菜单的文字内容")
private String value ; //菜单内容
@Temporal(TemporalType.TIMESTAMP)
@Column(columnDefinition="TIMESTAMP DEFAULT CURRENT_TIMESTAMP",insertable = true,updatable = false)
private Date cdate;
@UpdateTimestamp
@Temporal(TemporalType.TIMESTAMP)
private Date udate;
@ApiModelProperty(value = "从左到右顺序 , 1 2 3")
private Integer wOrder;
@ApiModelProperty(value = "从上到下顺序")
private Integer hOrder;
@ApiModelProperty(value = "是否底部菜单")
private boolean footMenu;
@ApiModelProperty(value = "菜单类型 1 url类型 ,2 回复文字类型,3 回复图片类型")
private Integer type ;
@ApiModelProperty(value = "1表示作为子菜单,2表示作为其他选项")
private Integer useType ;
@ApiModelProperty(value = "菜单是否删除")
private Integer status ;
}
/**
create table wechat_menu(
id BIGINT(20) not null auto_increment,
wechatBusinessNoId BIGINT(20) default null ,
url varchar(500) default null,
eventkey varchar(100) default null,
name varchar(50) default null,
value varchar(1000) default '',
wOrder int(11) default 0,
hOrder int(11) default 0,
footMenu int(11) default 0 ,
status int(11) default 0,
type int(11) default 0,
useType int(11) default 1 comment '1表示作为子菜单,2表示作为其他选项',
cdate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
udate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY key (id));
*/