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

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;

/**
 * 资金变动记录添加请求体
 */
@Data
@Schema(description = "资金变动记录添加请求体", requiredProperties = {
                "projectName",
                "changeAmount",
                "currentAmount",
                "userId",
                "projectSettlementId"
})
public class FundsChangeAddRequest implements Serializable {

    /**
     * 项目名称
     */
    @NotBlank(message = "项目名称不能为空")
    @Schema(description = "项目名称", example = "饿了么-超吃卡")
    private String projectName;

    /**
     * 项目明细名称
     */
    @Schema(description = "项目明细名称", example = "2.9元购买30元券包")
    private String projectDetailName;

    /**
     * 变动金额
     */
    @Schema(description = "变动金额", example = "0.96")
    private BigDecimal changeAmount;

    /**
     * 当前金额（变动后的总金额）
     */
    @Schema(description = "当前金额（变动后的总金额）", example = "0.34")
    private BigDecimal currentAmount;

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

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


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

