package com.ruoyi.system.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;
import java.util.StringJoiner;

/**
 * @ClassName: ElectronicFenceVo
 * @Author: 于学智
 * @Description: 电子围栏VO
 * @CreateDate: 2023/9/13 16:31
 * @Version: 1.0
 * @E-mail:18722650553@139.com
 * @Link:https://github.com/18722650553
 */
public class ElectronicFenceVo implements Serializable {
    /**
     * 围栏id
     */
    private Long id;
    /**
     * 高德key 用户在高德地图官网申请Web服务API类型Key 必填
     */
    private String key;

    /**
     * 服务唯一编号 sid为猎鹰service唯一编号 必填
     */
    private String sid;

    /**
     * 围栏名称 在同一个 sid 下不可重复，不可为空。 支持中文、英文大小字母、英文下划线"_"、英文横线"-"和数字，长度不大于128个字符 必填
     */
    @NotBlank(message = "围栏名称禁止为空！")
    private String name;

    /**
     * 围栏中心点坐标 格式X,Y 必填
     */
    private String center;

    /**
     * 沿线偏移距离 单位：米 取值范围 [1，300] 必填
     */
    private String bufferradius;

    /**
     * 行政区划编码 参考行政区划编码表 必填
     */
    private String adcode;

    /**
     * 围栏多边形顶点坐标 格式X1,Y1;X2,Y2; 必填
     */
    private String points;

    /**
     * 围栏半径 单位：米，整数，取值范[1,50000] 必填
     */
    private String radius;

    /**
     * 围栏描述 支持中文、英文大小字母、英文下划线"_"、英文横线"-"和数字，长度不大于128个字符 否
     */
    private String desc;

    /**
     * 围栏-圆形-0
     * 围栏-多边形围栏-1
     * 围栏-线形围栏-2
     * 围栏-行政区划围栏-3
     */
    @Max(value = 3, message = "围栏类型错误！")
    @Min(value = 0, message = "围栏类型错误！")
    @NotNull(message = "围栏类型禁止为空！")
    private Integer geofence_type;

    /**
     * 围栏开始时间
     */
    @NotNull(message = "围栏开始时间禁止为空！")
    private Long start_time;
    /**
     * 围栏结束时间
     */
    @NotNull(message = "围栏结束时间禁止为空！")
    private Long end_time;
    /**
     * 围栏状态 0：关闭 1：开启
     */
    @Max(value = 1, message = "围栏状态错误！")
    @Min(value = 0, message = "围栏状态错误！")
    @NotNull(message = "围栏状态禁止为空！")
    private Integer state;
    /**
     * 围栏开启状态（0：默认 1：禁止离开 2：禁止进入）
     */
    @Max(value = 2, message = "围栏开启状态错误！")
    @Min(value = 0, message = "围栏开启状态错误！")
    @NotNull(message = "围栏开启状态禁止为空！")
    private Integer type;
    /**
     * 用户ID
     */
    private Long usdId;
    /**
     * 设备ID
     */
    @NotNull(message = "设备ID禁止为空！")
    private Long deviceId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCenter() {
        return center;
    }

    public void setCenter(String center) {
        this.center = center;
    }

    public String getBufferradius() {
        return bufferradius;
    }

    public void setBufferradius(String bufferradius) {
        this.bufferradius = bufferradius;
    }

    public String getAdcode() {
        return adcode;
    }

    public void setAdcode(String adcode) {
        this.adcode = adcode;
    }

    public String getPoints() {
        return points;
    }

    public void setPoints(String points) {
        this.points = points;
    }

    public String getRadius() {
        return radius;
    }

    public void setRadius(String radius) {
        this.radius = radius;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getGeofence_type() {
        return geofence_type;
    }

    public void setGeofence_type(Integer geofence_type) {
        this.geofence_type = geofence_type;
    }

    public Long getStart_time() {
        return start_time;
    }

    public void setStart_time(Long start_time) {
        this.start_time = start_time;
    }

    public Long getEnd_time() {
        return end_time;
    }

    public void setEnd_time(Long end_time) {
        this.end_time = end_time;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public Long getUsdId() {
        return usdId;
    }

    public void setUsdId(Long usdId) {
        this.usdId = usdId;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", ElectronicFenceVo.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("key='" + key + "'")
                .add("sid='" + sid + "'")
                .add("name='" + name + "'")
                .add("center='" + center + "'")
                .add("bufferradius='" + bufferradius + "'")
                .add("adcode='" + adcode + "'")
                .add("points='" + points + "'")
                .add("radius='" + radius + "'")
                .add("desc='" + desc + "'")
                .add("geofence_type=" + geofence_type)
                .add("start_time=" + start_time)
                .add("end_time=" + end_time)
                .add("state=" + state)
                .add("type=" + type)
                .add("usdId=" + usdId)
                .add("deviceId=" + deviceId)
                .toString();
    }
}
