package com.dgtly.wxportal.domain;



import com.dgtly.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * H5磁贴表 wx_magnet
 *
 * @author dgtly
 */
public class WxMagnet extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 菜单ID */
    private Long magnetId;

    /** 菜单名称 */
    private String magnetName;


    /** 显示顺序 */
    private String orderNum;


    /** 用户类型 */
    private String userType;

    /** 磁贴URL */
    private String url;


    /** 菜单状态:0显示,1隐藏 */
    private String visible;

    /** 磁贴标记父结构磁贴名词*/
    private String fatherMagnet;

    /** 磁贴尺寸（S:小（1x1），M:中(2x1)，L：大(3Map  x1)） */
    private String magnetSize;

    /** 背景图片 */
    private String bgUrl;

    /**
     * 磁贴应用类型
     * 0：链接应用
     * 1：小程序应用
     * 2：内嵌应用
     */
    private String magnetType;

    /**
     * 小程序二维码url
     */
    private String appletQrUrl;

    private String isEncry;


    public Long getMagnetId()
    {
        return magnetId;
    }


    public void setMagnetId(Long magnetId)
    {
        this.magnetId = magnetId;
    }

    @NotBlank(message = "菜单名称不能为空")
    @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
    public String getMagnetName()
    {
        return magnetName;
    }

    public void setMagnetName(String magnetName)
    {
        this.magnetName = magnetName;
    }

    @NotBlank(message = "显示顺序不能为空")
    public String getOrderNum()
    {
        return orderNum;
    }

    public void setOrderNum(String orderNum)
    {
        this.orderNum = orderNum;
    }

    @Size(min = 0, max = 400, message = "请求地址不能超过400个字符")
    public String getUrl()
    {
        return url;
    }

    public void setUrl(String url)
    {
        this.url = url;
    }

    public String getVisible()
    {
        return visible;
    }

    public void setVisible(String visible)
    {
        this.visible = visible;
    }

    @Size(min = 0, max = 1, message = "权限标识长度不能超过100个字符")
    public String getMagnetSize()
    {
        return magnetSize;
    }

    public void setMagnetSize(String magnetSize)
    {
        this.magnetSize = magnetSize;
    }

    @Size(min = 0, max = 400, message = "请求图片地址不能超过400个字符")
    public String getBgUrl()
    {
        return bgUrl;
    }

    public void setBgUrl(String bgUrl)
    {
        this.bgUrl = bgUrl;
    }

    public String getMagnetType() {
        return magnetType;
    }

    public String getFatherMagnet() {
        return fatherMagnet;
    }

    public void setFatherMagnet(String fatherMagnet) {
        this.fatherMagnet = fatherMagnet;
    }

    public void setMagnetType(String magnetType) {
        this.magnetType = magnetType;
    }

    public String getAppletQrUrl() {
        return appletQrUrl;
    }

    public void setAppletQrUrl(String appletQrUrl) {
        this.appletQrUrl = appletQrUrl;
    }

    public String getIsEncry() {
        return isEncry;
    }

    public void setIsEncry(String isEncry) {
        this.isEncry = isEncry;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("magnetId", getMagnetId())
            .append("magnetName", getMagnetName())
            .append("orderNum", getOrderNum())
            .append("url", getUrl())
            .append("bgUrl", getBgUrl())
            .append("visible", getVisible())
            .append("magnetSize", getMagnetSize())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("magnetType", getMagnetType())
            .append("appletQrUrl", getAppletQrUrl())
            .append("", getIsEncry())
            .toString();
    }

}
