package com.yolo.keyboard.controller.admin.tenantcommission.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 KeyboardTenantCommissionSaveReqVO {

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

    @Schema(description = "内购记录ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20900")
    @NotNull(message = "内购记录ID不能为空")
    private Integer purchaseRecordId;

    @Schema(description = "内购交易ID", example = "30383")
    private String transactionId;

    @Schema(description = "被邀请用户ID（购买用户）", example = "2447")
    private Integer inviteeUserId;

    @Schema(description = "邀请人用户ID", example = "1012")
    private Long inviterUserId;

    @Schema(description = "内购金额")
    private BigDecimal purchaseAmount;

    @Schema(description = "分成比例")
    private BigDecimal commissionRate;

    @Schema(description = "分成金额")
    private BigDecimal commissionAmount;

    @Schema(description = "状态：PENDING-待结算，SETTLED-已结算，REFUNDED-已退款", example = "2")
    private String status;

    @Schema(description = "内购时间")
    private LocalDateTime purchaseTime;

    @Schema(description = "结算时间")
    private LocalDateTime settledAt;

    @Schema(description = "关联的余额交易记录ID", example = "29131")
    private Long balanceTransactionId;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    @Schema(description = "备注", example = "随便")
    private String remark;

}