package com.aircraft.modules.order.domain.dto;

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

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 编辑订单信息DTO
 *
 * @author chenxiky
 * @version 1.0.0
 * @since 2025/7/20
 */
@Data
public class UpdateOrderDTO {

    @NotNull(message = "订单ID不能为空")
    @ApiModelProperty(value = "订单ID", required = true)
    private Long orderId;

    /**
     * 客户ID
     */
    @NotNull(message = "客户ID不能为空")
    @ApiModelProperty(value = "客户ID", required = true)
    private Long customerId;

    /**
     * 客户手机号
     */
    @NotBlank(message = "客户手机号不能为空")
    @ApiModelProperty(value = "客户手机号", required = true)
    private String phone;

    /**
     * 景区ID
     */
    @NotNull(message = "景区ID不能为空")
    @ApiModelProperty(value = "景区ID", required = true)
    private Long attractionId;

    /**
     * 路线ID集合
     */
    @NotNull
    @NotEmpty(message = "路线ID集合不能为空")
    @ApiModelProperty(value = "路线ID集合", required = true)
    private List<Long> routeIds;

    /**
     * 货物重量
     */
    @NotNull
    @DecimalMin(value = "0.01", message = "货物重量必须大于0")
    @ApiModelProperty(value = "货物重量", required = true)
    private BigDecimal cargoWeight;

    /**
     * 操作人集合ID
     */
    @NotNull(message = "操作人集合ID不能为空")
    @NotEmpty
    @ApiModelProperty(value = "操作人集合ID", required = true)
    private List<Long> operatorIds;

    /**
     * 额外费用
     */
    @ApiModelProperty(value = "额外费用", required = true)
    @DecimalMin(value = "0", message = "额外费用不能小于0")
    private BigDecimal surchargeAmount;

    /**
     * 订单总金额（附加费变化，重量变化都需要重新计算）
     */
    @ApiModelProperty(value = "订单总金额（附加费+计算重量金额）,前端无需传", required = false)
    private BigDecimal totalAmount;

    /**
     * 计算重量的金额（重量发生变化需要重新计算）
     */
    @ApiModelProperty(value = "计算重量金额,前端无需传", required = false)
    private BigDecimal amount;


}
