package shop.alien.entity.store.dto;

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

import javax.validation.constraints.NotNull;

/**
 * 创建订单DTO（订单总金额、餐具费、优惠金额、实付金额完全采用前端传参，不做后台金额校验）
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@ApiModel(value = "CreateOrderDTO对象", description = "创建订单，金额完全采用前端传参")
public class CreateOrderDTO {

    @ApiModelProperty(value = "桌号ID", required = true)
    @NotNull(message = "桌号ID不能为空")
    private Integer tableId;

    @ApiModelProperty(value = "就餐人数")
    private Integer dinerCount;

    @ApiModelProperty(value = "优惠券ID（可选，不选择优惠券时传 null 或不传此字段）")
    private Integer couponId;

    @ApiModelProperty(value = "订单总金额（前端传参，不做后台校验）")
    private java.math.BigDecimal totalAmount;

    @ApiModelProperty(value = "餐具费（前端传参，不做后台校验）")
    private java.math.BigDecimal tablewareFee;

    @ApiModelProperty(value = "优惠金额（前端传参，不做后台校验）")
    private java.math.BigDecimal discountAmount;

    @ApiModelProperty(value = "实付金额（前端传参，不做后台校验）")
    private java.math.BigDecimal payAmount;

    @ApiModelProperty(value = "联系电话")
    private String contactPhone;

    @ApiModelProperty(value = "备注(限30字)。创建/更新订单时传入；更新订单(加餐)时为覆盖，不拼接")
    private String remark;

    @ApiModelProperty(value = "是否立即支付(0:否,创建订单但不支付; 1:是,创建订单并支付)")
    private Integer immediatePay;
}
