package com.sqx.modules.address.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 内部地址
 * @author codingliang
 * @date 2025-09-13
 */
@Data
@ApiModel(value = "内部地址")
public class InsideAddressDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(name = "id，修改时不能为空")
    private Long id;

    @ApiModelProperty(name = "站点id")
    @NotNull(message = "站点id不能为空")
    @ExcelProperty(value = "站点id")
    private Long stationId;

    @ApiModelProperty(name = "配送费用")
    @NotNull(message = "配送费用不能为空")
    @Min(value = 0, message = "配送费用不能小于0")
    @ExcelProperty(value = "配送费用")
    private Double deliveryFee;

    @ApiModelProperty(name = "省份")
    @NotBlank(message = "省份不能为空")
    @ExcelProperty(value = "省份")
    private String province;

    @ApiModelProperty(name = "城市")
    @NotBlank(message = "城市不能为空")
    @ExcelProperty(value = "城市")
    private String city;

    @ApiModelProperty(name = "区县")
    @NotBlank(message = "区县不能为空")
    @ExcelProperty(value = "区县")
    private String district;

    @ApiModelProperty(name = "地址详情")
    @NotBlank(message = "地址详情不能为空")
    @ExcelProperty(value = "地址详情")
    private String addressDetail;

    @ApiModelProperty(name = "经度")
    @NotNull(message = "经度不能为空")
    @ExcelProperty(value = "经度")
    private Double lng;

    @ApiModelProperty(name = "纬度")
    @NotNull(message = "纬度不能为空")
    @ExcelProperty(value = "纬度")
    private Double lat;

    @ApiModelProperty(name = "启用状态;1启用、0禁用")
    @NotBlank(message = "启用状态不能为空")
    @Pattern(regexp = "0|1", message = "启用状态只能为0或1")
    @ExcelProperty(value = "启用状态")
    private String status;

    @ApiModelProperty(name = "排序")
    @NotNull(message = "排序不能为空")
    @ExcelProperty(value = "排序")
    private Integer sort;
}
