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

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

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

/**
 * 项目明细抽佣添加请求体
 */
@Data
@Schema(description = "项目明细抽佣添加请求体", requiredProperties = {
                "projectDetailId",
                "myUnitPrice",
                "currentCommissionRate",
                "projectId",
                "userId",
})
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ProjectCommissionAddRequest implements Serializable {

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

    /**
     * 我的单价
     */
    @Schema(description = "我的单价", example = "0.45")
    private BigDecimal myUnitPrice;

    /**
     * 当前抽佣比例
     */
    @Schema(description = "当前抽佣比例", example = "5")
    private BigDecimal currentCommissionRate;

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

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


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

