package com.usky.vpp.service.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

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

/**
 * 响应监测 - 响应记录（事件字段 + 邀约维度补充）
 */
@Data
public class DrMonitorRecordVO {

    /** 事件主键 */
    private Long id;
    /** 邀约主键（曲线查询入参） */
    private Long invitationId;
    private String eventId;
    private String eventName;
    private Long customerId;
    private String customerName;
    private Long siteId;
    private String siteName;
    private Integer responseType;
    /** 交易类型：1削峰 2填谷（邀约 transaction_type） */
    private Integer transactionType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    /** 响应截止时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime declareDeadline;

    /** 邀约范围 */
    private String inviteScope;

    /** 预估响应容量：邀约 estimated_response_capacity_kw */
    private BigDecimal estimatedResponseCapacityKw;

    /** 实际出清：邀约 actual_cleared_capacity_kw */
    private BigDecimal clearedCapacityKw;
    private String remark;
    private String attachmentUrl;
    private BigDecimal subsidyPrice;
    /** 下浮系数 */
    private BigDecimal floatingCoefficient;
    /** 0待参与 1已申报 2申报完成 3执行中 4已结束 5已取消 */
    private Integer eventStatus;
    private String rawPayload;
    private Integer tenantId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    private String createdBy;
    private String updatedBy;

    /** 预估完成率 = 预估响应容量 / 实际出清 */
    private BigDecimal estimatedCompletionRate;
    /** 是否达标：预估完成率 >= 100% */
    private Boolean qualified;
    /** 补贴金额预测（元）= 预估响应容量 × 时长(h) × 竞价价格 × 价格调整系数 */
    private BigDecimal estimatedSubsidyAmount;
}
