package com.xy.dto;

import com.xy.annotate.DictFormat;
import com.xy.consts.DictConsts;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

@Data
@Accessors(chain = true)
public class MemberDeviceDTO {


    @Data
    @Accessors(chain = true)
    public static class TradeDevices {

    }

    @Data
    @Accessors(chain = true)
    public static class QueryNearlyDevice {

        @ApiModelProperty(value = "设备名称", required = false)
        private String deviceName;

        @NotBlank(message = "经度不能为空")
        @ApiModelProperty(value = "经度", required = true)
        private String lon;

        @NotBlank(message = "维度不能为空")
        @ApiModelProperty(value = "纬度", required = true)
        private String lat;


        @ApiModelProperty("附近最大距离，单位：米,默认500")
        private Integer nearby = 500;

        @ApiModelProperty(value = "限制查询数量(默认10)", required = false)
        private Integer limitNum = 10;
    }


    @Data
    @Accessors(chain = true)
    public static class NearlyDeviceVO {

        @ApiModelProperty("商户名称")
        private String mercName;

        @ApiModelProperty("距离")
        private Integer m;

        @ApiModelProperty("点位名称")
        private String placeName;

        @ApiModelProperty("线路名称")
        private String placeLineName;

        @ApiModelProperty("区域名称")
        private String districtName;

        @ApiModelProperty("设备id")
        private Long deviceId;

        @ApiModelProperty("设备名称")
        private String deviceName;

        @DictFormat(DictConsts.DEVICE_TYPE)
        @ApiModelProperty("设备类型")
        private Integer deviceType;

        @ApiModelProperty("运营状态")
        private Integer busyState;

        @ApiModelProperty("运营状态描述")
        private String busyStateDesc;

        @ApiModelProperty("设备图片")
        private String deviceImg;

        @ApiModelProperty("经度")
        private String lon;

        @ApiModelProperty("纬度")
        private String lat;


    }


}
