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

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 充电订单信息表单对象
 *
 * @author zsElectric
 * @since 2025-12-17 19:13
 */
@Getter
@Setter
@Schema(description = "充电订单信息表单对象")
public class ChargeOrderInfoForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @NotNull(message = "主键ID不能为空")
    private Long id;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "订单类型 1 个人订单 2 集团订单")
    private Integer orderType;

    @Schema(description = "集团订单所属当前集团编号")
    private Integer ecId;

    @Schema(description = "充电桩编号")
    @Size(max=255, message="充电桩编号长度不能超过255个字符")
    private String equipmentId;

    @Schema(description = "第三方充电订单号")
    @Size(max=100, message="第三方充电订单号长度不能超过100个字符")
    private String chargeOrderNo;

    @Schema(description = "充电开始时间")
    @Size(max=30, message="充电开始时间长度不能超过30个字符")
    private String startTime;

    @Schema(description = "充电结束时间")
    @Size(max=30, message="充电结束时间长度不能超过30个字符")
    private String endTime;

    @Schema(description = "充电时间：秒")
    private Integer chargeTime;

    @Schema(description = "状态0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电")
    private Integer status;

    @Schema(description = "第三方充电消费总额")
    private BigDecimal thirdPartyTotalCost;

    @Schema(description = "第三方充电服务费")
    private BigDecimal thirdPartyServerfee;

    @Schema(description = "第三方充电金额")
    private BigDecimal thirdPartyElecfee;

    @Schema(description = "实际充电度数（单位：0.001 kw/h）")
    private BigDecimal totalCharge;

    @Schema(description = "平台实际收取金额")
    private BigDecimal realCost;

    @Schema(description = "平台总服务费")
    private BigDecimal realServiceCost;

    @Schema(description = "1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止")
    private Integer stopType;

    @Schema(description = "请求启动充电的手机号")
    @Size(max=50, message="请求启动充电的手机号长度不能超过50个字符")
    private String phoneNum;

    @Schema(description = "车牌号( 停车减免必传，格式确保正确)")
    @Size(max=50, message="车牌号( 停车减免必传，格式确保正确)长度不能超过50个字符")
    private String plateNum;

    @Schema(description = "充电结束原因")
    @Size(max=100, message="充电结束原因长度不能超过100个字符")
    private String stopReason;

    @Schema(description = "推送：充电明细信息")
    @Size(max=65535, message="推送：充电明细信息长度不能超过65535个字符")
    private String chargeDetails;

    @Schema(description = "第三方充电站id")
    @Size(max=50, message="第三方充电站id长度不能超过50个字符")
    private String thirdPartyStationId;

    @Schema(description = "预充值金额")
    private BigDecimal preAmt;

    @Schema(description = "平台预扣服务费")
    private BigDecimal realPredictServiceCost;

    @Schema(description = "补缴金额（智停）")
    private BigDecimal maspAmount;

    @Schema(description = "平台补缴金额")
    private BigDecimal maspRealAmount;

    @Schema(description = "需要补缴的总金额")
    private BigDecimal totalMaspMoney;

    @Schema(description = "已补缴的金额")
    private BigDecimal alreadyMaspMoney;

    @Schema(description = "补缴状态  0.无需补缴  1.待补缴  2.已补缴")
    private Integer maspStatus;

    @Schema(description = "补缴时间")
    @Size(max=30, message="补缴时间长度不能超过30个字符")
    private String maspTime;

    @Schema(description = "补缴描述（默认：系统扣除）")
    @Size(max=255, message="补缴描述（默认：系统扣除）长度不能超过255个字符")
    private String maspDesc;

    @Schema(description = "优惠金额")
    private BigDecimal discountMoney;

    @Schema(description = "优惠描述（前端展示为优惠描述+优惠金额）")
    @Size(max=255, message="优惠描述（前端展示为优惠描述+优惠金额）长度不能超过255个字符")
    private String discountDesc;

    @Schema(description = "优惠活动ID")
    private Long discountInfoId;

    @Schema(description = "按平台计费规则，实际第三方收取的服务费")
    private BigDecimal realThirdCost;

    @Schema(description = "企业id")
    private Long firmId;

    @Schema(description = "企业专享优惠价")
    private BigDecimal firmPrice;

    @Schema(description = "优惠券金额")
    private BigDecimal couponPrice;

    @Schema(description = "优惠卷ID")
    private Long couponId;

    @Schema(description = "备注")
    @Size(max=1000, message="备注长度不能超过1000个字符")
    private String remark;

    @Schema(description = "创建人")
    private Long createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    private Long updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "乐观锁")
    private Integer version;

    @Schema(description = "逻辑删除（0-未删除 1-已删除）")
    private Integer isDeleted;


}
