package com.ruoyi.framework.domain;

import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

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

/**
 * 部门数据隔离性能监控指标对象
 * 
 * @author ruoyi
 * @date 2025-01-12
 */
public class DepartmentDataPerformanceMetrics extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 监控ID */
    private Long metricsId;

    /** 监控时间 */
    @Excel(name = "监控时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "监控时间不能为空")
    private Date monitorTime;

    /** 表名 */
    @Excel(name = "表名")
    @NotNull(message = "表名不能为空")
    private String tableName;

    /** SQL操作类型 */
    @Excel(name = "SQL操作类型")
    @NotNull(message = "SQL操作类型不能为空")
    private String operationType;

    /** 查询执行时间(毫秒) */
    @Excel(name = "查询执行时间(毫秒)")
    @DecimalMin(value = "0.0", message = "执行时间不能为负数")
    private BigDecimal executionTime;

    /** 是否使用了部门索引 */
    @Excel(name = "是否使用了部门索引")
    private Boolean usedDeptIndex;

    /** 索引名称 */
    @Excel(name = "索引名称")
    private String indexName;

    /** 扫描行数 */
    @Excel(name = "扫描行数")
    @DecimalMin(value = "0", message = "扫描行数不能为负数")
    private Long rowsScanned;

    /** 返回行数 */
    @Excel(name = "返回行数")
    @DecimalMin(value = "0", message = "返回行数不能为负数")
    private Long rowsReturned;

    /** 部门ID */
    @Excel(name = "部门ID")
    private Long deptId;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 是否超级管理员 */
    @Excel(name = "是否超级管理员")
    private Boolean isSuperAdmin;

    /** SQL语句(截取前500字符) */
    @Excel(name = "SQL语句")
    private String sqlStatement;

    /** 查询计划成本 */
    @Excel(name = "查询计划成本")
    @DecimalMin(value = "0.0", message = "查询计划成本不能为负数")
    private BigDecimal queryCost;

    /** 性能等级 */
    @Excel(name = "性能等级")
    private String performanceLevel;

    /** 告警标识 */
    @Excel(name = "告警标识")
    private Boolean alertFlag;

    /** 备注信息 */
    @Excel(name = "备注信息")
    private String remarks;

    public void setMetricsId(Long metricsId) 
    {
        this.metricsId = metricsId;
    }

    public Long getMetricsId() 
    {
        return metricsId;
    }

    public void setMonitorTime(Date monitorTime) 
    {
        this.monitorTime = monitorTime;
    }

    public Date getMonitorTime() 
    {
        return monitorTime;
    }

    public void setTableName(String tableName) 
    {
        this.tableName = tableName;
    }

    public String getTableName() 
    {
        return tableName;
    }

    public void setOperationType(String operationType) 
    {
        this.operationType = operationType;
    }

    public String getOperationType() 
    {
        return operationType;
    }

    public void setExecutionTime(BigDecimal executionTime) 
    {
        this.executionTime = executionTime;
    }

    public BigDecimal getExecutionTime() 
    {
        return executionTime;
    }

    public void setUsedDeptIndex(Boolean usedDeptIndex) 
    {
        this.usedDeptIndex = usedDeptIndex;
    }

    public Boolean getUsedDeptIndex() 
    {
        return usedDeptIndex;
    }

    public void setIndexName(String indexName) 
    {
        this.indexName = indexName;
    }

    public String getIndexName() 
    {
        return indexName;
    }

    public void setRowsScanned(Long rowsScanned) 
    {
        this.rowsScanned = rowsScanned;
    }

    public Long getRowsScanned() 
    {
        return rowsScanned;
    }

    public void setRowsReturned(Long rowsReturned) 
    {
        this.rowsReturned = rowsReturned;
    }

    public Long getRowsReturned() 
    {
        return rowsReturned;
    }

    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setIsSuperAdmin(Boolean isSuperAdmin) 
    {
        this.isSuperAdmin = isSuperAdmin;
    }

    public Boolean getIsSuperAdmin() 
    {
        return isSuperAdmin;
    }

    public void setSqlStatement(String sqlStatement) 
    {
        this.sqlStatement = sqlStatement;
    }

    public String getSqlStatement() 
    {
        return sqlStatement;
    }

    public void setQueryCost(BigDecimal queryCost) 
    {
        this.queryCost = queryCost;
    }

    public BigDecimal getQueryCost() 
    {
        return queryCost;
    }

    public void setPerformanceLevel(String performanceLevel) 
    {
        this.performanceLevel = performanceLevel;
    }

    public String getPerformanceLevel() 
    {
        return performanceLevel;
    }

    public void setAlertFlag(Boolean alertFlag) 
    {
        this.alertFlag = alertFlag;
    }

    public Boolean getAlertFlag() 
    {
        return alertFlag;
    }

    public void setRemarks(String remarks) 
    {
        this.remarks = remarks;
    }

    public String getRemarks() 
    {
        return remarks;
    }

    @Override
    public String toString() {
        return "DepartmentDataPerformanceMetrics{" +
                "metricsId=" + metricsId +
                ", monitorTime=" + monitorTime +
                ", tableName='" + tableName + '\'' +
                ", operationType='" + operationType + '\'' +
                ", executionTime=" + executionTime +
                ", usedDeptIndex=" + usedDeptIndex +
                ", indexName='" + indexName + '\'' +
                ", rowsScanned=" + rowsScanned +
                ", rowsReturned=" + rowsReturned +
                ", deptId=" + deptId +
                ", username='" + username + '\'' +
                ", isSuperAdmin=" + isSuperAdmin +
                ", sqlStatement='" + sqlStatement + '\'' +
                ", queryCost=" + queryCost +
                ", performanceLevel='" + performanceLevel + '\'' +
                ", alertFlag=" + alertFlag +
                ", remarks='" + remarks + '\'' +
                '}';
    }
}