package com.sqx.modules.address.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 用户根据内部地址新增地址DTO
 * @author codingliang
 * @date 2025-09-13
 */
@Data
public class AddressAddDTO {

    @ApiModelProperty(value = "用户名称")
    @NotBlank(message = "用户名称不能为空")
    private String userName;

    @ApiModelProperty(value = "手机号")
    @NotBlank(message = "手机号不能为空")
    private String phone;

    @ApiModelProperty(value = "内部地址id")
    @NotNull(message = "内部地址id不能为空")
    private Long insideAddressId;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty("默认地址 0：非默认  1：默认")
    @NotNull(message = "默认地址不能为空")
    @Pattern(regexp = "0|1", message = "默认地址格式错误")
    private Integer addressDefault;
}
