package com.hotent.portal.model;

import com.baomidou.mybatisplus.annotation.*;
import com.hotent.base.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 弹窗管理表
 *
 * @company 广州宏天软件股份有限公司
 * @author zengst
 * @since 2020-11-27
 */
@TableName("PORTAL_SYS_POPUP")
@ApiModel(value="PortalSysPopup对象", description="弹窗管理表")
public class Popup extends BaseModel<Popup> {

    public static final String DATA_TYPE_SQL = "sql";

    public static final String DATA_TYPE_SCRIPT = "script";

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "ID_", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "主题")
    @TableField("SUBJECT_")
    private String subject;

    @ApiModelProperty(value = "名称")
    @TableField(value = "NAME_")
    private String name;

    @ApiModelProperty(value = "别名")
    @TableField(value = "ALIAS_")
    private String alias;

    @ApiModelProperty(value = "数据源别名")
    @TableField("DATA_SOURCE_ALIAS_")
    private String dataSourceAlias;

    @ApiModelProperty(value = "排序")
    @TableField("ORDER_")
    private BigDecimal order;

    @ApiModelProperty(value = "是否启用")
    @TableField("IS_ENABLE_")
    private BigDecimal isEnable;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "CREATE_TIME_", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "跳转URL")
    @TableField("URL_")
    private String url;

    @ApiModelProperty(value = "弹窗方式")
    @TableField("POPUP_TYPE_")
    private String popupType;

    @ApiModelProperty(value = "对话框宽度")
    @TableField("DIALOG_WIDTH_")
    private BigDecimal dialogWidth;

    @ApiModelProperty(value = "对话框高度")
    @TableField("DIALOG_HEIGHT_")
    private BigDecimal dialogHeight;

    @ApiModelProperty(value = "SQL语句")
    @TableField("SQL_")
    private String sql;

    @ApiModelProperty(value = "描述")
    @TableField("DESC_")
    private String desc;

    @ApiModelProperty(value = "样式配置")
    @TableField("STYLE_CONTENT_")
    private String styleContent;

    @ApiModelProperty(value = "数据获取方式")
    @TableField("DATA_TYPE_")
    private String dataType;

    @ApiModelProperty(value = "groovy脚本")
    @TableField("SCRIPT_")
    private String script;

    @ApiModelProperty(value = "有效期起")
    @TableField("VALIDITY_START_")
    private LocalDateTime validityStart;

    @ApiModelProperty(value = "有效期止")
    @TableField("VALIDITY_END_")
    private LocalDateTime validityEnd;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public LocalDateTime getValidityStart() {
        return validityStart;
    }

    public void setValidityStart(LocalDateTime validityStart) {
        this.validityStart = validityStart;
    }

    public LocalDateTime getValidityEnd() {
        return validityEnd;
    }

    public void setValidityEnd(LocalDateTime validityEnd) {
        this.validityEnd = validityEnd;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getScript() {
        return script;
    }

    public void setScript(String script) {
        this.script = script;
    }

    public String getStyleContent() {
        return styleContent;
    }

    public void setStyleContent(String styleContent) {
        this.styleContent = styleContent;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }
    public String getDataSourceAlias() {
        return dataSourceAlias;
    }

    public void setDataSourceAlias(String dataSourceAlias) {
        this.dataSourceAlias = dataSourceAlias;
    }
    public BigDecimal getOrder() {
        return order;
    }

    public void setOrder(BigDecimal order) {
        this.order = order;
    }
    public BigDecimal getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(BigDecimal isEnable) {
        this.isEnable = isEnable;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getUrl() {
        return url;
    }

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

    public void setPopupType(String popupType) {
        this.popupType = popupType;
    }
    public BigDecimal getDialogWidth() {
        return dialogWidth;
    }

    public void setDialogWidth(BigDecimal dialogWidth) {
        this.dialogWidth = dialogWidth;
    }
    public BigDecimal getDialogHeight() {
        return dialogHeight;
    }

    public void setDialogHeight(BigDecimal dialogHeight) {
        this.dialogHeight = dialogHeight;
    }
    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }
    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    protected Serializable pkVal() {
        return null;
    }

    @Override
    public String toString() {
        return "Popup{" +
                "id='" + id + '\'' +
                ", subject='" + subject + '\'' +
                ", name='" + name + '\'' +
                ", alias='" + alias + '\'' +
                ", dataSourceAlias='" + dataSourceAlias + '\'' +
                ", order=" + order +
                ", isEnable=" + isEnable +
                ", createTime=" + createTime +
                ", url='" + url + '\'' +
                ", popupType='" + popupType + '\'' +
                ", dialogWidth=" + dialogWidth +
                ", dialogHeight=" + dialogHeight +
                ", sql='" + sql + '\'' +
                ", desc='" + desc + '\'' +
                ", styleContent='" + styleContent + '\'' +
                ", dataType='" + dataType + '\'' +
                ", script='" + script + '\'' +
                ", validityStart=" + validityStart +
                ", validityEnd=" + validityEnd +
                '}';
    }
}
