
package com.tmerclub.cloud.order.model;

import com.tmerclub.cloud.common.model.BaseModel;
import jakarta.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户订单配送地址
 *
 * @author tmerclub
 * @date 2020-12-05 14:13:50
 */
public class PurchaseOrderAddr extends BaseModel implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    private Long purchaseOrderAddrId;

    /**
     * 店铺ID
     */
    private Long shopId;

    /**
     * 收货人
     */
    @NotBlank(message = "收货人名称不能为空")
    @Length(max = 50, message = "收货人名称字符长度不能超过50")
    private String consignee;

    /**
     * 省ID
     */
    private Long provinceId;

    /**
     * 省
     */
    private String province;

    /**
     * 城市ID
     */
    private Long cityId;

    /**
     * 城市
     */
    private String city;

    /**
     * 区域ID
     */
    private Long areaId;

    /**
     * 区
     */
    private String area;

    /**
     * 地址
     */
    @NotBlank(message = "地址不能为空")
    @Length(max = 255, message = "地址长度不能超过255")
    private String addr;

    /**
     * 手机
     */
    @NotBlank(message = "收货人手机不能为空")
    @Length(max = 11, message = "收货人手机长度不能超过11")
    private String mobile;

    public Long getPurchaseOrderAddrId() {
        return purchaseOrderAddrId;
    }

    public void setPurchaseOrderAddrId(Long purchaseOrderAddrId) {
        this.purchaseOrderAddrId = purchaseOrderAddrId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Override
    public String toString() {
        return "PurchaseOrderAddr{" +
                "createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", purchaseOrderAddrId=" + purchaseOrderAddrId +
                ", shopId=" + shopId +
                ", consignee='" + consignee + '\'' +
                ", provinceId=" + provinceId +
                ", province='" + province + '\'' +
                ", cityId=" + cityId +
                ", city='" + city + '\'' +
                ", areaId=" + areaId +
                ", area='" + area + '\'' +
                ", addr='" + addr + '\'' +
                ", mobile='" + mobile + '\'' +
                '}';
    }
}
