
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 lombok.Data;
import lombok.ToString;
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
 */
@Data
@ToString
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;


}
