
package com.tmerclub.cloud.delivery.dto;

import com.tmerclub.cloud.common.bean.BmapPoint;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

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

/**
 * 同城配送信息DTO
 *
 * @author tmerclub
 * @date 2020-12-16 15:33:57
 */
public class SameCityDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "同城配送")
    private Long samecityId;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "配送区域经纬度json")
    private String positionInfo;

    @Schema(description = "收费类型 1按区域收取固定配送费 2按距离收取配送费")
    private Integer chargeType;

    @Schema(description = "起送价 是优惠券/码和满减优惠抵扣前的商品金额，运费不计入起送价。")
    private Long startFee;

    @Schema(description = "配送费")
    private Long deliveryFee;

    @Schema(description = "默认距离(km)")
    private Double defaultDistance;

    @Schema(description = "每超出距离(km)")
    private Double overDistance;

    @Schema(description = "每超出距离费用")
    private Long overDistanceFee;

    @Schema(description = "免费重量")
    private Double freeWeight;

    @Schema(description = "续重重量")
    private Double overWeight;

    @Schema(description = "续重费用")
    private Long overWeightFee;

    @Schema(description = "启用状态 1启用 0未启用")
    private Integer status;

    @Schema(description = "经度")
    private Double lng;

    @Schema(description = "纬度")
    private Double lat;

    @Schema(description = "后台坐标点数组")
    private List<BmapPoint> polygonPath;

    @Schema(description = "省ID")
    @NotNull(message = "省ID不能为空")
    private Long provinceId;

    @Schema(description = "省")
    @NotBlank(message = "省名称不能为空")
    private String province;

    @Schema(description = "城市ID")
    @NotNull(message = "城市ID不能为空")
    private Long cityId;

    @Schema(description = "城市")
    @NotBlank(message = "城市名称不能为空")
    private String city;

    @Schema(description = "区ID")
    @NotNull(message = "区ID不能为空")
    private Long areaId;

    @Schema(description = "区")
    @NotBlank(message = "区名称不能为空")
    private String area;

    @Schema(description = "详细地址")
    @NotBlank(message = "详细地址不能为空")
    @Length(min = 1, max = 50, message = "详细地址长度需要在1到50之间")
    private String detailAddress;

    @Schema(description = "店铺所在经度")
    private String shopLng;

    @Schema(description = "店铺所在纬度")
    private String shopLat;

    public String getShopLng() {
        return shopLng;
    }

    public void setShopLng(String shopLng) {
        this.shopLng = shopLng;
    }

    public String getShopLat() {
        return shopLat;
    }

    public void setShopLat(String shopLat) {
        this.shopLat = shopLat;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public Long getSamecityId() {
        return samecityId;
    }

    public void setSamecityId(Long samecityId) {
        this.samecityId = samecityId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getPositionInfo() {
        return positionInfo;
    }

    public void setPositionInfo(String positionInfo) {
        this.positionInfo = positionInfo;
    }

    public Integer getChargeType() {
        return chargeType;
    }

    public void setChargeType(Integer chargeType) {
        this.chargeType = chargeType;
    }

    public Long getStartFee() {
        return startFee;
    }

    public void setStartFee(Long startFee) {
        this.startFee = startFee;
    }

    public Long getDeliveryFee() {
        return deliveryFee;
    }

    public void setDeliveryFee(Long deliveryFee) {
        this.deliveryFee = deliveryFee;
    }

    public Double getDefaultDistance() {
        return defaultDistance;
    }

    public void setDefaultDistance(Double defaultDistance) {
        this.defaultDistance = defaultDistance;
    }

    public Double getOverDistance() {
        return overDistance;
    }

    public void setOverDistance(Double overDistance) {
        this.overDistance = overDistance;
    }

    public Long getOverDistanceFee() {
        return overDistanceFee;
    }

    public void setOverDistanceFee(Long overDistanceFee) {
        this.overDistanceFee = overDistanceFee;
    }

    public Double getFreeWeight() {
        return freeWeight;
    }

    public void setFreeWeight(Double freeWeight) {
        this.freeWeight = freeWeight;
    }

    public Double getOverWeight() {
        return overWeight;
    }

    public void setOverWeight(Double overWeight) {
        this.overWeight = overWeight;
    }

    public Long getOverWeightFee() {
        return overWeightFee;
    }

    public void setOverWeightFee(Long overWeightFee) {
        this.overWeightFee = overWeightFee;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Double getLng() {
        return lng;
    }

    public void setLng(Double lng) {
        this.lng = lng;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public List<BmapPoint> getPolygonPath() {
        return polygonPath;
    }

    public void setPolygonPath(List<BmapPoint> polygonPath) {
        this.polygonPath = polygonPath;
    }

    @Override
    public String toString() {
        return "SameCityDTO{" +
                "samecityId=" + samecityId +
                ", shopId=" + shopId +
                ", positionInfo='" + positionInfo + '\'' +
                ", chargeType=" + chargeType +
                ", startFee=" + startFee +
                ", deliveryFee=" + deliveryFee +
                ", defaultDistance=" + defaultDistance +
                ", overDistance=" + overDistance +
                ", overDistanceFee=" + overDistanceFee +
                ", freeWeight=" + freeWeight +
                ", overWeight=" + overWeight +
                ", overWeightFee=" + overWeightFee +
                ", status=" + status +
                ", lng=" + lng +
                ", lat=" + lat +
                ", polygonPath=" + polygonPath +
                ", provinceId=" + provinceId +
                ", province='" + province + '\'' +
                ", cityId=" + cityId +
                ", city='" + city + '\'' +
                ", areaId=" + areaId +
                ", area='" + area + '\'' +
                ", detailAddress='" + detailAddress + '\'' +
                ", shopLng='" + shopLng + '\'' +
                ", shopLat='" + shopLat + '\'' +
                '}';
    }
}
