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

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

@Schema(description = "管理后台 - 用户生成的邀请码表，用于邀请新用户注册/安装并建立邀请关系新增/修改 Request VO")
@Data
public class KeyboardUserInviteCodesSaveReqVO {

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

    @Schema(description = "邀请码字符串，对外展示，唯一", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "邀请码字符串，对外展示，唯一不能为空")
    private String code;

    @Schema(description = "邀请码所属用户ID（邀请人）", requiredMode = Schema.RequiredMode.REQUIRED, example = "14170")
    @NotNull(message = "邀请码所属用户ID（邀请人）不能为空")
    private Long ownerUserId;

    @Schema(description = "邀请码状态：1=启用，0=停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "邀请码状态：1=启用，0=停用不能为空")
    private Short status;

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

    @Schema(description = "邀请码过期时间，NULL表示永久有效")
    private LocalDateTime expiresAt;

    @Schema(description = "邀请码最大可使用次数，NULL表示不限次数")
    private Integer maxUses;

    @Schema(description = "邀请码已使用次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "25037")
    @NotNull(message = "邀请码已使用次数不能为空")
    private Integer usedCount;

    @Schema(description = "邀请码所属系统用户ID（邀请人）", example = "20047")
    private Long systemUserId;

    @Schema(description = "邀请码所属租户", example = "17355")
    private Long ownerTenantId;

    @Schema(description = "邀请码所属系统用户", example = "772")
    private Long owenrSystemUserId;

    @Schema(description = "邀请码类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotEmpty(message = "邀请码类型不能为空")
    private String inviteType;

}