package com.yhy.module.core.controller.admin.quota.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

@Schema(description = "管理后台 - 定额调整设置创建/更新 Request VO")
@Data
public class QuotaAdjustmentSaveReqVO {

    @Schema(description = "主键ID", example = "1")
    private Long id;

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

    @Schema(description = "调整名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "高温季节调整")
    @NotBlank(message = "调整名称不能为空")
    private String name;

    @Schema(description = "调整内容", example = "夏季高温施工增加人工费用")
    private String content;

    @Schema(description = "调整类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "percentage")
    @NotBlank(message = "调整类型不能为空")
    private String adjustmentType;

    @Schema(description = "调整规则", example = "{\"value\": 10, \"operator\": \"increase\"}")
    private Map<String, Object> adjustmentRules;

    @Schema(description = "排序", example = "1")
    private Integer sortOrder;
}
