package com.test.test.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.test.common.annotation.Excel;
import com.test.common.core.domain.BaseEntity;

/**
 * 性能测试对象 performance_test
 *
 * @author test
 * @date 2025-04-14
 */
public class PerformanceTest extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 性能测试名称 */
    @Excel(name = "性能测试名称")
    private String performanceName;

    /** crontab表达式 */
    @Excel(name = "crontab表达式")
    private String crontab;

    /** 定时任务状态：0关闭，1开启，默认0 */
    @Excel(name = "定时任务状态：0关闭，1开启，默认0")
    private Integer crontabStatus;

    /** 并发线程数 */
    @Excel(name = "并发线程数")
    private Integer concurrentThreads;

    /** 在取样器错误后要执行的动作，1：继续；2：开始下一个线程轮询；3：停止线程；4：停止测试；5：立即停止测试 */
    @Excel(name = "在取样器错误后要执行的动作，1：继续；2：开始下一个线程轮询；3：停止线程；4：停止测试；5：立即停止测试")
    private Integer errorOperType;

    /** 执行方式，1：按持续时间；2：按迭代次数 */
    @Excel(name = "执行方式，1：按持续时间；2：按迭代次数")
    private Integer executeType;

    /** 多少秒内线程建立完成，默认0 */
    @Excel(name = "多少秒内线程建立完成，默认0")
    private Integer rampUpSeconds;

    /** 压测时长，时，默认0 */
    @Excel(name = "压测时长，时，默认0")
    private Integer pressureHour;

    /** 压测时长，分，默认0 */
    @Excel(name = "压测时长，分，默认0")
    private Integer pressureMinute;

    /** 压测时长，秒，默认0 */
    @Excel(name = "压测时长，秒，默认0")
    private Integer pressureSecond;

    /** 迭代次数，默认0 */
    @Excel(name = "迭代次数，默认0")
    private Integer loopCount;

    /** rps状态：0关闭，1开启，默认0 */
    @Excel(name = "rps状态：0关闭，1开启，默认0")
    private Integer rpsStatus;

    /** 每分钟rps上限数，默认0 */
    @Excel(name = "每分钟rps上限数，默认0")
    private Integer rpsLimit;

    /** 是否已执行完成状态：0否，1是，默认0 */
    @Excel(name = "是否已执行完成状态：0否，1是，默认0")
    private String status;

    /** 0,正常,1,删除 */
    private String delFlag;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setPerformanceName(String performanceName)
    {
        this.performanceName = performanceName;
    }

    public String getPerformanceName()
    {
        return performanceName;
    }
    public void setCrontab(String crontab)
    {
        this.crontab = crontab;
    }

    public String getCrontab()
    {
        return crontab;
    }
    public void setCrontabStatus(Integer crontabStatus)
    {
        this.crontabStatus = crontabStatus;
    }

    public Integer getCrontabStatus()
    {
        return crontabStatus;
    }
    public void setConcurrentThreads(Integer concurrentThreads)
    {
        this.concurrentThreads = concurrentThreads;
    }

    public Integer getConcurrentThreads()
    {
        return concurrentThreads;
    }
    public void setErrorOperType(Integer errorOperType)
    {
        this.errorOperType = errorOperType;
    }

    public Integer getErrorOperType()
    {
        return errorOperType;
    }
    public void setExecuteType(Integer executeType)
    {
        this.executeType = executeType;
    }

    public Integer getExecuteType()
    {
        return executeType;
    }
    public void setRampUpSeconds(Integer rampUpSeconds)
    {
        this.rampUpSeconds = rampUpSeconds;
    }

    public Integer getRampUpSeconds()
    {
        return rampUpSeconds;
    }
    public void setPressureHour(Integer pressureHour)
    {
        this.pressureHour = pressureHour;
    }

    public Integer getPressureHour()
    {
        return pressureHour;
    }
    public void setPressureMinute(Integer pressureMinute)
    {
        this.pressureMinute = pressureMinute;
    }

    public Integer getPressureMinute()
    {
        return pressureMinute;
    }
    public void setPressureSecond(Integer pressureSecond)
    {
        this.pressureSecond = pressureSecond;
    }

    public Integer getPressureSecond()
    {
        return pressureSecond;
    }
    public void setLoopCount(Integer loopCount)
    {
        this.loopCount = loopCount;
    }

    public Integer getLoopCount()
    {
        return loopCount;
    }
    public void setRpsStatus(Integer rpsStatus)
    {
        this.rpsStatus = rpsStatus;
    }

    public Integer getRpsStatus()
    {
        return rpsStatus;
    }
    public void setRpsLimit(Integer rpsLimit)
    {
        this.rpsLimit = rpsLimit;
    }

    public Integer getRpsLimit()
    {
        return rpsLimit;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("performanceName", getPerformanceName())
                .append("crontab", getCrontab())
                .append("crontabStatus", getCrontabStatus())
                .append("concurrentThreads", getConcurrentThreads())
                .append("errorOperType", getErrorOperType())
                .append("executeType", getExecuteType())
                .append("rampUpSeconds", getRampUpSeconds())
                .append("pressureHour", getPressureHour())
                .append("pressureMinute", getPressureMinute())
                .append("pressureSecond", getPressureSecond())
                .append("loopCount", getLoopCount())
                .append("rpsStatus", getRpsStatus())
                .append("rpsLimit", getRpsLimit())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .toString();
    }
}