package com.kym.entity.admin.queryParams;

import com.kym.entity.common.PageParams;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;


/**
 * @author skyline
 * @description 用户订单查询参数
 * @date 2023-08-22 18:56
 */
@Data
public class CustomChargeOrdersQueryParam extends PageParams {
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 充电订单号
     */
    private String startChargeSeq;

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone != null ? mobilePhone.replaceAll(" ", "") : null;
    }

    /**
     * 手机号
     */
    private String mobilePhone;
    /**
     * 用户名
     */
    private String username;
    /**
     * 站点id
     */
    private List<String> stationIds;
    /**
     * 充电桩序列号
     */
    private String connectorId;
    /**
     * 充电状态
     */
    private Integer chargeStatus;
    /**
     * 订单状态
     */
    private Integer orderStatus;
    /**
     * 支付状态
     */
    private Integer payStatus;


    public void setStartDate(LocalDate startDate) {
        this.startDate = LocalDateTime.of(startDate, LocalTime.MIN);
    }

    /**
     * 查询开始日期
     */
    private LocalDateTime startDate;

    public void setEndDate(LocalDate endDate) {
        this.endDate =  LocalDateTime.of(endDate, LocalTime.MAX);
    }

    /**
     * 查询结束日期
     */
    private LocalDateTime endDate;

    /**
     * 发票状态
     */
    private Integer invoiceStatus;

    /**
     * 停止原因
     */
    private Integer stopReason;

    /**
     * 互联平台名称
     */
    private String platformName;

}
