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

import com.greenorange.promotion.annotation.EnumValue;
import com.greenorange.promotion.model.enums.UserRoleEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 晋升申请批准请求体
 */
@Data
@Schema(description = "晋升申请批准请求体", requiredProperties = {
        "applyId",
        "invitationCode",
        "userRole"
})
public class AdvancementApplyApproveRequest implements Serializable {

    /**
     * 晋升申请id
     */
    @Min(value = 1, message = "晋升申请id不能小于1")
    @Schema(description = "晋升申请id", example = "1")
    private Long applyId;

    /**
     * 邀请码
     */
    @NotBlank(message = "邀请码不能为空")
    @Schema(description = "邀请码", example = "666999")
    private String invitationCode;

    /**
     * 用户角色
     */
    @NotBlank(message = "用户角色不能为空")
    @EnumValue(enumClass = UserRoleEnum.class)
    @Schema(description = "用户角色", example = "user")
    private String userRole;


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