package com.sqx.modules.errand.dto;

import com.sqx.common.query.PageQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 等待接单查询dto
 */
@Data
public class WaitForAcceptOrderQueryDTO extends PageQuery {
    @ApiModelProperty(value = "接单模式 1近单模式，2同城模式", required = true)
    @NotBlank(message = "接单模式不能为空")
    @Pattern(regexp = "(1|2)", message = "接单模式只能为1或2")
    private String receivingPattern;

    @ApiModelProperty(value = "骑手位置经度 xxx.yyyy", required = true)
    @NotNull(message = "骑手位置经度不能为空")
    private Double riderLng;

    @ApiModelProperty(value = "骑手位置纬度 xx.yyyy", required = true)
    @NotNull(message = "骑手位置纬度不能为空")
    private Double riderLat;

    @ApiModelProperty("订单类型 1：帮我送；2：帮我取；3：同城帮买；4：同城服务；5：外卖配送；不传查所有类型")
    @Pattern(regexp = "[1-5]", message = "订单类型只能为1-5")
    private String indentType;

    @ApiModelProperty("购买类型 0：骑手就近购买；1：用户指定地址购买")
    @Pattern(regexp = "(0|1)", message = "购买类型只能为1或0")
    private String buyType;

    @ApiModelProperty("店铺id")
    private Long shopId;

    @ApiModelProperty(value = "接单距离", hidden = true)
    private Double distances;

    @ApiModelProperty(value = "接单城市", hidden = true)
    @NotNull(message = "接单城市不能为空")
    private String city;
}
