package com.pavis.admin.aigc.model.req;

import jakarta.validation.constraints.*;

import lombok.Data;

import io.swagger.v3.oas.annotations.media.Schema;

import org.hibernate.validator.constraints.Length;
import java.io.Serial;
import java.io.Serializable;
import java.time.*;

/**
 * 应用API密钥创建或修改参数
 *
 * @author semi
 * @since 2025/05/26 17:28
 */
@Data
@Schema(description = "应用API密钥创建或修改参数")
public class AppApiReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 关联应用ID
     */
    @Schema(description = "关联应用ID")
    @NotNull(message = "关联应用ID不能为空")
    private Long appId;

    /**
     * 渠道类型:web/mobile/api/sdk
     */
    @Schema(description = "渠道类型:web/mobile/api/sdk")
    @NotBlank(message = "渠道类型:web/mobile/api/sdk不能为空")
    @Length(max = 50, message = "渠道类型:web/mobile/api/sdk长度不能超过 {max} 个字符")
    private String channel;

    /**
     * API密钥
     */
    @Schema(description = "API密钥")
    @NotBlank(message = "API密钥不能为空")
    @Length(max = 255, message = "API密钥长度不能超过 {max} 个字符")
    private String apiKey;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    @NotNull(message = "创建人不能为空")
    private Long createUser;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @NotNull(message = "创建时间不能为空")
    private LocalDateTime createTime;
}