package com.evobms.project.VehicleData.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.evobms.framework.aspectj.lang.annotation.Excel;
import com.evobms.framework.web.domain.BaseEntity;

/**
 * 整车数据对象 vehicle_data
 *
 * @author 田志阳
 * @date 2025-11-15
 */
public class VehicleData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 设备ID */
    @Excel(name = "设备ID")
    private String deviceId;

    /** 数据时间戳 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "数据时间戳", width = 30, dateFormat = "yyyy-MM-dd")
    private Date timestamp;

    /** 车辆状态 (1:启动 2:熄火 3:其他 254:异常 255:无效) */
    @Excel(name = "车辆状态 (1:启动 2:熄火 3:其他 254:异常 255:无效)")
    private Integer vehicleStatus;

    /** 充电状态 (1:停车充电 2:行驶充电 3:未充电 4:充电完成 254:异常 255:无效) */
    @Excel(name = "充电状态 (1:停车充电 2:行驶充电 3:未充电 4:充电完成 254:异常 255:无效)")
    private Integer chargingStatus;

    /** 运行模式 (1:纯电 2:混动 3:燃油 254:异常 255:无效) */
    @Excel(name = "运行模式 (1:纯电 2:混动 3:燃油 254:异常 255:无效)")
    private Integer operationMode;

    /** 车速(km/h) */
    @Excel(name = "车速(km/h)")
    private BigDecimal vehicleSpeed;

    /** 累计里程(km) */
    @Excel(name = "累计里程(km)")
    private BigDecimal totalMileage;

    /** 总电压(V) */
    @Excel(name = "总电压(V)")
    private BigDecimal totalVoltage;

    /** 总电流(A) */
    @Excel(name = "总电流(A)")
    private BigDecimal totalCurrent;

    /** SOC电量百分比(%) */
    @Excel(name = "SOC电量百分比(%)")
    private Integer soc;

    /** DC-DC状态 (1:工作 2:断开) */
    @Excel(name = "DC-DC状态 (1:工作 2:断开)")
    private Integer dcdcStatus;

    /** 档位 (0:空档 1-6:1-6档 13:倒档 14:自动D档 15:停车P档) */
    @Excel(name = "档位 (0:空档 1-6:1-6档 13:倒档 14:自动D档 15:停车P档)")
    private Integer gearPosition;

    /** 绝缘电阻(kΩ) */
    @Excel(name = "绝缘电阻(kΩ)")
    private Integer insulationResistance;

    /** 预留字段 */
    @Excel(name = "预留字段")
    private String reservedData;


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

    public Long getId()
    {
        return id;
    }

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

    public String getDeviceId()
    {
        return deviceId;
    }

    public void setTimestamp(Date timestamp)
    {
        this.timestamp = timestamp;
    }

    public Date getTimestamp()
    {
        return timestamp;
    }

    public void setVehicleStatus(Integer vehicleStatus)
    {
        this.vehicleStatus = vehicleStatus;
    }

    public Integer getVehicleStatus()
    {
        return vehicleStatus;
    }

    public void setChargingStatus(Integer chargingStatus)
    {
        this.chargingStatus = chargingStatus;
    }

    public Integer getChargingStatus()
    {
        return chargingStatus;
    }

    public void setOperationMode(Integer operationMode)
    {
        this.operationMode = operationMode;
    }

    public Integer getOperationMode()
    {
        return operationMode;
    }

    public void setVehicleSpeed(BigDecimal vehicleSpeed)
    {
        this.vehicleSpeed = vehicleSpeed;
    }

    public BigDecimal getVehicleSpeed()
    {
        return vehicleSpeed;
    }

    public void setTotalMileage(BigDecimal totalMileage)
    {
        this.totalMileage = totalMileage;
    }

    public BigDecimal getTotalMileage()
    {
        return totalMileage;
    }

    public void setTotalVoltage(BigDecimal totalVoltage)
    {
        this.totalVoltage = totalVoltage;
    }

    public BigDecimal getTotalVoltage()
    {
        return totalVoltage;
    }

    public void setTotalCurrent(BigDecimal totalCurrent)
    {
        this.totalCurrent = totalCurrent;
    }

    public BigDecimal getTotalCurrent()
    {
        return totalCurrent;
    }

    public void setSoc(Integer soc)
    {
        this.soc = soc;
    }

    public Integer getSoc()
    {
        return soc;
    }

    public void setDcdcStatus(Integer dcdcStatus)
    {
        this.dcdcStatus = dcdcStatus;
    }

    public Integer getDcdcStatus()
    {
        return dcdcStatus;
    }

    public void setGearPosition(Integer gearPosition)
    {
        this.gearPosition = gearPosition;
    }

    public Integer getGearPosition()
    {
        return gearPosition;
    }

    public void setInsulationResistance(Integer insulationResistance)
    {
        this.insulationResistance = insulationResistance;
    }

    public Integer getInsulationResistance()
    {
        return insulationResistance;
    }

    public void setReservedData(String reservedData)
    {
        this.reservedData = reservedData;
    }

    public String getReservedData()
    {
        return reservedData;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceId", getDeviceId())
            .append("timestamp", getTimestamp())
            .append("vehicleStatus", getVehicleStatus())
            .append("chargingStatus", getChargingStatus())
            .append("operationMode", getOperationMode())
            .append("vehicleSpeed", getVehicleSpeed())
            .append("totalMileage", getTotalMileage())
            .append("totalVoltage", getTotalVoltage())
            .append("totalCurrent", getTotalCurrent())
            .append("soc", getSoc())
            .append("dcdcStatus", getDcdcStatus())
            .append("gearPosition", getGearPosition())
            .append("insulationResistance", getInsulationResistance())
            .append("reservedData", getReservedData())
            .toString();
    }
}
