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

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",
                "subUserId",
                "projectId",
                "userId",
})
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SubUserProjectCommissionAddRequest implements Serializable {

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

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

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

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

    /**
     * 项目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 = "2")
    private Long userId;


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

