package com.fuyuanshen.equipment.domain;

import com.fuyuanshen.common.tenant.core.TenantEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serial;

/**
 * 设备充放电记录对象 device_charge_discharge
 *
 * @author Lion Li
 * @date 2025-08-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("device_charge_discharge")
public class DeviceChargeDischarge extends TenantEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录唯一标识
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 设备唯一标识
     */
    private String deviceId;

    /**
     * 操作类型: 0 charge-充电, 1 discharge-放电
     */
    private Long operationType;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 起始电量百分比(0-100)
     */
    private Long initialSoc;

    /**
     * 结束电量百分比(0-100)
     */
    private Long finalSoc;

    /**
     * 充放电量(kWh)
     */
    private Long energyKwh;

    /**
     * 设备额定功率(kW)
     */
    private Long powerRating;

    /**
     * 电压(V)
     */
    private Long voltage;

    /**
     * 电流(A)
     */
    private Long current;

    /**
     * 温度(℃)
     */
    private Long temperature;

    /**
     * 当前状态
     */
    private Long status;

    /**
     * 错误代码
     */
    private String errorCode;

    /**
     * 记录创建时间
     */
    private Date createdAt;

    /**
     * 记录更新时间
     */
    private Date updatedAt;


}
