package com.yolo.keyboard.controller.admin.themepurchase.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 皮肤购买记录表（积分支付）新增/修改 Request VO")
@Data
public class KeyboardThemePurchaseSaveReqVO {

    @Schema(description = "主键 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15568")
    private Long id;

    @Schema(description = "业务订单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "业务订单号不能为空")
    private String orderNo;

    @Schema(description = "购买用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24047")
    @NotNull(message = "购买用户ID不能为空")
    private Long userId;

    @Schema(description = "主题皮肤ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28953")
    @NotNull(message = "主题皮肤ID不能为空")
    private Long themeId;

    @Schema(description = "皮肤原始所需积分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "皮肤原始所需积分不能为空")
    private BigDecimal costPoints;

    @Schema(description = "实际扣除积分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "实际扣除积分不能为空")
    private BigDecimal paidPoints;

    @Schema(description = "支付状态：0待支付 1已支付 2已关闭 3已退款", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "支付状态：0待支付 1已支付 2已关闭 3已退款不能为空")
    private Short payStatus;

    @Schema(description = "关联的积分扣费流水ID", example = "24853")
    private Long walletTxId;

    @Schema(description = "已退款的积分数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "已退款的积分数量不能为空")
    private Integer refundPoints;

    @Schema(description = "积分退款完成时间")
    private LocalDateTime refundedAt;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "创建时间不能为空")
    private LocalDateTime createdAt;

    @Schema(description = "支付完成时间")
    private LocalDateTime paidAt;

    @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "更新时间不能为空")
    private LocalDateTime updatedAt;

    @Schema(description = "备注或扩展信息", example = "你说的对")
    private String remark;

}