package com.seer.teach.mall.request;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import jakarta.validation.constraints.Pattern;
import java.util.Set;

@Getter
@Setter
@Schema(description = "商城订单请求参数")
@ToString
public class OrderReq {
    @Schema(description = "订单ID")
    private Integer id;

    @Schema(description = "子订单Id")
    private Integer childOrderId;

    @Schema(description = "收货地址ID")
    private Integer addressId;

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

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

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

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

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

    @Schema(description = "联系电话")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系电话格式不正确")
    private String mobile;

    @Schema(description = "订单备注")
    private String postscript;

    @Schema(description = "支付方式ID")
    private String payId;

    @Schema(description = "支付方式名称")
    private String payName;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "商品集合")
    Set<OrderGoodReq> goods;

    @Schema(description = "租户ID")
    private String tenantId;

}