package com.yhy.module.core.controller.admin.workbench.vo.progresspayment;

import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.time.LocalDate;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * 进度款模式创建 Request VO
 */
@Schema(description = "工作台 - 进度款模式创建 Request VO")
@Data
public class ProgressPaymentModeCreateReqVO {

    @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @Schema(description = "名称（为空时自动生成：第X期）", example = "第一期进度款")
    private String name;

    @Schema(description = "期数序号", example = "1")
    private Integer periodNumber;

    @Schema(description = "目标行ID（用于插入位置计算）", example = "1")
    private Long targetId;

    @Schema(description = "插入位置：above-在目标行上方，below-在目标行下方", example = "below")
    private String insertPosition;

    @Schema(description = "开始日期", example = "2024-01-01")
    private LocalDate startDate;

    @Schema(description = "结束日期", example = "2024-03-31")
    private LocalDate endDate;

    @Schema(description = "总造价", example = "1000000.00")
    private BigDecimal totalCost = BigDecimal.ZERO;

    @Schema(description = "本期产值", example = "200000.00")
    private BigDecimal currentPeriodValue = BigDecimal.ZERO;

    @Schema(description = "已完产值", example = "500000.00")
    private BigDecimal completedValue = BigDecimal.ZERO;

    @Schema(description = "已完比例", example = "0.5")
    private BigDecimal completedRatio = BigDecimal.ZERO;

    @Schema(description = "支付比例(%)", example = "80")
    private BigDecimal paymentRatio = BigDecimal.ZERO;

    @Schema(description = "支付金额", example = "400000.00")
    private BigDecimal paymentAmount = BigDecimal.ZERO;

    @Schema(description = "材料调差", example = "10000.00")
    private BigDecimal materialAdjustment = BigDecimal.ZERO;

    @Schema(description = "备注", example = "第一期进度款")
    private String remark;
}
