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.Data;

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

import com.greenorange.promotion.common.PageRequest;

/**
 * 下级用户项目明细抽佣查询请求体，继承自分页请求 PageRequest
 */
@Data
@Schema(description = "下级用户项目明细抽佣查询请求体", requiredProperties = {"current", "pageSize"})
public class SubUserProjectCommissionQueryRequest extends PageRequest implements Serializable {

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

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

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

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

    /**
     * 下级用户ID
     */
    @Min(value = 1L, message = "下级用户ID ID不能小于1")
    @Schema(description = "下级用户ID", example = "2")
    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 = "1")
    private Long userId;


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

