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

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 项目结算记录添加请求体
 */
@Data
@Schema(description = "项目结算记录添加请求体", requiredProperties = {
                "projectDetailName",
                "settlementQuantity",
                "settlementRevenue",
                "workTime",
                "settlementTime",
                "promoCodeApplyId",
                "projectId",
                "userId"
})
public class ProjectSettlementAddRequest implements Serializable {

    /**
     * 项目明细名称
     */
    @NotBlank(message = "项目明细名称不能为空")
    @Schema(description = "项目明细名称", example = "新用户完成首单")
    private String projectDetailName;

    /**
     * 结算数量
     */
    @Schema(description = "结算数量", example = "2")
    private Integer settlementQuantity;

    /**
     * 结算收益
     */
    @Schema(description = "结算收益", example = "2.34")
    private BigDecimal settlementRevenue;

    /**
     * 作业时间
     */
    @Schema(description = "作业时间", example = "2025-05-10")
    private String workTime;

    /**
     * 结算时间
     */
    @Schema(description = "结算时间", example = "2025-05-12")
    private String settlementTime;

    /**
     * 推广码申请记录id
     */
    @Min(value = 1L, message = "推广码申请记录id ID不能小于1")
    @Schema(description = "推广码申请记录id", example = "1")
    private Long promoCodeApplyId;

    /**
     * 项目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;
}

