package com.zsElectric.boot.charging.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 第三方充电状态推送记录实体类
 *
 * @author system
 * @since 2025-12-18
 */
@Data
@Accessors(chain = true)
@TableName("third_party_charge_status")
@Schema(description = "第三方充电状态推送记录")
public class ThirdPartyChargeStatus {

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "充电订单号")
    @TableField("start_charge_seq")
    private String startChargeSeq;

    @Schema(description = "充电接口ID")
    @TableField("connector_id")
    private String connectorId;

    @Schema(description = "接口状态：0-离网,1-空闲,2-占用(未充电),3-占用(充电中),4-占用(预约锁定),255-故障")
    @TableField("connector_status")
    private Integer connectorStatus;

    @Schema(description = "订单状态：1-启动中,2-充电中,3-停止中,4-已结束,5-未知")
    @TableField("start_charge_seq_stat")
    private Integer startChargeSeqStat;

    @Schema(description = "开始充电时间")
    @TableField("start_time")
    private LocalDateTime startTime;

    @Schema(description = "结束充电时间(实时推送为当前采样时间)")
    @TableField("end_time")
    private LocalDateTime endTime;

    @Schema(description = "累计充电量(度)")
    @TableField("total_power")
    private BigDecimal totalPower;

    @Schema(description = "累计总金额(元)")
    @TableField("total_money")
    private BigDecimal totalMoney;

    @Schema(description = "累计电费(元)")
    @TableField("elec_money")
    private BigDecimal elecMoney;

    @Schema(description = "累计服务费(元)")
    @TableField("service_money")
    private BigDecimal serviceMoney;

    @Schema(description = "电池剩余电量SOC(%)")
    @TableField("soc")
    private Integer soc;

    @Schema(description = "A相电压(V)")
    @TableField("voltage_a")
    private BigDecimal voltageA;

    @Schema(description = "B相电压(V)")
    @TableField("voltage_b")
    private BigDecimal voltageB;

    @Schema(description = "C相电压(V)")
    @TableField("voltage_c")
    private BigDecimal voltageC;

    @Schema(description = "A相电流(A)")
    @TableField("current_a")
    private BigDecimal currentA;

    @Schema(description = "B相电流(A)")
    @TableField("current_b")
    private BigDecimal currentB;

    @Schema(description = "C相电流(A)")
    @TableField("current_c")
    private BigDecimal currentC;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Schema(description = "删除标识(0-未删除,1-已删除)")
    @TableLogic
    @TableField("deleted")
    private Integer deleted;
}
