package com.zsElectric.boot.business.model.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 小程序电站详情视图对象
 *
 * @author system
 * @since 2025-12-17
 */
@Getter
@Setter
@Schema(description = "小程序电站详情视图对象")
public class AppletStationDetailVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "站点ID")
    private Long stationId;

    @Schema(description = "站点名称")
    private String stationName;

    @Schema(description = "提示语/标签（如：充电减免2小时停车费，超出部分按每小时3元计费）")
    private String tips;

    @Schema(description = "距离（km）")
    private BigDecimal distance;

    @Schema(description = "详细地址")
    private String address;

    @Schema(description = "站点图片列表(JSON数组)")
    private String pictures;

    // ========== 费用信息 ==========

    @Schema(description = "当前价（元/度）")
    private BigDecimal currentPrice;

    @Schema(description = "当前时段（如：峰10:00-13:00）")
    private String currentPeriod;

    @Schema(description = "企业专享价（元/度）")
    private BigDecimal enterprisePrice;

    @Schema(description = "原价/划线价（元/度）")
    private BigDecimal originalPrice;

    @Schema(description = "单笔预计省（元）")
    private BigDecimal estimatedSaving;

    @Schema(description = "是否显示特惠价标签")
    private Boolean showSpecialPriceTag;

    @Schema(description = "是否企业用户")
    private Boolean firmUser;

    // ========== 充电终端统计 ==========

    @Schema(description = "空闲终端数")
    private Integer idleCount;

    @Schema(description = "占用终端数")
    private Integer occupiedCount;

    @Schema(description = "离线终端数")
    private Integer offlineCount;

    @Schema(description = "充电终端列表")
    private List<ConnectorInfoVO> connectorList;

    // ========== 电站信息 ==========

    @Schema(description = "营业时间（如：周一至周日 00:00-24:00）")
    private String businessHours;

    @Schema(description = "服务提供方")
    private String serviceProvider;

    @Schema(description = "发票提供方")
    private String invoiceProvider;

    @Schema(description = "客服热线")
    private String customerServiceHotline;

    /**
     * 充电终端信息
     */
    @Getter
    @Setter
    @Schema(description = "充电终端信息")
    public static class ConnectorInfoVO implements Serializable {

        @Serial
        private static final long serialVersionUID = 1L;
        @Schema(description = "充电终端ID")
        private Long connectorId;

        @Schema(description = "终端名称（如：101号直流充电桩）")
        private String connectorName;

        @Schema(description = "设备分类（如：直流设备）")
        private String equipmentType;

        @Schema(description = "终端编码")
        private String connectorCode;

        @Schema(description = "状态：0-离线 1-空闲 2-占用")
        private Integer status;

        @Schema(description = "状态名称")
        private String statusName;
    }
}
