package com.xzzn.ems.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzzn.common.annotation.Excel;
import com.xzzn.common.core.domain.BaseEntity;

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

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

/**
 * 策略运行日志对象 ems_strategy_log
 *
 * @author xzzn
 * @date 2025-12-26
 */
public class EmsStrategyLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 策略ID */
    @Excel(name = "策略ID")
    private Long strategyId;

    /** 模版id */
    @Excel(name = "模版id")
    private String templateId;

    /** 站点id */
    @Excel(name = "站点id")
    private String siteId;

    /** 设备唯一标识符 */
    @Excel(name = "设备唯一标识符")
    private String deviceId;

    /** 开始时间 */
    @JsonFormat(pattern = "HH:mm")
    @Excel(name = "开始时间", width = 30, dateFormat = "HH:mm")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "HH:mm")
    @Excel(name = "结束时间", width = 30, dateFormat = "HH:mm")
    private Date endTime;

    /** 功率 (kW) */
    @Excel(name = "功率 (kW)")
    private BigDecimal chargeDischargePower;

    /** 充电状态，如“1-充电”、“2-待机”、“3-放电” */
    @Excel(name = "充电状态，如“1-充电”、“2-待机”、“3-放电”")
    private String chargeStatus;

    /** 执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date executionDate;

    /** 防逆流， 1-是、0-否 */
    @Excel(name = "防逆流， 1-是、0-否")
    private Integer antiReverse;

    /** PCS降功率类型 */
    @Excel(name = "PCS降功率类型，0-降低功率、1-增加功率")
    private Integer powerDownType;

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

    public Long getId() 
    {
        return id;
    }

    public void setStrategyId(Long strategyId) 
    {
        this.strategyId = strategyId;
    }

    public Long getStrategyId() 
    {
        return strategyId;
    }

    public void setTemplateId(String templateId) 
    {
        this.templateId = templateId;
    }

    public String getTemplateId() 
    {
        return templateId;
    }

    public void setSiteId(String siteId) 
    {
        this.siteId = siteId;
    }

    public String getSiteId() 
    {
        return siteId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setChargeDischargePower(BigDecimal chargeDischargePower) 
    {
        this.chargeDischargePower = chargeDischargePower;
    }

    public BigDecimal getChargeDischargePower() 
    {
        return chargeDischargePower;
    }

    public void setChargeStatus(String chargeStatus) 
    {
        this.chargeStatus = chargeStatus;
    }

    public String getChargeStatus() 
    {
        return chargeStatus;
    }

    public void setExecutionDate(Date executionDate) 
    {
        this.executionDate = executionDate;
    }

    public Date getExecutionDate() 
    {
        return executionDate;
    }

    public Integer getAntiReverse() {
        return antiReverse;
    }

    public void setAntiReverse(Integer antiReverse) {
        this.antiReverse = antiReverse;
    }

    public Integer getPowerDownType() {
        return powerDownType;
    }

    public void setPowerDownType(Integer powerDownType) {
        this.powerDownType = powerDownType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("strategyId", getStrategyId())
            .append("templateId", getTemplateId())
            .append("siteId", getSiteId())
            .append("deviceId", getDeviceId())
            .append("antiReverse", getAntiReverse())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("chargeDischargePower", getChargeDischargePower())
            .append("chargeStatus", getChargeStatus())
            .append("executionDate", getExecutionDate())
            .append("antiReverse", getAntiReverse())
            .append("powerDownType", getPowerDownType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
