package ink.wgink.module.map.pojo.dtos.grid;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: GridDTO
 * @Description: 网格
 * @Author: WangGeng
 * @Date: 2020/10/21 17:01
 * @Version: 1.0
 **/
@ApiModel
public class GridDTO implements Serializable {

    private static final long serialVersionUID = 8205867660055311853L;
    @ApiModelProperty(name = "gridId", value = "主键")
    private String gridId;
    @ApiModelProperty(name = "gridName", value = "网格名称")
    private String gridName;
    @ApiModelProperty(name = "gridSummary", value = "网格描述")
    private String gridSummary;
    @ApiModelProperty(name = "gridGroupId", value = "网格组ID")
    private String gridGroupId;
    @ApiModelProperty(name = "gridDuty", value = "网格职责")
    private String gridDuty;
    @ApiModelProperty(name = "gridCode", value = "网格编码")
    private String gridCode;
    @ApiModelProperty(name = "gridSquare", value = "网格面积")
    private Double gridSquare;
    @ApiModelProperty(name = "areaCode", value = "区域编码")
    private String areaCode;
    @ApiModelProperty(name = "areaName", value = "区域名称")
    private String areaName;
    @ApiModelProperty(name = "fillColor", value = "填充颜色")
    private String fillColor;
    @ApiModelProperty(name = "relationId", value = "关联ID")
    private String relationId;
    @ApiModelProperty(name = "gmtCreate", value = "添加时间")
    private String gmtCreate;
    @ApiModelProperty(name = "gmtModified", value = "修改时间")
    private String gmtModified;
    @ApiModelProperty(name = "relationIdArray", value = "关联ID列表")
    private List<String> relationIdArray;
    @ApiModelProperty(name = "pointArray", value = "网格点列表")
    private List<GridPointDTO> pointArray;

    public String getGridId() {
        return gridId == null ? "" : gridId.trim();
    }

    public void setGridId(String gridId) {
        this.gridId = gridId;
    }

    public String getGridName() {
        return gridName == null ? "" : gridName.trim();
    }

    public void setGridName(String gridName) {
        this.gridName = gridName;
    }

    public String getGridSummary() {
        return gridSummary == null ? "" : gridSummary.trim();
    }

    public void setGridSummary(String gridSummary) {
        this.gridSummary = gridSummary;
    }

    public String getGridGroupId() {
        return gridGroupId == null ? "" : gridGroupId.trim();
    }

    public void setGridGroupId(String gridGroupId) {
        this.gridGroupId = gridGroupId;
    }

    public String getGridDuty() {
        return gridDuty == null ? "" : gridDuty.trim();
    }

    public void setGridDuty(String gridDuty) {
        this.gridDuty = gridDuty;
    }

    public String getGridCode() {
        return gridCode == null ? "" : gridCode.trim();
    }

    public void setGridCode(String gridCode) {
        this.gridCode = gridCode;
    }

    public Double getGridSquare() {
        return gridSquare == null ? 0 : gridSquare;
    }

    public void setGridSquare(Double gridSquare) {
        this.gridSquare = gridSquare;
    }

    public String getAreaCode() {
        return areaCode == null ? "" : areaCode.trim();
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaName() {
        return areaName == null ? "" : areaName.trim();
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getFillColor() {
        return fillColor == null ? "" : fillColor.trim();
    }

    public void setFillColor(String fillColor) {
        this.fillColor = fillColor;
    }

    public String getRelationId() {
        return relationId == null ? "" : relationId.trim();
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public String getGmtCreate() {
        return gmtCreate == null ? "" : gmtCreate.trim();
    }

    public void setGmtCreate(String gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getGmtModified() {
        return gmtModified == null ? "" : gmtModified.trim();
    }

    public void setGmtModified(String gmtModified) {
        this.gmtModified = gmtModified;
    }

    public List<String> getRelationIdArray() {
        if (relationIdArray == null) {
            return new ArrayList<>();
        }
        return relationIdArray;
    }

    public void setRelationIdArray(List<String> relationIdArray) {
        this.relationIdArray = relationIdArray;
    }

    public List<GridPointDTO> getPointArray() {
        if (pointArray == null) {
            return new ArrayList<>();
        }
        return pointArray;
    }

    public void setPointArray(List<GridPointDTO> pointArray) {
        this.pointArray = pointArray;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"fillColor\":\"")
                .append(fillColor).append('\"');
        sb.append(",\"gridName\":\"")
                .append(gridName).append('\"');
        sb.append(",\"relationIdArray\":")
                .append(relationIdArray);
        sb.append(",\"pointArray\":")
                .append(pointArray);
        sb.append('}');
        return sb.toString();
    }
}
