package com.snack.server.module.address.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 收货地址 VO
 */
@Data
@Schema(description = "收货地址")
public class AddressVO implements Serializable {

    @Schema(description = "地址 ID")
    private Long id;

    @Schema(description = "收货人姓名")
    private String receiver;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "省")
    private String province;

    @Schema(description = "市")
    private String city;

    @Schema(description = "区/县")
    private String district;

    @Schema(description = "详细地址")
    private String detail;

    @Schema(description = "标签")
    private String tag;

    @Schema(description = "是否默认：0-否 1-是")
    private Integer isDefault;

    /** 拼接的完整地址（省市区+详细），供订单快照使用 */
    @Schema(description = "完整地址")
    private String fullAddress;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
}
