package com.njzscloud.supervisory.biz.pojo.param;


import cn.hutool.core.lang.Assert;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Getter
@Setter
@ToString
@Accessors(chain = true)
public class LocationTrackHistoryParam {
    Long orderId;
    LocalDateTime startTime;
    LocalDateTime endTime;
    Integer speed;

    public Integer getSpeed() {
        return speed == null || speed <= 0 ? 1000 : speed;
    }

    public Long getOrderId() {
        Assert.notNull(orderId, "订单ID不能为空");
        return orderId;
    }


}
