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

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

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * 课程推广待提成记录更新请求体
 */
@Data
@Schema(description = "课程推广待提成记录更新请求体", requiredProperties = {
                "id",
                "firstUserId",
                "secondUserId",
                "courseId",
                "name",
                "type",
                "image",
                "orderId",
                "userId",
                "totalAmount",
                "commissionStatus",
                "orderCreateTime",
})
public class CoursePromotionCommissionPendingUpdateRequest implements Serializable {

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

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

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

    /**
     * 课程id
     */
    @Min(value = 1L, message = "课程id ID不能小于1")
    @Schema(description = "课程id", example = "")
    private Long courseId;

    /**
     * 课程名称
     */
    @NotBlank(message = "课程名称不能为空")
    @Schema(description = "课程名称", example = "")
    private String name;

    /**
     * 课程类别
     */
    @NotBlank(message = "课程类别不能为空")
    @Schema(description = "课程类别", example = "")
    private String type;

    /**
     * 课程图片
     */
    @NotBlank(message = "课程图片不能为空")
    @Schema(description = "课程图片", example = "")
    private String image;

    /**
     * 课程订单id
     */
    @Min(value = 1L, message = "课程订单id ID不能小于1")
    @Schema(description = "课程订单id", example = "")
    private Long orderId;

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

    /**
     * 订单价格
     */
    @Schema(description = "订单价格", example = "")
    private BigDecimal totalAmount;

    /**
     * 提成状态
     */
    @NotBlank(message = "提成状态不能为空")
    @Schema(description = "提成状态", example = "")
    private String commissionStatus;

    /**
     * 订单创建时间
     */
    @Schema(description = "订单创建时间", example = "")
    private LocalDate orderCreateTime;


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