package com.cool.store.request.store;

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

import javax.validation.Valid;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Auther zx_szh
 * @Date 2026/2/4 15:59
 * @Version 1.0
 */
@Data
public class PreAllocationSaveRequest {
    @NotNull
    @ApiModelProperty("订单ID")
    Long orderId;
    @NotNull
    @ApiModelProperty("门店ID")
    Long shopId;

    @ApiModelProperty("流程子阶段")
    Integer subStage;
    @Valid
    List<PreAllocationItem> items;
    @Data public static class PreAllocationItem{

        private Long id;

        @ApiModelProperty("缴费类型")
        String expenseType;
        @ApiModelProperty("公司名称")
        String payeeName;
        @ApiModelProperty("公司COde")
        String payeeCode;
        @ApiModelProperty("分账金额")
        @NotNull
        @DecimalMin(value = "0.00", inclusive = true)
        BigDecimal payAmount;
    }
}
