package com.pwt.netty.message2;

import lombok.Data;

import java.util.Objects;

@Data
public class BatteryInfo extends BaseData{

    /**
     * 电池仓Id
     */
    private String holderId;

    private String id;

    public BatteryInfo(String holderId) {
        this.holderId = holderId;
    }

    public String getId() {
        return holderId;
    }

    /**
     * 电池类型
     */
    private String batteryType;

    /**
     * 电池厂家
     */
    private String batteryFactory;

    /**
     * 电池组序列号
     */
    private String batterySn;

    /**
     * 额定容量
     */
    private Double ratedCapacity;

    /**
     * 额定电压
     */
    private Double ratedVoltage;


    /**
     * 系统总容量
     */
    private Double totalCapacity;

    /**
     * 插枪充电次数
     */
    private Integer chargeCount1;

    /**
     * 换电充电次数
     */
    private Integer chargeCount2;

    /**
     * 电池总电压
     */
    private Double batteryTotalVoltage;

    /**
     * 电池剩余容量
     */
    private Double residualEnergy;

    /**
     * 最高充电电压
     */
    private Double maxChargeVoltage;

    private Boolean isDelete;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BatteryInfo that = (BatteryInfo) o;
        return holderId.equals(that.holderId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(holderId);
    }
}
