package com.greenorange.promotion.model.dto.projectDetail;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 项目明细更新请求体
 */
@Data
@Schema(description = "项目明细更新请求体", requiredProperties = {
                "id",
                "projectDetailName",
                "projectSettlementPrice",
                "projectMinSettlementPrice",
                "maxCommissionRate",
                "projectId",
})
public class ProjectDetailUpdateRequest implements Serializable {

    /**
     * 项目明细ID
     */
    @Min(value = 1L, message = "项目明细ID ID不能小于1")
    @Schema(description = "项目明细ID", example = "1")
    private Long id;

    /**
     * 项目明细名称
     */
    @NotBlank(message = "项目明细名称不能为空")
    @Schema(description = "项目明细名称", example = "2.9元购买30元券包")
    private String projectDetailName;

    /**
     * 项目结算价
     */
    @Schema(description = "项目结算价", example = "0.72")
    private BigDecimal projectSettlementPrice;

    /**
     * 项目最小结算价格
     */
    @Schema(description = "项目最小结算价格", example = "0.66")
    private BigDecimal projectMinSettlementPrice;

    /**
     * 最大抽佣比例
     */
    @Schema(description = "最大抽佣比例", example = "2")
    private BigDecimal maxCommissionRate;

    /**
     * 项目ID
     */
    @Min(value = 1L, message = "项目ID ID不能小于1")
    @Schema(description = "项目ID", example = "1")
    private Long projectId;


    @Serial
    private static final long serialVersionUID = 1L;
}