package com.ruoyi.analytics.domain;

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

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 仪表板组件对象 dc_dashboard_widget
 * 
 * @author ruoyi
 * @date 2025-12-19
 */
public class DashboardWidget extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 组件ID */
    private Long widgetId;

    /** 仪表板ID */
    @Excel(name = "仪表板ID")
    @NotBlank(message = "仪表板ID不能为空")
    @Size(max = 100, message = "仪表板ID长度不能超过100个字符")
    private String dashboardId;

    /** 组件名称 */
    @Excel(name = "组件名称")
    @NotBlank(message = "组件名称不能为空")
    @Size(max = 100, message = "组件名称长度不能超过100个字符")
    private String widgetName;

    /** 组件类型 */
    @Excel(name = "组件类型")
    @NotBlank(message = "组件类型不能为空")
    @Size(max = 50, message = "组件类型长度不能超过50个字符")
    private String widgetType;

    /** 数据源 */
    @Excel(name = "数据源")
    @NotBlank(message = "数据源不能为空")
    @Size(max = 100, message = "数据源长度不能超过100个字符")
    private String dataSource;

    /** 查询配置 */
    @Size(max = 2000, message = "查询配置长度不能超过2000个字符")
    private String queryConfig;

    /** 显示配置 */
    @Size(max = 2000, message = "显示配置长度不能超过2000个字符")
    private String displayConfig;

    /** 位置X */
    @Excel(name = "位置X")
    @NotNull(message = "位置X不能为空")
    private Integer positionX;

    /** 位置Y */
    @Excel(name = "位置Y")
    @NotNull(message = "位置Y不能为空")
    private Integer positionY;

    /** 宽度 */
    @Excel(name = "宽度")
    @NotNull(message = "宽度不能为空")
    private Integer width;

    /** 高度 */
    @Excel(name = "高度")
    @NotNull(message = "高度不能为空")
    private Integer height;

    /** 刷新间隔(秒) */
    @Excel(name = "刷新间隔")
    private Integer refreshInterval;

    /** 组件状态 */
    @Excel(name = "组件状态")
    @NotBlank(message = "组件状态不能为空")
    @Size(max = 50, message = "组件状态长度不能超过50个字符")
    private String widgetStatus;

    /** 用户ID */
    @Excel(name = "用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    public void setWidgetId(Long widgetId) 
    {
        this.widgetId = widgetId;
    }

    public Long getWidgetId() 
    {
        return widgetId;
    }
    public void setDashboardId(String dashboardId) 
    {
        this.dashboardId = dashboardId;
    }

    public String getDashboardId() 
    {
        return dashboardId;
    }
    public void setWidgetName(String widgetName) 
    {
        this.widgetName = widgetName;
    }

    public String getWidgetName() 
    {
        return widgetName;
    }
    public void setWidgetType(String widgetType) 
    {
        this.widgetType = widgetType;
    }

    public String getWidgetType() 
    {
        return widgetType;
    }
    public void setDataSource(String dataSource) 
    {
        this.dataSource = dataSource;
    }

    public String getDataSource() 
    {
        return dataSource;
    }
    public void setQueryConfig(String queryConfig) 
    {
        this.queryConfig = queryConfig;
    }

    public String getQueryConfig() 
    {
        return queryConfig;
    }
    public void setDisplayConfig(String displayConfig) 
    {
        this.displayConfig = displayConfig;
    }

    public String getDisplayConfig() 
    {
        return displayConfig;
    }
    public void setPositionX(Integer positionX) 
    {
        this.positionX = positionX;
    }

    public Integer getPositionX() 
    {
        return positionX;
    }
    public void setPositionY(Integer positionY) 
    {
        this.positionY = positionY;
    }

    public Integer getPositionY() 
    {
        return positionY;
    }
    public void setWidth(Integer width) 
    {
        this.width = width;
    }

    public Integer getWidth() 
    {
        return width;
    }
    public void setHeight(Integer height) 
    {
        this.height = height;
    }

    public Integer getHeight() 
    {
        return height;
    }
    public void setRefreshInterval(Integer refreshInterval) 
    {
        this.refreshInterval = refreshInterval;
    }

    public Integer getRefreshInterval() 
    {
        return refreshInterval;
    }
    public void setWidgetStatus(String widgetStatus) 
    {
        this.widgetStatus = widgetStatus;
    }

    public String getWidgetStatus() 
    {
        return widgetStatus;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("widgetId", getWidgetId())
            .append("dashboardId", getDashboardId())
            .append("widgetName", getWidgetName())
            .append("widgetType", getWidgetType())
            .append("dataSource", getDataSource())
            .append("queryConfig", getQueryConfig())
            .append("displayConfig", getDisplayConfig())
            .append("positionX", getPositionX())
            .append("positionY", getPositionY())
            .append("width", getWidth())
            .append("height", getHeight())
            .append("refreshInterval", getRefreshInterval())
            .append("widgetStatus", getWidgetStatus())
            .append("userId", getUserId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}