package com.ruoyi.hezhi.domain.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

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

/**
 * 用户地址对象 tb_member_address
 *
 * @author ruoyi
 * @date 2024-10-30
 */
@Getter
@Setter
@ToString
public class MemberAddressDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 新增地址 */
    public interface addMemberAddress{}
    /** 修改地址 */
    public interface updateMemberAddress{}
    /** 删除地址 */
    public interface deleteMemberAddress{}

    /** 用户地址主键ID */
    @NotNull(message = "缺少用户地址ID", groups = {updateMemberAddress.class, deleteMemberAddress.class})
    private Long memberAddressId;

    /** 用户ID */
    @NotNull(message = "请先登录", groups = {addMemberAddress.class})
    private Long memberUserId;

    /** 姓名 */
    @NotBlank(message = "缺少姓名", groups = {addMemberAddress.class, updateMemberAddress.class})
    private String name;

    /** 手机号 */
    @NotBlank(message = "缺少手机号", groups = {addMemberAddress.class, updateMemberAddress.class})
    private String phone;

    /** 省ID */
//    @NotNull(message = "缺少省", groups = {addMemberAddress.class, updateMemberAddress.class})
    private Long provinceId;
    private String provinceName;

    /** 市ID */
//    @NotNull(message = "缺少市", groups = {addMemberAddress.class, updateMemberAddress.class})
    private Long cityId;
    private String cityName;

    /** 区（县）ID */
//    @NotNull(message = "缺少区", groups = {addMemberAddress.class, updateMemberAddress.class})
    private Long areaId;
    private String areaName;

    /** 详细地址 */
    @NotBlank(message = "缺少详细地址", groups = {addMemberAddress.class, updateMemberAddress.class})
    private String address;

    /** 地址 */
//    @NotBlank(message = "缺少地址", groups = {addMemberAddress.class, updateMemberAddress.class})
    private String location;

}
