package cn.ey.biz.module.system.api.oauth2.dto;

import cn.ey.biz.common.enums.CommonStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel("RPC 服务 - OAuth2 客户端 Response DTO")
@Data
public class OAuth2ClientRespDTO implements Serializable {

    @ApiModelProperty(value = "客户端编号", required = true, example = "hr")
    @NotNull(message = "客户端编号不能为空")
    private String clientId;

    @ApiModelProperty(value = "客户端密钥", required = true, example = "xxx")
    @NotNull(message = "用户密钥不能为空")
    private String secret;
    /**
     * 应用名
     */
    private String name;
    /**
     * 应用图标
     */
    private String logo;
    /**
     * 应用描述
     */
    private String description;
    /**
     * 状态
     *
     * 枚举 {@link CommonStatusEnum}
     */
    private Integer status;
    /**
     * 访问令牌的有效期
     */
    private Integer accessTokenValiditySeconds;
    /**
     * 刷新令牌的有效期
     */
    private Integer refreshTokenValiditySeconds;
    /**
     * 附加信息，JSON 格式
     */
    private String additionalInformation;

}
